>From the original note:

> Here's index.jsp:
> 
> <%@ page language="java" %>
> <%@ taglib prefix="c" uri="http://java.sun.com/jstl/core"; %>
> <html>
>     <head><title>JSPC Test</title></head>
>     <body><h1>Welcome to the JSPC test page</h1></body>
> </html>
> 
> Here's web.xml:
> 
> <?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>
>     <welcome-file-list>
>         <welcome-file>index.jsp</welcome-file>
>     </welcome-file-list>
> </web-app>

All I'm doing is referencing the taglib URI in the directive. Jasper
should be doing the work of generating the path through an implicit
taglib map entry, right? This does work when the app is actually run
within a container. Here are some of the args passed to the
TagLibraryInfoImpl constructor:

prefix:   c
uriIn:    http://java.sun.com/jstl/core
location: { /WEB-INF/lib/standard.jar, META-INF/c.tld }

And here's the test that causes the leading "/" to get stripped (path =
location[0] = /WEB-INF/lib/standard.jar):

if (ctxt.getClassLoader() != null &&
    URLClassLoader.class.equals(ctxt.getClassLoader().getClass()) &&
    path.startsWith("/"))

"Craig R. McClanahan" wrote:
> 
> On Fri, 9 Aug 2002, Kris Schneider wrote:
> 
> > Date: Fri, 09 Aug 2002 23:11:48 -0400
> > From: Kris Schneider <[EMAIL PROTECTED]>
> > Reply-To: Tomcat Users List <[EMAIL PROTECTED]>
> > To: Tomcat Users List <[EMAIL PROTECTED]>
> > Subject: Re: Command line jspc throws NPE for page using JSTL
> >
> > I mucked around with the Jasper source a bit to get some exception info
> > dumped:
> >
> > java.net.MalformedURLException: Path 'WEB-INF/lib/standard.jar' does not
> > start with '/'
> 
> Have you verified that your application's use of the path to the taglib
> URL, in web.xml or in a <%@ taglib %> directive of a JSP page, do not use
> this kind of invalid reference?
> 
> Craig
> 
> --
> To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

-- 
Kris Schneider <mailto:[EMAIL PROTECTED]>
D.O.Tech       <http://www.dotech.com/>

Attachment: smime.p7s
Description: S/MIME Cryptographic Signature

Reply via email to