Ok, I don't know if I am having a brain freeze this morning or what. I have a JSP Page with a Form. I have a Form Bean for the data. Then I have a Servlet which uses information from the Bean to put it in a database. So my question is, when I hit submit, do I need ANOTHER "worker servlet" to put the info into a bean, then forward that on to the DB Servlet? Or should I screw the bean and just call the DB Servlet from the JSP page and use requeset.getParameter() to get all my form data?
Eelco den Heijer
Joined: Jan 17, 2002
Current J2EE Fashion dictates that you use some implementation of the MVC pattern One of the consequences of this is that you'll have only one controller servlet, and delegate the actual work to helper classes. In your case, you'd have a database helper that stores the bean state in the database. There are many ways to do MVC these days; Struts is popular example. But before you dive into Struts, I would 'just' re-shuffle your servlets into 1 servlet and 2 helper (if I were you). Hope this helps.