Win a copy of Java Mock Exams (software) this week in the Programmer Certification (OCPJP) forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

how to pass data from view to model?

 
Yi Meng
Ranch Hand
Posts: 270
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I usually have a jsp page display the input form, and then submit to another jsp page which is only 3 lines to set all the properties of the model and then forward to a servlet to perform other tasks.
e.g. i have test1.jsp displaying a new user application form. The form action is to test2.jsp, which is :

and perform other tasks in the servlet.
how do you evaluate this practice, good or poor? any beter alternatives instead of calling request.getParameter() for every parameter and use the setter of the model to set the value?
 
What are you doing? You are supposed to be reading this tiny ad!
the new thread boost feature brings a LOT of attention to your favorite threads
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!