P
Per Steffensen
Hi
Using (JBoss/)Tomcat.
I use 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</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 have an login.jsp that 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 connect to an *.do without beeing logged
in, I am sent to the login.jsp for login.
My problem is:
How do I, in login.jsp code, fetch information about the "protected
URL" that the user is trying to go to, when he is sent to login.jsp.
Using WebLogic you can read the "j_target_url" from the session scope,
but how do you do it in (JBoss/)Tomcat??
Thanx
Using (JBoss/)Tomcat.
I use 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</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 have an login.jsp that 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 connect to an *.do without beeing logged
in, I am sent to the login.jsp for login.
My problem is:
How do I, in login.jsp code, fetch information about the "protected
URL" that the user is trying to go to, when he is sent to login.jsp.
Using WebLogic you can read the "j_target_url" from the session scope,
but how do you do it in (JBoss/)Tomcat??
Thanx