This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Servlets and the fly likes validation and forward Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "validation and forward" Watch "validation and forward" New topic
Author

validation and forward

Amitkumar Dhama
Ranch Hand

Joined: Feb 14, 2005
Posts: 56
HI all,
How will a controller servlet will deside to which servlet or jsp component it has to forward the request at run time in mvc archi. if possible give me some coding for that

&

How do we handle the validation of request.

thanking in advance....


SCJP 1.4, SCWCD 1.4, M.Tech(CSE)
Bosun Bello
Ranch Hand

Joined: Nov 06, 2000
Posts: 1510
You have to tell the controller where to dispatch to. This can be done via requestDispatcher. It can also be done via the web.xml configuration file.

As for validating the request, you can do it on the client side using javaScript, and also do it on the server side. It's a good idea to do it in both layers.


Bosun (SCJP, SCWCD)
So much trouble in the world -- Bob Marley
Abhinit Saxena
Greenhorn

Joined: Jan 10, 2006
Posts: 18
following code snipit can give you a basic idea of do the thing with forward


 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: validation and forward
 
Similar Threads
jsp:useBean standard action doubt
page redirection with out losing values
adding a new value to the request...
Return to Login Page
Problem Uploading Files