Hey GUys,
im trying to include a file inside my template.
My code:
String get_act = null;
get_act = request.getParameter("act");
boolean loggedin = (session.getAttribute("logginname") != null) ? true : false;
if( loggedin == false && get_act != "login"){
out.write("Redirecting<br>");
response.sendRedirect("?act=login");
}else{
String include_page = null;
include_page = get_act +".jsp";
%>
<jsp:include page=include_page></jsp:include>
<%
}
So what im trying to do is this:
when i go to index.jsp?act=overview i want to include overview.jsp , when im going to index.jsp?act=logout i want to include logout.jsp
Do you guys know what is wrong or do you know an other method?
It looks like i cant get the include_page variable inside the jsp_include tag?
Thx