my1.jsp includes my2.jsp. I need to include my2.jsp if certain parameters are true(which i need to check in my1.jsp) which are passed from a
servlet to my2.jsp and then need to pass to my1.jsp. How can i check those variables in my1.jsp.
class MyServlet
{
// passing the value of myvar to my2.jsp
req.setAttribute("myvar",myvar);
RequestDispatcher dispatcher = getServletContext().getRequestDispatcher(my2.jsp);
}
my2.jsp
// retieving the value of myvar in my2.jsp
String myvar = (String)request.getAttribute("myvar");
my1.jsp
if(myvar) // how can i pass the value of myvar to this
jsp <%@ include file="my2.jsp" %>
thanks for the help
arpit