• Post Reply Bookmark Topic Watch Topic
  • New Topic

JSP include action

 
Rohit Sajan
Ranch Hand
Posts: 34
  • Mark post as helpful
  • send pies
  • 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
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65530
108
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • 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
  • 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
Author and ninkuma
Marshal
Posts: 65530
108
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • 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.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!