L
littlebeam
If there is only a form for user to input data, how can I implement it
by MVC?
Currently, I achieve it by:
1) View: there is a jsp for user to input data.
2) Controller: there is a servlet which is called by the form acton. It
is responsible for two tasks:
a) insert data to database ( the data is retrieved by
request.getParameter(). Is it better to achive it by using java beam?
b) if the insertion is successful, the servlet will forward to a
thankyou page, otherwise it will forward to a error page.
3) Model: ?? here, I don't know whether I shoud use java beam...
by MVC?
Currently, I achieve it by:
1) View: there is a jsp for user to input data.
2) Controller: there is a servlet which is called by the form acton. It
is responsible for two tasks:
a) insert data to database ( the data is retrieved by
request.getParameter(). Is it better to achive it by using java beam?
b) if the insertion is successful, the servlet will forward to a
thankyou page, otherwise it will forward to a error page.
3) Model: ?? here, I don't know whether I shoud use java beam...