• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Including pages based on condition

 
Aleksey Matiychenko
Ranch Hand
Posts: 178
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have a JSP that needs to include different set of HTML based on the user permissions.
RIght now I just redirect the page to a different page but I would rather jast have a common html and then include the appropriate parts if the user have persmissions for them.
Any ideas ?
 
Marcos Maia
Ranch Hand
Posts: 977
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
You can use <jsp:include page="page to include" flush="true"/>
try it.
 
Sunetra Saha
Ranch Hand
Posts: 77
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Wouldn't a simple if condition enclosing the offending portion in {} work for you? i.e
<% if (user role = x ) {%>
.....html...
<% } %>
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic