I'm still interested to hear if anyone's actually gotten verbose output to work. I tried configuring commons logging with log4j, but that didn't seem to have any impact.
So, two potential workarounds came to mind. Only one of them succeeded, but I think the one that failed uncovered another bug. Here's the one that failed: Keep taglib directive in JSP the same: <%@ taglib prefix="c" uri="http://java.sun.com/jstl/core" %> Add a taglib element to web.xml: <taglib> <taglib-uri>http://java.sun.com/jstl/core</taglib-uri> <taglib-location>/WEB-INF/tlds/c.tld</taglib-location> </taglib> Extract TLD from taglib JAR and place in /WEB-INF/tlds. This produces the same error with the same args passed to the TagLibraryInfoImpl ctor: prefix: c uriIn: http://java.sun.com/jstl/core location: { /WEB-INF/lib/standard.jar, META-INF/c.tld } This seems to indicate that Jasper is replacing explicit taglib map entries with implicit entries. According to the JSP 1.2 spec (JSP.7.3), implicit entries should only be added if the value of their taglib-uri is not already contained in the taglib map. With that in mind, here's what does seem to work: Modify the uri attribute of the taglib directive in JSP: <%@ taglib prefix="c" uri="/tlds/jstl/core" %> Add a taglib element to web.xml: <taglib> <taglib-uri>/tlds/jstl/core</taglib-uri> <taglib-location>/WEB-INF/tlds/c.tld</taglib-location> </taglib> Extract TLD from taglib JAR and place in /WEB-INF/tlds. This results in a clean run with the following args passed to the TagLibraryInfoImpl ctor: prefix: c uriIn: /tlds/jstl/core location: { /WEB-INF/tlds/c.tld, null } I guess the next step should be to submit these as bugs, but I thought I'd round out the thread in case anyone else runs into the same sort of problem... Quoting Kris Schneider <[EMAIL PROTECTED]>: > Problem's still there in 4.1.9. Is this something I should move to the > dev list? Has anyone gotten command line jspc to work for tag libraries > packaged similarly to JSTL? Struts demonstrates the same problem (same > web.xml): > > index.jsp: > > <%@ page language="java" %> > <%@ taglib prefix="struts-html" > uri="http://jakarta.apache.org/struts/tags-html-1.0.2" %> > <html> > <head><title>JSPC Test</title></head> > <body><h1>Welcome to the JSPC test page</h1></body> > </html> > > TagLibraryInfoImpl constructor args: > > prefix: struts-html > uriIn: http://jakarta.apache.org/struts/tags-html-1.0.2 > location: { /WEB-INF/lib/struts.jar, META-INF/tlds/struts-html.tld } > > Kris Schneider wrote: > > > > 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/> > > -- > Kris Schneider <mailto:[EMAIL PROTECTED]> > D.O.Tech <http://www.dotech.com/> -- Kris Schneider <mailto:[EMAIL PROTECTED]> D.O.Tech <http://www.dotech.com/> -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
