reset password
Author Message
hal255
Posts: 51
Posted 22:53 Feb 08, 2015 |

Hey guys,

HW1 servlet creates the userlist, so I need that list to compare the email/password in the hw2 servlet. How do I go about doing this?

Thanks.

vluu2
Posts: 64
Posted 22:57 Feb 08, 2015 |

Import homework 1, then do the request.getParameter thing........ least that's how i did it 

gqu
Posts: 1
Posted 23:04 Feb 08, 2015 |

Make sure you Hw1 and Hw2 are in the same web project, before you import the Hw1 files.

hal255
Posts: 51
Posted 23:17 Feb 08, 2015 |

I am confused.

hw1 gets imported, If hw1 servlet was never accessed, wouldn't the userslist be empty?

I had this in my Login servlet:

        if (request.getParameter("Homework1Users") == null){
            System.out.println("Homework1USERS is empty");            
        }

And it does print it out.

skim144
Posts: 63
Posted 09:42 Feb 09, 2015 |

in the init() method you can instantiate the user arraylist to make a default admin account

hal255
Posts: 51
Posted 13:58 Feb 09, 2015 |

Wow, I completely misunderstood that part of the assignment. This made it a whole lot easier. Thanks for the help guys.