The search function is broken again and i apologize if there is another thread answering this question.
I want to conditionally use the include directive in my jsp page (i.e. If a certain variable is true, include jsp1.jsp, else include jsp2.jsp).
something like this
I want to conditionally use the include directive in my jsp page (i.e. If a certain variable is true, include jsp1.jsp, else include jsp2.jsp).
something like this
Code:
<%
String show_main = (String)request.getAttribute("show_main");
if (show_main == null) show_main = "false";
Thanks for your help
//following is what im trying to achieve
if(show_main.equals("true"))
<%@ include file="/main.jsp" %>
else
<%@ include file="/welcome.jsp" %>
%>