Win a copy of Learning OpenStack Networking: Build a solid foundation in virtual networking technologies for OpenStack-based clouds this week in the Cloud/Virtualization forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Liutauras Vilda
  • Campbell Ritchie
  • Tim Cooke
  • Bear Bibeault
  • Devaka Cooray
Sheriffs:
  • Jeanne Boyarsky
  • Knute Snortum
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Ganesh Patekar
  • Stephan van Hulst
  • Pete Letkeman
  • Carey Brown
Bartenders:
  • Tim Holloway
  • Ron McLeod
  • Vijitha Kumara

servlet linking and requestdispatcher  RSS feed

 
Ranch Hand
Posts: 92
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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?
Thanks
 
Ranch Hand
Posts: 476
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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?
 
Cynthia Yao
Ranch Hand
Posts: 92
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
Thanks
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!