Forums Register Login
servlet linking and requestdispatcher
I am working on a project, most stuffs are form validation, send email, and update database. Because I do not want to write a servlet for every single form, I am thinking about write several small servlets, changable information store in property files and link them together using the property file.
However, my coworker says this is not a good idea. Well anyone has any suggestions?
Finally, after I use RequestDispatcher.forward, the page's javascript got messed up. Is it because of tomcat? Anyone had similiar experience?
Of course whenever possible it is better to have one servlet to do all you stuff. Besides, form checking and database updates are pretty forward routines. Have you considered using JavaBeans and JSP?
Well, I need very strict seperation between presentation and logic, all content will go through another process for update. That is why I choose servlet. If could, I would rather use jsp which I am more familiar with.
All databse access will use bean, I wrote two small servlet to handle form validation and email. If the client decide to add more similiar stuff, I would just change the property file.
Well, maybe client would not make that much changes, maybe I should wrote singel servlet to handle one process.
He loves you so much! And I'm baking the cake! I'm going to put this tiny ad in the cake:
RavenDB is an Open Source NoSQL Database that’s fully transactional (ACID) across your database

This thread has been viewed 599 times.

All times above are in ranch (not your local) time.
The current ranch time is
Jan 18, 2019 13:05:14.