Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Get requested URL  RSS feed

 
Er. Rohit Sharma
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have a Filter that filters all jsps within a folder (/jsps/* ). When the user requests a jsp from that folder I want to filter the jsp that the user is asking for (within the jsps folder) and let him or not access that jsp based on his rights.
Example:
user is in index.jsp and in index.jsp is a link to /jsps/page1.jsp.
When user clicks on that link I want the Filter to tell me that the user is trying to access /jsps/page1.jsp.

Thanks
 
David Newton
Author
Rancher
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What's the question? Are you asking for the filter code? What have you got so far? JavaRanch is NotACodeMill, and we encourage people to ShowSomeEffort -- if you have a specific question someone will be happy to help :)
 
Er. Rohit Sharma
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am not asking for filter code. I am explaining my scenario.
What exactly I am doing in my application is.... I am having a preAction and a postAction. One Jsp say index.jsp, the preAction is responsible for seeting all attributes for JSP to display.
Now my JSP has a link for another action say newAction. Now what I am looking for is that when I press the link the newAction is called. Now I had an onUnload method which is called when we leave the page.
To perform specific actions I want to know the url of the page or action to which the request is forwarded.
We can fetch the current url by request.getRequestURL but is there a way to find the action to which the request is forwarded to...
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!