You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Hanasaki JiJi <ha...@hanaden.com> on 2002/12/06 17:50:22 UTC
Re: tld locations??? must be directly in WEB-INF - relates to Tomcat
xml parser bug
Attached is the xdoclet web.xml file that produces the below error. The
below references indicate that there may be a bug in the tomcat xml
parser that is exposed by the generated web.xml.
The struts tld files are copied directly form those in a working sample
from the jakarta struts download.
Thoughts? comments? The file looks ok to me.
Thanks.
Aleksandr Shneyderman wrote:
> make sure that
> <taglib-location>/WEB-INF/struts.tld</taglib-location>
>
> the /WEB-INF/ is important for some reason.
> it was working in 4.0.4 but gives a problem
> in 4.1.12
>
>
>>-----Original Message-----
>>From: Hanasaki JiJi [mailto:hanasaki@hanaden.com]
>>Sent: Friday, December 06, 2002 9:46 AM
>>To: tomcat-user@jakarta.apache.org
>>Subject: tld locations??? must be directly in WEB-INF
>>
>>
>>Am I reading the below error correctly? .tld must be in the WEB-INF dir
>>and not in any subdir of WEB-INF?
>>
>>I have put the struts tld's in /WEB-INF/struts/ and specified to find
>>them there in web.xml
>>
>>======================
>>
>>
>>2002-12-05 23:33:41 ContextConfig[/j2eetemplate] Exception processing
>>TLD at resource path /WEB-INF/struts/struts-nested.tld
>>javax.servlet.ServletException: Exception processing TLD at resource
>>path /WEB-INF/struts/struts-nested.tld
>> at
>>org.apache.catalina.startup.ContextConfig.tldScanTld(ContextConfig
>>.java:1010)
>> at
>>org.apache.catalina.startup.ContextConfig.tldScan(ContextConfig.java:870)
>> at
>>org.apache.catalina.startup.ContextConfig.start(ContextConfig.java:647)
>> at
>>org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextCo
>>nfig.java:243)
>>
>>...
>>
>>----- Root Cause -----
>>java.lang.IllegalArgumentException: Invalid TLD resource path
>>/WEB-INF/struts/struts-nested.tld
>> at
>>org.apache.catalina.startup.ContextConfig.tldScanTld(ContextConfig
>>.java:1002)
>> at
>>org.apache.catalina.startup.ContextConfig.tldScan(ContextConfig.java:870)
>> at
>>org.apache.catalina.startup.ContextConfig.start(ContextConfig.java:647)
>> at
>>org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextCo
>>nfig.java:243)
>> at
>>org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(Lifec
>>ycleSupport.java:166)
>>
>>
>>--
>>=================================================================
>>= Management is doing things right; leadership is doing the =
>>= right things. - Peter Drucker =
>>=_______________________________________________________________=
>>= http://www.sun.com/service/sunps/jdc/javacenter.pdf =
>>= www.sun.com | www.javasoft.com | http://wwws.sun.com/sunone =
>>=================================================================
>>
>>
>>
>>
>>--
>>To unsubscribe, e-mail:
>
> <ma...@jakarta.apache.org>
> For additional commands, e-mail:
> <ma...@jakarta.apache.org>
>
>
>
> --
> To unsubscribe, e-mail: <ma...@jakarta.apache.org>
> For additional commands, e-mail: <ma...@jakarta.apache.org>
>
--
=================================================================
= Management is doing things right; leadership is doing the =
= right things. - Peter Drucker =
=_______________________________________________________________=
= http://www.sun.com/service/sunps/jdc/javacenter.pdf =
= www.sun.com | www.javasoft.com | http://wwws.sun.com/sunone =
=================================================================
Re: tld locations??? must be directly in WEB-INF - relates to Tomcat xml parser bug
Posted by Bill Barker <wb...@wilshire.com>.
There is a bug in 4.1.12 where if you specify
<taglib-location>tlds/my-taglib.tld</taglib-location> it won't find your
taglib file.
Without checking, I think that is is fixed in 4.1.14+, but check the release
notes to be sure (certainly fixed in 4.1.16b).
"Hanasaki JiJi" <ha...@hanaden.com> wrote in message
news:3DF0D54E.3040202@hanaden.com...
> Attached is the xdoclet web.xml file that produces the below error. The
> below references indicate that there may be a bug in the tomcat xml
> parser that is exposed by the generated web.xml.
>
> The struts tld files are copied directly form those in a working sample
> from the jakarta struts download.
>
> Thoughts? comments? The file looks ok to me.
>
> Thanks.
>
> Aleksandr Shneyderman wrote:
> > make sure that
> > <taglib-location>/WEB-INF/struts.tld</taglib-location>
> >
> > the /WEB-INF/ is important for some reason.
> > it was working in 4.0.4 but gives a problem
> > in 4.1.12
> >
> >
> >>-----Original Message-----
> >>From: Hanasaki JiJi [mailto:hanasaki@hanaden.com]
> >>Sent: Friday, December 06, 2002 9:46 AM
> >>To: tomcat-user@jakarta.apache.org
> >>Subject: tld locations??? must be directly in WEB-INF
> >>
> >>
> >>Am I reading the below error correctly? .tld must be in the WEB-INF dir
> >>and not in any subdir of WEB-INF?
> >>
> >>I have put the struts tld's in /WEB-INF/struts/ and specified to find
> >>them there in web.xml
> >>
> >>======================
> >>
> >>
> >>2002-12-05 23:33:41 ContextConfig[/j2eetemplate] Exception processing
> >>TLD at resource path /WEB-INF/struts/struts-nested.tld
> >>javax.servlet.ServletException: Exception processing TLD at resource
> >>path /WEB-INF/struts/struts-nested.tld
> >> at
> >>org.apache.catalina.startup.ContextConfig.tldScanTld(ContextConfig
> >>.java:1010)
> >> at
>
>>org.apache.catalina.startup.ContextConfig.tldScan(ContextConfig.java:870)
> >> at
> >>org.apache.catalina.startup.ContextConfig.start(ContextConfig.java:647)
> >> at
> >>org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextCo
> >>nfig.java:243)
> >>
> >>...
> >>
> >>----- Root Cause -----
> >>java.lang.IllegalArgumentException: Invalid TLD resource path
> >>/WEB-INF/struts/struts-nested.tld
> >> at
> >>org.apache.catalina.startup.ContextConfig.tldScanTld(ContextConfig
> >>.java:1002)
> >> at
>
>>org.apache.catalina.startup.ContextConfig.tldScan(ContextConfig.java:870)
> >> at
> >>org.apache.catalina.startup.ContextConfig.start(ContextConfig.java:647)
> >> at
> >>org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextCo
> >>nfig.java:243)
> >> at
> >>org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(Lifec
> >>ycleSupport.java:166)
> >>
> >>
> >>--
> >>=================================================================
> >>= Management is doing things right; leadership is doing the =
> >>= right things. - Peter Drucker =
> >>=_______________________________________________________________=
> >>= http://www.sun.com/service/sunps/jdc/javacenter.pdf =
> >>= www.sun.com | www.javasoft.com | http://wwws.sun.com/sunone =
> >>=================================================================
> >>
> >>
> >>
> >>
> >>--
> >>To unsubscribe, e-mail:
> >
> > <ma...@jakarta.apache.org>
> > For additional commands, e-mail:
> > <ma...@jakarta.apache.org>
> >
> >
> >
> > --
> > To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
> > For additional commands, e-mail:
<ma...@jakarta.apache.org>
> >
>
> --
> =================================================================
> = Management is doing things right; leadership is doing the =
> = right things. - Peter Drucker =
> =_______________________________________________________________=
> = http://www.sun.com/service/sunps/jdc/javacenter.pdf =
> = www.sun.com | www.javasoft.com | http://wwws.sun.com/sunone =
> =================================================================
>
----------------------------------------------------------------------------
----
> <?xml version="1.0" encoding="UTF-8"?>
> <!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 >
>
> <!-- Standard Action Servlet Configuration (with debugging) -->
> <servlet>
> <servlet-name>strutsAction</servlet-name>
> <servlet-class>org.apache.struts.action.ActionServlet</servlet-class>
> <init-param>
> <param-name>config</param-name>
> <param-value>/WEB-INF/struts/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>
> <load-on-startup>2</load-on-startup>
> </servlet>
>
> <servlet>
> <servlet-name>TestServlet</servlet-name>
> <display-name>test servlet display name</display-name>
> <description><![CDATA[desc of testservlet]]></description>
> <servlet-class>com.web.TestServlet</servlet-class>
>
> </servlet>
>
> <servlet-mapping>
> <servlet-name>TestServlet</servlet-name>
> <url-pattern>*.test</url-pattern>
> </servlet-mapping>
>
> <session-config>
> <session-timeout>5</session-timeout>
> </session-config>
>
> <!--
> To specify mime mappings, create a file named mime-mappings.xml, put it
in your project's mergedir.
> Organize mime-mappings.xml following this DTD slice:
>
> <!ELEMENT mime-mapping (extension, mime-type)>
> -->
>
> <!--
> To specify error pages, create a file named error-pages.xml, put it in
your project's mergedir.
> Organize error-pages.xml following this DTD slice:
>
> <!ELEMENT error-page ((error-code | exception-type), location)>
> -->
>
> <!-- Struts Tag Library Descriptors -->
> <taglib>
> <taglib-uri>/WEB-INF/struts-bean</taglib-uri>
> <taglib-location>/WEB-INF/struts-bean.tld</taglib-location>
> </taglib>
>
> <taglib>
> <taglib-uri>/WEB-INF/strutsstruts-html</taglib-uri>
> <taglib-location>/WEB-INF/strutsstruts-html.tld</taglib-location>
> </taglib>
>
> <taglib>
> <taglib-uri>/WEB-INF/strutsstruts-logic</taglib-uri>
> <taglib-location>/WEB-INF/strutsstruts-logic.tld</taglib-location>
> </taglib>
>
> <taglib>
> <taglib-uri>/WEB-INF/strutsstruts-nested</taglib-uri>
> <taglib-location>/WEB-INF/strutsstruts-nested.tld</taglib-location>
> </taglib>
>
> <taglib>
> <taglib-uri>/WEB-INF/strutsstruts-tiles</taglib-uri>
> <taglib-location>/WEB-INF/struts-tiles.tld</taglib-location>
> </taglib>
>
> <!--
> To set up security settings for your web app, create a file named
web-security.xml, put it in your project's merge
> dir.
> Organize web-security.xml following this DTD slice:
>
> <!ELEMENT security-constraint (display-name?, web-resource-collection+,
auth-constraint?, user-data-constraint?)>
> <!ELEMENT web-resource-collection (web-resource-name, description?,
url-pattern*, http-method*)>
> <!ELEMENT web-resource-name (#PCDATA)>
> <!ELEMENT url-pattern (#PCDATA)>
> <!ELEMENT http-method (#PCDATA)>
> <!ELEMENT user-data-constraint (description?, transport-guarantee)>
> <!ELEMENT transport-guarantee (#PCDATA)>
>
> <!ELEMENT login-config (auth-method?, realm-name?, form-login-config?)>
> <!ELEMENT auth-method (#PCDATA)>
> <!ELEMENT realm-name (#PCDATA)>
> <!ELEMENT form-login-config (form-login-page, form-error-page)>
> <!ELEMENT form-login-page (#PCDATA)>
> <!ELEMENT form-error-page (#PCDATA)>
> -->
>
> </web-app>
>
>
----------------------------------------------------------------------------
----
> --
> To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
> For additional commands, e-mail:
<ma...@jakarta.apache.org>
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
RE: tld locations??? must be directly in WEB-INF - relates to Tomcat xml parser bug
Posted by Aleksandr Shneyderman <al...@law.columbia.edu>.
First of all take all of your struts tlds and put
them directly into WEB-INF directory
your dir structure will be
WEB-INF\
struts-bean.tld
struts-html.tld
struts-logic.tld
struts-nested.tld
struts-tiles.tld
now fix your web.xml
as folows
- <taglib>
<taglib-uri>struts-bean</taglib-uri>
<taglib-location>/WEB-INF/struts-bean.tld</taglib-location>
</taglib>
- <taglib>
<taglib-uri>struts-html</taglib-uri>
<taglib-location>/WEB-INF/struts-html.tld</taglib-location>
</taglib>
- <taglib>
<taglib-uri>struts-logic</taglib-uri>
<taglib-location>/WEB-INF/struts-logic.tld</taglib-location>
</taglib>
- <taglib>
<taglib-uri>struts-nested</taglib-uri>
<taglib-location>/WEB-INF/struts-nested.tld</taglib-location>
</taglib>
- <taglib>
<taglib-uri>struts-tiles</taglib-uri>
<taglib-location>/WEB-INF/struts-tiles.tld</taglib-location>
</taglib>
and lastly,
why don't you read the struts documentation?
Alex.
> -----Original Message-----
> From: Hanasaki JiJi [mailto:hanasaki@hanaden.com]
> Sent: Friday, December 06, 2002 11:50 AM
> To: Tomcat Users List
> Subject: Re: tld locations??? must be directly in WEB-INF - relates to
> Tomcat xml parser bug
>
>
> Attached is the xdoclet web.xml file that produces the below error. The
> below references indicate that there may be a bug in the tomcat xml
> parser that is exposed by the generated web.xml.
>
> The struts tld files are copied directly form those in a working sample
> from the jakarta struts download.
>
> Thoughts? comments? The file looks ok to me.
>
> Thanks.
>
> Aleksandr Shneyderman wrote:
> > make sure that
> > <taglib-location>/WEB-INF/struts.tld</taglib-location>
> >
> > the /WEB-INF/ is important for some reason.
> > it was working in 4.0.4 but gives a problem
> > in 4.1.12
> >
> >
> >>-----Original Message-----
> >>From: Hanasaki JiJi [mailto:hanasaki@hanaden.com]
> >>Sent: Friday, December 06, 2002 9:46 AM
> >>To: tomcat-user@jakarta.apache.org
> >>Subject: tld locations??? must be directly in WEB-INF
> >>
> >>
> >>Am I reading the below error correctly? .tld must be in the WEB-INF dir
> >>and not in any subdir of WEB-INF?
> >>
> >>I have put the struts tld's in /WEB-INF/struts/ and specified to find
> >>them there in web.xml
> >>
> >>======================
> >>
> >>
> >>2002-12-05 23:33:41 ContextConfig[/j2eetemplate] Exception processing
> >>TLD at resource path /WEB-INF/struts/struts-nested.tld
> >>javax.servlet.ServletException: Exception processing TLD at resource
> >>path /WEB-INF/struts/struts-nested.tld
> >> at
> >>org.apache.catalina.startup.ContextConfig.tldScanTld(ContextConfig
> >>.java:1010)
> >> at
> >>org.apache.catalina.startup.ContextConfig.tldScan(ContextConfig.
> java:870)
> >> at
> >>org.apache.catalina.startup.ContextConfig.start(ContextConfig.java:647)
> >> at
> >>org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextCo
> >>nfig.java:243)
> >>
> >>...
> >>
> >>----- Root Cause -----
> >>java.lang.IllegalArgumentException: Invalid TLD resource path
> >>/WEB-INF/struts/struts-nested.tld
> >> at
> >>org.apache.catalina.startup.ContextConfig.tldScanTld(ContextConfig
> >>.java:1002)
> >> at
> >>org.apache.catalina.startup.ContextConfig.tldScan(ContextConfig.
> java:870)
> >> at
> >>org.apache.catalina.startup.ContextConfig.start(ContextConfig.java:647)
> >> at
> >>org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextCo
> >>nfig.java:243)
> >> at
> >>org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(Lifec
> >>ycleSupport.java:166)
> >>
> >>
> >>--
> >>=================================================================
> >>= Management is doing things right; leadership is doing the =
> >>= right things. - Peter Drucker =
> >>=_______________________________________________________________=
> >>= http://www.sun.com/service/sunps/jdc/javacenter.pdf =
> >>= www.sun.com | www.javasoft.com | http://wwws.sun.com/sunone =
> >>=================================================================
> >>
> >>
> >>
> >>
> >>--
> >>To unsubscribe, e-mail:
> >
> > <ma...@jakarta.apache.org>
> > For additional commands, e-mail:
> > <ma...@jakarta.apache.org>
> >
> >
> >
> > --
> > To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
> For additional commands, e-mail:
<ma...@jakarta.apache.org>
>
--
=================================================================
= Management is doing things right; leadership is doing the =
= right things. - Peter Drucker =
=_______________________________________________________________=
= http://www.sun.com/service/sunps/jdc/javacenter.pdf =
= www.sun.com | www.javasoft.com | http://wwws.sun.com/sunone =
=================================================================
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>