S
Sam Zin
Hi,
Sorry for the repost. This should explain the problem more.
------------------------
I created a simple struts application under Jetty where I have a user section
and an admin section.
Everything is working fine, I login to the user section, then when I click on
an admin link (/admin/start.do) the following happens:
1- Jetty sends me to the form-error-page which is specified as a login page.
2- I check the requestURI in this page and it is set to /admin/start.do
3- I login as a user with admin roles, then Jetty forwards me to
/admin/start.do which is the proper behaviour.
Then I switched to struts modules, and now the admin section is a separate
module.
When I run the same test as above, Jetty is giving me "HTTP 403 user not in
required role" instead of forwarding me to the form-error-page.
If I specify an error-page for error-code 403, I don't seem to have the
requestURI set. So I can't manually forward to the new admin link after I
login.
Is there anything (configuration) I'm missing?
Here is a section of my web.xml file:
<servlet>
<servlet-name>inventory</servlet-name>
<servlet-class>org.apache.struts.action.ActionServlet</servlet-class>
<init-param>
<param-name>config</param-name>
<param-value>/WEB-INF/struts-config.xml</param-value>
</init-param>
<init-param>
<param-name>config/admin</param-name>
<param-value>/WEB-INF/struts-admin-config.xml</param-value>
</init-param>
<init-param>
<param-name>debug</param-name>
<param-value>3</param-value>
</init-param>
<init-param>
<param-name>detail</param-name>
<param-value>3</param-value>
</init-param>
<load-on-startup>1</load-on-startup>
</servlet>
....
<login-config>
<auth-method>FORM</auth-method>
<realm-name>InventoryRealm</realm-name>
<form-login-config>
<form-login-page>/login.do</form-login-page>
<form-error-page>/login-error.do</form-error-page>
</form-login-config>
</login-config>
Thanks.
Sam Zin
Sorry for the repost. This should explain the problem more.
------------------------
I created a simple struts application under Jetty where I have a user section
and an admin section.
Everything is working fine, I login to the user section, then when I click on
an admin link (/admin/start.do) the following happens:
1- Jetty sends me to the form-error-page which is specified as a login page.
2- I check the requestURI in this page and it is set to /admin/start.do
3- I login as a user with admin roles, then Jetty forwards me to
/admin/start.do which is the proper behaviour.
Then I switched to struts modules, and now the admin section is a separate
module.
When I run the same test as above, Jetty is giving me "HTTP 403 user not in
required role" instead of forwarding me to the form-error-page.
If I specify an error-page for error-code 403, I don't seem to have the
requestURI set. So I can't manually forward to the new admin link after I
login.
Is there anything (configuration) I'm missing?
Here is a section of my web.xml file:
<servlet>
<servlet-name>inventory</servlet-name>
<servlet-class>org.apache.struts.action.ActionServlet</servlet-class>
<init-param>
<param-name>config</param-name>
<param-value>/WEB-INF/struts-config.xml</param-value>
</init-param>
<init-param>
<param-name>config/admin</param-name>
<param-value>/WEB-INF/struts-admin-config.xml</param-value>
</init-param>
<init-param>
<param-name>debug</param-name>
<param-value>3</param-value>
</init-param>
<init-param>
<param-name>detail</param-name>
<param-value>3</param-value>
</init-param>
<load-on-startup>1</load-on-startup>
</servlet>
....
<login-config>
<auth-method>FORM</auth-method>
<realm-name>InventoryRealm</realm-name>
<form-login-config>
<form-login-page>/login.do</form-login-page>
<form-error-page>/login-error.do</form-error-page>
</form-login-config>
</login-config>
Thanks.
Sam Zin