Results 1 to 3 of 3
Thread: forwarding to a servlett
- 01-16-2010, 03:39 AM #1
Member
- Join Date
- Jan 2010
- Posts
- 11
- Rep Power
- 0
forwarding to a servlett
Hello,
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..
thanks
- 01-17-2010, 02:29 AM #2
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.
- 01-17-2010, 01:23 PM #3
Member
- Join Date
- Jan 2010
- Posts
- 11
- Rep Power
- 0
Similar Threads
-
Forwarding data problem with struts.xml
By Shaolin in forum Web FrameworksReplies: 0Last Post: 01-08-2009, 06:29 AM -
Forwarding mails in message/rfc822
By prithviraj in forum Advanced JavaReplies: 0Last Post: 05-18-2008, 11:30 AM
Bookmarks