• Post Reply Bookmark Topic Watch Topic
  • New Topic

maintaining a jsp file

 
Shishio San
Ranch Hand
Posts: 223
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi guys,
I need to maintain a jsp file. Different actions are taken according to the value of certain condition that i retrieve from a bean object. the first time i did it i ended up with a series of if-else statements and each new case requires the whole logic to be examined again. In one word this is becoming really tiring and not good at all.
I was thinking if some one can suggest a technology or anything that might ease the problem (xml configurator, tags ... )
thx
 
Steve Leach
Ranch Hand
Posts: 46
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you have a lot more Java than html in the page then you should consider using a Servlet instead. The best model for complex code is to have a Servlet that does all the business logic and then forwards to a JSP page to display the results. You could also have 1 servlet that chooses between several JSP pages.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!