Connecting Tech Pros Worldwide Forums | Help | Site Map

JSP Href

Member
 
Join Date: Sep 2007
Posts: 55
#1: Oct 9 '09
Hi,

I have a big table of href that all points to a jsp file, what I need in my jsp is to know which link called it, is there anyway I can check this?

Basically i have a table of products and each product has its own xml description, and I need to divert the URL (in stylesheet) to this one jsp page so and it will do the formatting with transformerFactory down the road.

I can do so in the stylesheet by editing out the href to point to this new jsp page, but the jsp page needs to know which link in the previous page called it to construct the string and take on from there.

so if a product is called "Toyota Corolla" its xml file is called "Toyota_Corolla.xml".

I tried looking at httpServletRequest methods, but none of them does the trick.

Thanks for looking at it.

Member
 
Join Date: Oct 2007
Location: Velacheri in Chennai(INDIA)
Posts: 77
#2: Oct 14 '09

re: JSP Href


Just pass a parameter.
What i am understand is, you have more links to a same jsp page and you need to know by which link this page is rendered right? Then just pass parameter like href="/myjsp.jsp?link=1",href="/myjsp.jsp?link=2" something like this.
Reply