This week's book giveaway is in the Clojure forum.
We're giving away four copies of Clojure in Action and have Amit Rathore and Francis Avila on-line!
See this thread for details.
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Front Controller Servlet

 
Tony Evans
Ranch Hand
Posts: 597
1
  • 0
  • 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
  • 0
  • 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
  • 0
  • 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: 597
1
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks I will go for the struts framework.

Tony
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic