• 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:
  • Campbell Ritchie
  • Liutauras Vilda
  • Paul Clapham
  • Bear Bibeault
  • Jeanne Boyarsky
Sheriffs:
  • Ron McLeod
  • Tim Cooke
  • Devaka Cooray
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Jj Roberts
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • salvin francis
  • Scott Selikoff
  • fred rosenberger

maintaining a jsp file

 
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
 
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.
 
If you have a bad day in October, have a slice of banana cream pie. And this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
reply
    Bookmark Topic Watch Topic
  • New Topic