You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Shelly Dhiman <sh...@is2inc.com> on 2001/04/04 20:12:59 UTC
Problem with Placing tlds out of WEB-INF
Hi:
I would really appreciate any help on this.
I want to get my tlds out of the WEB-inf directory and place all tlds in
the directory 'tld' that is 4 directories below WEB-inf. So i also
changed my web.xml so that taglib location for each tld was relative to
docroot
So if my docroot is /usr/local/test/fe/content/en_US and WEB-INF is
under this. I created a tld directory in /usr/local/test/fe/tld and put
all tlds in it.
And my web.xml
<taglib>
<taglib-uri>/WEB-INF/struts.tld</taglib-uri>
<taglib-location>/../../tld/struts.tld</taglib-location>
</taglib>
I'm getting the following error. Looks like its unable to locate
struts.jar. But if i craete tld directory within WEB-INF and have the
web.xml look like this it works
<taglib>
<taglib-uri>/WEB-INF/struts.tld</taglib-uri>
<taglib-location>/WEB-INF/tld/struts.tld</taglib-location>
</taglib>
Error: 500
Location: /cmc/home/CMCBody.jsp
Internal Servlet Error:
org.apache.jasper.compiler.CompileException:
/usr/local/cmc/fe/content/en_US/home/CMCBody.jsp(1,0) Unable to open
taglibrary /WEB-INF/struts-template.tld : Could not locate TLD
META-INF/taglib.tld
at
org.apache.jasper.compiler.JspParseEventListener.handleDirective(JspParseEventListener.java:713)
at
org.apache.jasper.compiler.DelegatingListener.handleDirective(DelegatingListener.java:116)
at
org.apache.jasper.compiler.Parser$Directive.accept(Parser.java:215)
at org.apache.jasper.compiler.Parser.parse(Parser.java:1077)
at org.apache.jasper.compiler.Parser.parse(Parser.java:1042)
at org.apache.jasper.compiler.Parser.parse(Parser.java:1038)
at
org.apache.jasper.compiler.Compiler.compile(Compiler.java:182)
at
org.apache.jasper.servlet.JspServlet.doLoadJSP(JspServlet.java:462)
at
org.apache.jasper.servlet.JasperLoader12.loadJSP(JasperLoader12.java:146)
at
org.apache.jasper.servlet.JspServlet.loadJSP(JspServlet.java:433)
at
org.apache.jasper.servlet.JspServlet$JspServletWrapper.loadIfNecessary(JspServlet.java:152)
at
org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.java:164)
at
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:318)
at
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:391)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at
org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:404)
at org.apache.tomcat.core.Handler.service(Handler.java:286)
at
org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372)
at
org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:797)
at
org.apache.tomcat.core.ContextManager.service(ContextManager.java:743)
at
org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(HttpConnectionHandler.java:210)
at
org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:416)
at
org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:498)
at java.lang.Thread.run(Thread.java:484)
Thanks for your help(in advance)
Shelly
Re: Problem with Placing tlds out of WEB-INF
Posted by Shelly Dhiman <sh...@is2inc.com>.
Thanks a ton for clarification on this.
Shelly
Ana Narvaez Vila wrote:
>
> *.tld's are resources of your aplication so you must put it under your
> root directory. WEB-INF directory contains your private files, those
> files will not be serve to the client. If you put the files out of
> WEB-INF but under your root directory they will be public and visible
> for anyone.
>
> Java Servlet Specification v2.2 defines a Web Aplication
>
> Shelly Dhiman wrote:
> >
> > Hi:
> >
> > I would really appreciate any help on this.
> >
> > I want to get my tlds out of the WEB-inf directory and place all tlds in
> > the directory 'tld' that is 4 directories below WEB-inf. So i also
> > changed my web.xml so that taglib location for each tld was relative to
> > docroot
> > So if my docroot is /usr/local/test/fe/content/en_US and WEB-INF is
> > under this. I created a tld directory in /usr/local/test/fe/tld and put
> > all tlds in it.
> > And my web.xml
> > <taglib>
> > <taglib-uri>/WEB-INF/struts.tld</taglib-uri>
> > <taglib-location>/../../tld/struts.tld</taglib-location>
> > </taglib>
> >
> > I'm getting the following error. Looks like its unable to locate
> > struts.jar. But if i craete tld directory within WEB-INF and have the
> > web.xml look like this it works
> > <taglib>
> > <taglib-uri>/WEB-INF/struts.tld</taglib-uri>
> > <taglib-location>/WEB-INF/tld/struts.tld</taglib-location>
> > </taglib>
> >
> > Error: 500
> >
> > Location: /cmc/home/CMCBody.jsp
> >
> > Internal Servlet Error:
> >
> > org.apache.jasper.compiler.CompileException:
> > /usr/local/cmc/fe/content/en_US/home/CMCBody.jsp(1,0) Unable to open
> > taglibrary /WEB-INF/struts-template.tld : Could not locate TLD
> > META-INF/taglib.tld
> > at
> > org.apache.jasper.compiler.JspParseEventListener.handleDirective(JspParseEventListener.java:713)
> > at
> > org.apache.jasper.compiler.DelegatingListener.handleDirective(DelegatingListener.java:116)
> > at
> > org.apache.jasper.compiler.Parser$Directive.accept(Parser.java:215)
> > at org.apache.jasper.compiler.Parser.parse(Parser.java:1077)
> > at org.apache.jasper.compiler.Parser.parse(Parser.java:1042)
> > at org.apache.jasper.compiler.Parser.parse(Parser.java:1038)
> > at
> > org.apache.jasper.compiler.Compiler.compile(Compiler.java:182)
> > at
> > org.apache.jasper.servlet.JspServlet.doLoadJSP(JspServlet.java:462)
> > at
> > org.apache.jasper.servlet.JasperLoader12.loadJSP(JasperLoader12.java:146)
> > at
> > org.apache.jasper.servlet.JspServlet.loadJSP(JspServlet.java:433)
> > at
> > org.apache.jasper.servlet.JspServlet$JspServletWrapper.loadIfNecessary(JspServlet.java:152)
> > at
> > org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.java:164)
> > at
> > org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:318)
> > at
> > org.apache.jasper.servlet.JspServlet.service(JspServlet.java:391)
> > at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
> > at
> > org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:404)
> > at org.apache.tomcat.core.Handler.service(Handler.java:286)
> > at
> > org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372)
> > at
> > org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:797)
> > at
> > org.apache.tomcat.core.ContextManager.service(ContextManager.java:743)
> > at
> > org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(HttpConnectionHandler.java:210)
> > at
> > org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:416)
> > at
> > org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:498)
> > at java.lang.Thread.run(Thread.java:484)
> >
> > Thanks for your help(in advance)
> > Shelly
> ------------------------------------------------------------------
> This email is confidential and intended solely for the use of the individual to whom it is addressed. Any views or opinions presented are solely those of the author and do not necessarily represent those of Sema Group.
> If you are not the intended recipient, be advised that you have received this email in error and that any use, dissemination, forwarding, printing, or copying of this email is strictly prohibited.
> ------------------------------------------------------------------
Re: Problem with Placing tlds out of WEB-INF
Posted by Ana Narvaez Vila <an...@sema.es>.
*.tld's are resources of your aplication so you must put it under your
root directory. WEB-INF directory contains your private files, those
files will not be serve to the client. If you put the files out of
WEB-INF but under your root directory they will be public and visible
for anyone.
Java Servlet Specification v2.2 defines a Web Aplication
Shelly Dhiman wrote:
>
> Hi:
>
> I would really appreciate any help on this.
>
> I want to get my tlds out of the WEB-inf directory and place all tlds in
> the directory 'tld' that is 4 directories below WEB-inf. So i also
> changed my web.xml so that taglib location for each tld was relative to
> docroot
> So if my docroot is /usr/local/test/fe/content/en_US and WEB-INF is
> under this. I created a tld directory in /usr/local/test/fe/tld and put
> all tlds in it.
> And my web.xml
> <taglib>
> <taglib-uri>/WEB-INF/struts.tld</taglib-uri>
> <taglib-location>/../../tld/struts.tld</taglib-location>
> </taglib>
>
> I'm getting the following error. Looks like its unable to locate
> struts.jar. But if i craete tld directory within WEB-INF and have the
> web.xml look like this it works
> <taglib>
> <taglib-uri>/WEB-INF/struts.tld</taglib-uri>
> <taglib-location>/WEB-INF/tld/struts.tld</taglib-location>
> </taglib>
>
> Error: 500
>
> Location: /cmc/home/CMCBody.jsp
>
> Internal Servlet Error:
>
> org.apache.jasper.compiler.CompileException:
> /usr/local/cmc/fe/content/en_US/home/CMCBody.jsp(1,0) Unable to open
> taglibrary /WEB-INF/struts-template.tld : Could not locate TLD
> META-INF/taglib.tld
> at
> org.apache.jasper.compiler.JspParseEventListener.handleDirective(JspParseEventListener.java:713)
> at
> org.apache.jasper.compiler.DelegatingListener.handleDirective(DelegatingListener.java:116)
> at
> org.apache.jasper.compiler.Parser$Directive.accept(Parser.java:215)
> at org.apache.jasper.compiler.Parser.parse(Parser.java:1077)
> at org.apache.jasper.compiler.Parser.parse(Parser.java:1042)
> at org.apache.jasper.compiler.Parser.parse(Parser.java:1038)
> at
> org.apache.jasper.compiler.Compiler.compile(Compiler.java:182)
> at
> org.apache.jasper.servlet.JspServlet.doLoadJSP(JspServlet.java:462)
> at
> org.apache.jasper.servlet.JasperLoader12.loadJSP(JasperLoader12.java:146)
> at
> org.apache.jasper.servlet.JspServlet.loadJSP(JspServlet.java:433)
> at
> org.apache.jasper.servlet.JspServlet$JspServletWrapper.loadIfNecessary(JspServlet.java:152)
> at
> org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.java:164)
> at
> org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:318)
> at
> org.apache.jasper.servlet.JspServlet.service(JspServlet.java:391)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
> at
> org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:404)
> at org.apache.tomcat.core.Handler.service(Handler.java:286)
> at
> org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372)
> at
> org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:797)
> at
> org.apache.tomcat.core.ContextManager.service(ContextManager.java:743)
> at
> org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(HttpConnectionHandler.java:210)
> at
> org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:416)
> at
> org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:498)
> at java.lang.Thread.run(Thread.java:484)
>
> Thanks for your help(in advance)
> Shelly
------------------------------------------------------------------
This email is confidential and intended solely for the use of the individual to whom it is addressed. Any views or opinions presented are solely those of the author and do not necessarily represent those of Sema Group.
If you are not the intended recipient, be advised that you have received this email in error and that any use, dissemination, forwarding, printing, or copying of this email is strictly prohibited.
------------------------------------------------------------------