• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Front Controller Servlet

 
Tony Evans
Ranch Hand
Posts: 598
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have a front controller servlet which uses the if else format to request JSPs. This is ok if you are dealing with a small number of JSPs.

What I would like is a pointer to a link of a better way to implement the Front Controller Servlet that has many JSPs.

Thanks for any help.

Tony
 
Peter den Haan
author
Ranch Hand
Posts: 3252
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What about Struts or the Spring MVC framework? No use reinventing the wheel...

- Peter
 
Chad McGowan
Ranch Hand
Posts: 265
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If using a framework like struts is not an option, you could create a HashMap that would map action parameter keys and Action classes/and or jsps. That would get rid of your long if/else statements that you have now.
 
Tony Evans
Ranch Hand
Posts: 598
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks I will go for the struts framework.

Tony
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic