Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > Fetching protected URL in tomcat

Reply
Thread Tools

Fetching protected URL in tomcat

 
 
Per Steffensen
Guest
Posts: n/a
 
      08-14-2003
Hi

Using (JBoss/)Tomcat.

I am using declarative protection to protect some of the pages on my
site. Like this in web.xml:
<security-constraint>
<web-resource-collection>
<web-resource-name>X users</web-resource-name>
<description>X users</description>
<url-pattern>*.do</url-pattern>
<http-method>GET</http-method>
<http-method>POST</http-method>
</web-resource-collection>
<auth-constraint>
<description>X users</description>
<role-name>user</role-name>
</auth-constraint>
</security-constraint>

I use a login.jsp to login. It is set up in web.xml:
<login-config>
<auth-method>FORM</auth-method>
<form-login-config>
<form-login-page>login.jsp</form-login-page>
<form-error-page>login.jsp</form-error-page>
</form-login-config>
</login-config>

It works fine. When I try to go to a *.do page without being locked
in, I am sent to login.jsp for login.

My problem is:
How do I, in login.jsp code, fetch information about the URL the user
was trying to go to, when we was sent to login.jsp.
Using WebLogic you can read the "j_target_url" attribute from session
scope, but how do you do it on (JBoss/)Tomcat??

Thanx
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Fetching an URL from a GUI, repeatedly and asynchronously Alexander Farber Java 6 03-12-2006 09:35 AM
Fetching the url from a xsl sheet(xpath) Taare XML 5 04-20-2005 06:17 PM
Fetching binary file linked in URL David Jacques C++ 5 11-15-2004 06:24 PM
Fetching remote password protected pages Tom Cook Perl Misc 0 08-10-2003 11:23 PM
Difference between "Protected WithEvents myClassName" And "Protected myClassName" ? Andreas Klemt ASP .Net 2 07-05-2003 12:51 AM



Advertisments