Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Is this possible  RSS feed

 
Anthony Smith
Ranch Hand
Posts: 285
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I got a jsp page that is passed a variable. Based on that variable it decides what page to include/display

For example text.jsp has this:
<html>
<%
if(t=0)
%>
<%@ include file="/jsp/config1.jsp" %>
else
<%@ include file="/jsp/config2.jsp" %>
</html>

I kow this wont work but I want to do something similiar. There is other stuff on the test.jsp, so it will act like a border/frame
 
Roy Ben Ami
Ranch Hand
Posts: 732
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
use the :
<jsp:include page=>
instead of the directive include.
i think it will work then.
 
David O'Meara
Rancher
Posts: 13459
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
...or you can use the MVC (or Model 2) architecture and have a servlet at the front to receive the request and use RequestDispatcher.forward to the correct jsp
DOM
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!