Best practices for navigating the PSP JSP?

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.

+5
source share
3 answers

You should check out the postdesign / redirect / get webdesign template, which can help you learn how to create a good navigation system on your web server and how to handle it :)

+1
source

Behrang? , , . , .

0

You can save from the attribute that stores the name of the page where you are coming from and put it in the return link.

0
source

All Articles