javascript - to know which link is clicked in the previous page using jsp -


jsp code know link clicked in previous page, based on change web page content of second page. me write code this.

assuming have 1 jsp links, this:

main.jsp:

<ul>   <li><a href="detail.jsp?link=page1">page 1</a></li>   <li><a href="detail.jsp?link=page2">page 2</a></li> </ul> 

detail.jsp:

<h1>i on detail page</h1> <% string link = request.getparameter("link"); %> 

then use variable per need.


Comments

Popular posts from this blog

apache - Remove .php and add trailing slash in url using htaccess not loading css -

javascript - jQuery show full size image on click -