forwarding to a servlett
I am working on a simple login system.
When a user doesn't type anything on login and submit i want that request to go to a controller and hence the user hasn't passed any information that servlet should go on to the same jsp and generate an error msg.
how would i do that?
i am a bit lost in session objects..
you could do it with a request scope object too, such as if the servlet did a forward to the jsp, it could set an ERROR_MESSAGE request attribute, such as when the username / password fields from the jsp form was not entered or invalid. the JSP could have a block on it to try to read the ERROR_MESSAAGE request attribute, if i was present, print its contents out, in an appropriate spot such as above the form in the html templating.
need some explanation
heyy culd you please give me few fractions of the code about what you said..
well i am redirecting to a jsp here..
so what should i have in my servlet and on jsp//
f u can give me an example it will be great