How can I implement navigation links between the various JSP pages of my web application?
Suppose I have list.jspone that shows a list of items. The user then clicks on one of these items to view the item in more detail in view.jsp. Now I need a link from view.jspback to list.jsp. However, this list.jspis not the only page containing a link to view.jsp. For example, you can go to view.jsp, from search.jsp. In addition, each of list.jspand search.jspcan have different parameters and attributes that affect the output that they produce.
Currently, I implemented this in a simple way, using a parameter sourcethat shows the page that the user clicked to go to the current page, and passing in other parameters or attributes between the pages that need to be remembered. However, I thought it might be best practice to implement these kinds of functions in a pure JSP + Servlet , and I wanted to ask about this before continuing.
Thanks in advance.
source
share