Fetching protected URL in tomcat

Discussion in 'Java' started by Per Steffensen, Aug 14, 2003.

  1. 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
     
    Per Steffensen, Aug 14, 2003
    #1
    1. Advertisements

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Andreas Klemt
    Replies:
    2
    Views:
    737
    Andreas Klemt
    Jul 5, 2003
  2. Alexander Farber
    Replies:
    6
    Views:
    607
    A. Farber
    Mar 12, 2006
  3. Taare
    Replies:
    5
    Views:
    445
    Taare
    Apr 20, 2005
  4. David Jacques

    Fetching binary file linked in URL

    David Jacques, Nov 12, 2004, in forum: C++
    Replies:
    5
    Views:
    1,218
    David Jacques
    Nov 15, 2004
  5. shanti bhushan
    Replies:
    8
    Views:
    494
    Stefan Behnel
    May 18, 2010
  6. Zouplaz

    Fetching an URL using cookies

    Zouplaz, Sep 12, 2006, in forum: Ruby
    Replies:
    5
    Views:
    288
    Zouplaz
    Sep 12, 2006
  7. hunglm

    Fetching latest URL of a frame...

    hunglm, Sep 25, 2004, in forum: Javascript
    Replies:
    2
    Views:
    120
    hunglm
    Sep 27, 2004
  8. Tom Cook
    Replies:
    0
    Views:
    158
    Tom Cook
    Aug 11, 2003
Loading...