|
I had
this same problem. Try changing the order of your declarations in the
web.xml file. For me, the problem went away when I move the security
section to the very end of my web.xml file.
One
thing I noticed in the log file is that it appears that you have six tag
libraries listed in your web.xml. The struts team has depreciated two tag
libraries: struts.tld and struts-form.tld.
Any
way, a listing of the web.xml file that I have been using
follows:
<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE web-app
PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.2//EN" "http://java.sun.com/j2ee/dtds/web-app_2_2.dtd"> <web-app>
<!-- =================================================================== --> <!-- Standard Action Servlet Configuration (with debugging) --> <!-- =================================================================== --> <servlet>
<servlet-name>action</servlet-name> <servlet-class>org.apache.struts.action.ActionServlet</servlet-class> <init-param> <param-name>application</param-name> <param-value>ApplicationResources</param-value> </init-param> <init-param> <param-name>config</param-name> <param-value>/WEB-INF/struts-config.xml</param-value> </init-param> <init-param> <param-name>debug</param-name> <param-value>2</param-value> </init-param> <init-param> <param-name>detail</param-name> <param-value>2</param-value> </init-param> <init-param> <param-name>validate</param-name> <param-value>true</param-value> </init-param> <load-on-startup>2</load-on-startup> </servlet> <!--
===================================================================
-->
<!-- Action Servlet Mapping --> <!-- =================================================================== --> <servlet-mapping> <servlet-name>action</servlet-name> <url-pattern>*.do</url-pattern> </servlet-mapping> <!--
===================================================================
-->
<!-- The Welcome File List --> <!-- =================================================================== --> <welcome-file-list>
<welcome-file>index.jsp</welcome-file> </welcome-file-list> <!--
===================================================================
-->
<!-- Struts Tag Library Descriptors --> <!-- =================================================================== --> <taglib> <taglib-uri>/WEB-INF/struts-bean.tld</taglib-uri> <taglib-location>/WEB-INF/struts-bean.tld</taglib-location> </taglib> <taglib> <taglib-uri>/WEB-INF/struts-html.tld</taglib-uri> <taglib-location>/WEB-INF/struts-html.tld</taglib-location> </taglib> <taglib> <taglib-uri>/WEB-INF/struts-logic.tld</taglib-uri> <taglib-location>/WEB-INF/struts-logic.tld</taglib-location> </taglib> <taglib>
<taglib-uri>/WEB-INF/struts-logic.tld</taglib-uri> <taglib-location>/WEB-INF/struts-logic.tld</taglib-location> </taglib> <!--
===================================================================
-->
<!-- Security Constraints --> <!-- =================================================================== --> <security-constraint> <web-resource-collection> <web-resource-name>util</web-resource-name> <url-pattern>/util/*</url-pattern> <url-pattern>*.do</url-pattern> </web-resource-collection> <auth-constraint> <role-name>user</role-name> </auth-constraint> </security-constraint> <login-config> <auth-method>FORM</auth-method> <form-login-config> <form-login-page>/index.jsp</form-login-page> <form-error-page>/index.jsp</form-error-page> </form-login-config> </login-config> </web-app> -dain
|
