I’m currently writing a JSP-application with webservices. The problem is: I should detect the clicked link so I can redirect to the specific jsp page. On this JSP-page there will be a request to the web service which will be also done by the same servlet. (Or is it easier to create two different servlets?)
Does anyone have a solution/suggestion to detect the clicked link in JSP? Or do I have to store this in the session?
Thanks in advance
If your request is a
HttpServletRequestyou could callgetRequestURI()orgetRequestURL().