• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Jeanne Boyarsky
  • Ron McLeod
Sheriffs:
  • Paul Clapham
  • Liutauras Vilda
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
Bartenders:

JSP include action

 
Ranch Hand
Posts: 34
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I want to include few jsp files in a main JSP. Which included JSP should be shown to user is based on the tab the user selects. I'm planning to use if then else condition to make that choice. Now my question is there a better way to do this instead of if then else. I mean some thing like <jsp:include page=<%=expression%> /> or a better way???

Regards
Saju
 
Sheriff
Posts: 67753
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Are you planning on repainting the whole page every time a tab is selected?
 
Rohit Sajan
Ranch Hand
Posts: 34
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Bear Bibeault:
Are you planning on repainting the whole page every time a tab is selected?



When a tab is selected only the JSP curresponding to that tab will be displayed to the user. There is a header display which is common in all tabs and that will be part of the main JSP. but the rest will be one JSP at a time based on the tab selected. (Infact i didn't really get what you meant by repaint) Is it the answer to your question?

Reagrds and thanks for the response.
 
Bear Bibeault
Sheriff
Posts: 67753
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
In that case JSP includes will not work for you.

You should investigate using one of: iframes for the tab contents, DHTML in which all pages are pre-loaded and revealed/hidden as appropriate, or Ajax to fetch the tab contents as needed.
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic