The code in the servlet is:
if (request.getParameter("flag") != null)
lsFlag = request.getParameter("flag");
if (lsFlag.equals("Family"))
{
request.setAttribute("flag",lsFlag);
lPageDispatcher.showPage("/HomePage.jsp");
}
//Photo gallery and go from there
if (lsFlag.equals("Gallery"))
{
request.setAttribute("flag",lsFlag);
lPageDispatcher.showPage("/Gallery.jsp");
}
In the HomePage jsp: the flag is either set to Family or Gallery depending on which link is clicked. Now once I vidited Gallery jsp, everytime I run teh servlet, it goes to Gallery and does not bring up Home page from where I need to navigate.........I hope this clears. let me know if I confused you.