Skip to Main Content

New to Java

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

taglib tag doesn't work with web.xml 2.4 ?

807597May 23 2005 — edited May 23 2005
That is, I switched to the 2.4 version of web.xml and now none of the taglib elements I have in there work.

I get the following excpetion

org.apache.jasper.JasperException: File "/tags/struts-html" not found
org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.jav a:105)

I've been surfing a good portion of the day looking for some documentation on this but to no avail. I did find that I should wrap the taglib elements in a jsp-info. I'm runing tomcat 5.0.19.
In any event here is my web.xml:
<web-app xmlns="http://java.sun.com/xml/ns/j2ee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee web-app_2_4.xsd"
version="2.4">

<display-name>Struts Examples Application</display-name>
<!-- Standard Action Servlet Configuration (with debugging) -->
<servlet>
<servlet-name>InitServlet</servlet-name>
<servlet-class>com.jacent.admin.servlet.init.InitServlet</servlet-clas s>
<init-param>
<param-name>log4j</param-name>
<param-value>/WEB-INF/log4j.xml</param-value>
</init-param>

<load-on-startup>1</load-on-startup>
</servlet>
<servlet>
<servlet-name>action</servlet-name>
<servlet-class>org.apache.struts.action.ActionServlet</servlet-class&g t;
<init-param>
<param-name>config</param-name>
<param-value>/WEB-INF/struts-config.xml</param-value>
</init-param>
<!-- module configurations -->

<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>
<load-on-startup>2</load-on-startup>
</servlet>
<!-- Standard Action Servlet Mapping -->
<servlet-mapping>
<servlet-name>action</servlet-name>
<url-pattern>*.do</url-pattern>
</servlet-mapping>
<!-- The Usual Welcome File List -->
<welcome-file-list>
<welcome-file>index.jsp</welcome-file>

</welcome-file-list>
<!-- Struts Tag Library Descriptors -->
<jsp-config>
<taglib>
<taglib-uri>/tags/struts-bean</taglib-uri>
<taglib-location>/WEB-INF/struts-bean.tld</taglib-location>
</taglib>
<taglib>
<taglib-uri>/tags/struts-html</taglib-uri>
<taglib-location>/WEB-INF/struts-html.tld</taglib-location>
</taglib>
<taglib>
<taglib-uri>/tags/struts-logic</taglib-uri>
<taglib-location>/WEB-INF/struts-logic.tld</taglib-location>
</taglib>
<taglib>
<taglib-uri>/tags/struts-nested</taglib-uri>
<taglib-location>/WEB-INF/struts-nested.tld</taglib-location>
</taglib>

<taglib>
<taglib-uri>/tags/struts-tiles</taglib-uri>
<taglib-location>/WEB-INF/struts-tiles.tld</taglib-location>
</taglib>
<taglib>
<taglib-uri>/tags/datetime</taglib-uri>
<taglib-location>/WEB-INF/datetime.tld</taglib-location>
</taglib>
<taglib>
<taglib-uri>/tags/tabs-taglib</taglib-uri>
<taglib-location>/WEB-INF/tabs-taglib.tld</taglib-location>
</taglib>
<taglib>
<taglib-uri>/tags/admin-widgets</taglib-uri>
<taglib-location>/WEB-INF/admin-widgets.tld</taglib-location>
</taglib>
<taglib>
<taglib-uri>http://java.sun.com/jsp/jstl/core</taglib-uri>
<taglib-location>http://java.sun.com/jsp/jstl/core</taglib-location> ;
</taglib>
</jsp-config>
</web-app>

In addition Eclipse is complaining about web-app element not able to be found.
Thanks for anyone's help!
John
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jun 20 2005
Added on May 23 2005
2 comments
124 views