Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

validation and forward

 
Amitkumar Dhama
Ranch Hand
Posts: 56
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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....
 
Bosun Bello
Ranch Hand
Posts: 1511
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Abhinit Saxena
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
following code snipit can give you a basic idea of do the thing with forward


 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic