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.
The overall mission is to change the world. When you've done that, then you can read this tiny ad:
ScroogeXHTML 7.1 - RTF to HTML5 / XHTML converter

This thread has been viewed 538 times.

All times above are in ranch (not your local) time.
The current ranch time is
Feb 22, 2018 23:57:23.