mbf-it
asked on
taglib directive does not exist or TLD is not found
I am using Java 1.4.2 in eclipse and I am getting the following errors with my .jsp pages:
taglib directive for "html" does not exist or TLD is not found
taglib directive for "bean" does not exist or TLD is not found
taglib directive for "logic" does not exist or TLD is not found
The program still works, but for some reason, eclipse is not recognising the lines of code:
<%@ taglib uri="/tags/struts-bean" prefix="bean" %>
<%@ taglib uri="/tags/struts-html" prefix="html" %>
<%@ taglib uri="/tags/struts-logic" prefix="logic" %>
I'm not sure why these errors are popping up????
Cheers
taglib directive for "html" does not exist or TLD is not found
taglib directive for "bean" does not exist or TLD is not found
taglib directive for "logic" does not exist or TLD is not found
The program still works, but for some reason, eclipse is not recognising the lines of code:
<%@ taglib uri="/tags/struts-bean" prefix="bean" %>
<%@ taglib uri="/tags/struts-html" prefix="html" %>
<%@ taglib uri="/tags/struts-logic" prefix="logic" %>
I'm not sure why these errors are popping up????
Cheers
ASKER
My web.xml file has the following:
-------------------------- ---------- ---------- ---------- -----
<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE web-app PUBLIC
"-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
"http://java.sun.com/dtd/web-app_2_3.dtd">
<web-app>
<display-name>Struts Blank Application</display-name>
<!--
- Location of the XML file that defines the root application context.
- Applied by ContextLoaderServlet.
-
- Can include "/WEB-INF/dataAccessContex t-local.xm l" for a single-database
- context, or "/WEB-INF/dataAccessContex t-jta.xml" for a two-database context.
-->
<context-param>
<param-name>contextConfigL ocation</p aram-name>
<param-value>
/WEB-INF/greenbook-data.xm l
</param-value>
</context-param>
<!--
- Loads the root application context of this web app at startup,
- by default from "/WEB-INF/applicationConte xt.xml".
- Note that you need to fall back to Spring's ContextLoaderServlet for
- J2EE servers that do not follow the Servlet 2.4 initialization order.
-
- Use WebApplicationContextUtils .getWebApp licationCo ntext(serv letContext )
- to access it anywhere in the web application, outside of the framework.
-
- The root context is the parent of all servlet-specific contexts.
- This means that its beans are automatically available in these child contexts,
- both for getBean(name) calls and (external) bean references.
-->
<listener>
<listener-class>org.spring framework. web.contex t.ContextL oaderListe ner</liste ner-class>
</listener>
<!-- Standard Action Servlet Configuration (with debugging) -->
<servlet>
<servlet-name>action</serv let-name>
<servlet-class>org.apache. struts.act ion.Action Servlet</s ervlet-cla ss>
<init-param>
<param-name>config</param- name>
<param-value>/WEB-INF/stru ts-config. xml</param -value>
</init-param>
<init-param>
<param-name>debug</param-n ame>
<param-value>2</param-valu e>
</init-param>
<init-param>
<param-name>detail</param- name>
<param-value>2</param-valu e>
</init-param>
<load-on-startup>2</load-o n-startup>
</servlet>
<!-- Standard Action Servlet Mapping -->
<servlet-mapping>
<servlet-name>action</serv let-name>
<url-pattern>*.do</url-pat tern>
</servlet-mapping>
<!-- The Usual Welcome File List -->
<welcome-file-list>
<welcome-file>index.jsp</w elcome-fil e>
</welcome-file-list>
<!-- Application Tag Library Descriptor -->
<taglib>
<taglib-uri>/tags/app</tag lib-uri>
<taglib-location>/WEB-INF/ app.tld</t aglib-loca tion>
</taglib>
<!-- Struts Tag Library Descriptors -->
<taglib>
<taglib-uri>/tags/struts-b ean</tagli b-uri>
<taglib-location>/WEB-INF/ struts-bea n.tld</tag lib-locati on>
</taglib>
<taglib>
<taglib-uri>/tags/struts-h tml</tagli b-uri>
<taglib-location>/WEB-INF/ struts-htm l.tld</tag lib-locati on>
</taglib>
<taglib>
<taglib-uri>/tags/struts-l ogic</tagl ib-uri>
<taglib-location>/WEB-INF/ struts-log ic.tld</ta glib-locat ion>
</taglib>
<taglib>
<taglib-uri>/tags/struts-n ested</tag lib-uri>
<taglib-location>/WEB-INF/ struts-nes ted.tld</t aglib-loca tion>
</taglib>
<taglib>
<taglib-uri>/tags/struts-t iles</tagl ib-uri>
<taglib-location>/WEB-INF/ struts-til es.tld</ta glib-locat ion>
</taglib>
</web-app>
-------------------------- ---------- ---------- ---------- -----
Is that what you mean? Shouldn't that work???
--------------------------
<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE web-app PUBLIC
"-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
"http://java.sun.com/dtd/web-app_2_3.dtd">
<web-app>
<display-name>Struts Blank Application</display-name>
<!--
- Location of the XML file that defines the root application context.
- Applied by ContextLoaderServlet.
-
- Can include "/WEB-INF/dataAccessContex
- context, or "/WEB-INF/dataAccessContex
-->
<context-param>
<param-name>contextConfigL
<param-value>
/WEB-INF/greenbook-data.xm
</param-value>
</context-param>
<!--
- Loads the root application context of this web app at startup,
- by default from "/WEB-INF/applicationConte
- Note that you need to fall back to Spring's ContextLoaderServlet for
- J2EE servers that do not follow the Servlet 2.4 initialization order.
-
- Use WebApplicationContextUtils
- to access it anywhere in the web application, outside of the framework.
-
- The root context is the parent of all servlet-specific contexts.
- This means that its beans are automatically available in these child contexts,
- both for getBean(name) calls and (external) bean references.
-->
<listener>
<listener-class>org.spring
</listener>
<!-- Standard Action Servlet Configuration (with debugging) -->
<servlet>
<servlet-name>action</serv
<servlet-class>org.apache.
<init-param>
<param-name>config</param-
<param-value>/WEB-INF/stru
</init-param>
<init-param>
<param-name>debug</param-n
<param-value>2</param-valu
</init-param>
<init-param>
<param-name>detail</param-
<param-value>2</param-valu
</init-param>
<load-on-startup>2</load-o
</servlet>
<!-- Standard Action Servlet Mapping -->
<servlet-mapping>
<servlet-name>action</serv
<url-pattern>*.do</url-pat
</servlet-mapping>
<!-- The Usual Welcome File List -->
<welcome-file-list>
<welcome-file>index.jsp</w
</welcome-file-list>
<!-- Application Tag Library Descriptor -->
<taglib>
<taglib-uri>/tags/app</tag
<taglib-location>/WEB-INF/
</taglib>
<!-- Struts Tag Library Descriptors -->
<taglib>
<taglib-uri>/tags/struts-b
<taglib-location>/WEB-INF/
</taglib>
<taglib>
<taglib-uri>/tags/struts-h
<taglib-location>/WEB-INF/
</taglib>
<taglib>
<taglib-uri>/tags/struts-l
<taglib-location>/WEB-INF/
</taglib>
<taglib>
<taglib-uri>/tags/struts-n
<taglib-location>/WEB-INF/
</taglib>
<taglib>
<taglib-uri>/tags/struts-t
<taglib-location>/WEB-INF/
</taglib>
</web-app>
--------------------------
Is that what you mean? Shouldn't that work???
yes, it's ok.
check whether the tld files exist on your application server under the WEB-INF directory.
would you show the full stack trace exception?
check whether the tld files exist on your application server under the WEB-INF directory.
would you show the full stack trace exception?
ASKER
yes - all the files are there...
what do you mean by full stack trace exception??? how do I show that???
what do you mean by full stack trace exception??? how do I show that???
I meant the whole exception message.
for example if you are using Tomcat, you can copy the exception message from its console.
for example if you are using Tomcat, you can copy the exception message from its console.
ASKER
as i said, the program works so there is no error message so there is no other error message.
...i think it's a problem with eclipse...?
...i think it's a problem with eclipse...?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
you have to define it in deployment descriptor (web.xml)
<taglib>
<taglib-uri>/tags/struts-b
<taglib-location>/WEB-INF/
</taglib>