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"?>
<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
Just started using JBoss and am wondering
if anyone has
had any success w/ getting struts to work w/ JBoss2.2.1-Tomcat3.2.1. In my
J2EE app, I'm having problems with the web-app portion below. Seems
it's not liking my web.xml tags and I've already pulled out tags like
<welcome-file-list>, now it's not liking the <taglib> tags of
struts and I'm not sure what's supposed to be where now.
Any help appreciated.
------------------ partial jboss output
when loading my *.ear -------------------------------
[Service Control] Started 25
services
[Default] JBoss 2.2.1 Started in 0m:55s
[EmbeddedTomcat]
Warning: validation was turned on but an org.xml.sax.ErrorHandler was
not
[EmbeddedTomcat] set, which is probably not what is desired.
Parser will use a default
[EmbeddedTomcat] ErrorHandler to print the
first 10 errors. Please call
[EmbeddedTomcat] the 'setErrorHandler'
method to fix this.
[EmbeddedTomcat] Error: URI=null Line=53: Element
"web-app" does not allow "taglib" here.
[EmbeddedTomcat] Error: URI=null
Line=58: Element "web-app" does not allow "taglib" here.
[EmbeddedTomcat]
Error: URI=null Line=63: Element "web-app" does not allow "taglib"
here.
[EmbeddedTomcat] Error: URI=null Line=68: Element "web-app" does
not allow "taglib" here.
[EmbeddedTomcat] Error: URI=null Line=73:
Element "web-app" does not allow "taglib" here.
[EmbeddedTomcat] Warning:
validation was turned on but an org.xml.sax.ErrorHandler was
not
[EmbeddedTomcat] set, which is probably not what is desired.
Parser will use a default
[EmbeddedTomcat] ErrorHandler to print the
first 10 errors. Please call
[EmbeddedTomcat] the 'setErrorHandler'
method to fix this.
[EmbeddedTomcat] Error: URI=null Line=53: Element
"web-app" does not allow "taglib" here.
[EmbeddedTomcat] Error: URI=null
Line=58: Element "web-app" does not allow "taglib" here.
[EmbeddedTomcat]
Error: URI=null Line=63: Element "web-app" does not allow "taglib"
here.
[EmbeddedTomcat] Error: URI=null Line=68: Element "web-app" does
not allow "taglib" here.
[EmbeddedTomcat] Error: URI=null Line=73:
Element "web-app" does not allow "taglib" here.
2001-04-22 06:35:34 -
Ctx( ): JasperException: R( + /index.jsp + null) Unable to
compile class for
JSP/u/public/JBoss-2.2.1_Tomcat-3.2.1/tomcat/work/localhost_8080/_0002findex_0002ejspindex_jsp_0.java:66:
Class org.apache.struts.taglib.html.HtmlTag not
found.