I have jsp depending on some state that I am doing on another page.
I have /myjsp/first.jsp which has code like,
<% if(some condtion){ somelogic } else { application.getRequestDispatcher("/myjsp/another.jsp").forward(request,response); } %> <div> <jsp:include page='header.jsp' /> </div>
In this code, if the stream comes to a different state, condition control transfers to another .jsp.
But also it appears below the div tag from /myjsp/first.jsp.
I want to maintain control over another.jsp when it goes there, and it should not show anything from the current page, i.e. div tag from / myjsp / first.jsp
source share