What is the proper way to pass the parameters into a MVC system?
Posted
by
gunbuster363
on Programmers
See other posts from Programmers
or by gunbuster363
Published on 2012-05-14T03:15:37Z
Indexed on
2012/06/26
15:24 UTC
Read the original article
Hit count: 250
mvc
I am trying to learn java servlet/jsp with the MVC concept and built the simplest MVC application. Now I want give more detail to it to enhance my understanding.
If I would need to register a new row in a table in the database, how should we pass the various value of column into the system?
For example, the user might want to register a new event in his planner and the detail of the event involves the 'where', 'when', 'who', 'detail', etc. Should pass all this long value from the servlet's parameter, i.e: the http link?
String accNo = request.getParameter("account_number");
String a = request.getParameter("...");
String b = request.getParameter("...");
String c = request.getParameter("...");
String d = request.getParameter("...");
To illustrate my view that it is really unprofessional to show all the parameter on the link:
http://localhost:8080/domain1/servlet1?param1=55555555555555¶m2=666666666666666666666666666666666666666666666666666666666666¶m3='Some random detail written by user.........................'
Is there other way to pass them?
© Programmers or respective owner