I am making a shopping cart app in
JSP and
servlets to bring it all together. Finally.
I have a registration servlet (c1), a registration form jsp (c2), a login jsp (c3). c1 checks if a username is in the database or not.
If the username is not there, then register the user and send them to c3. I want c3 to display a "registration successful" message if
a user has just registered successfully and is coming from c1. ELSE, take the user back to c2 with a message which tells them
to choose a different username or password etc.
How do I implement the logic of showing a message depending on where a user is coming from ? The servlets and jsps are
ready and I only need to add this logic for a custom message. Of course, I could make a JSP for Registration Successful and one for
Registration Failure. But, that seems to be unnecessary.
Please help me.