tomcat-taglibs-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Henri Yandell <bay...@generationjava.com>
Subject Re: Need Help Getting Taglibs Working
Date Tue, 15 Jul 2003 14:18:46 GMT

WEB-INF/ should look akin to:
c.tld    fmt.tld  log4j.properties  sql.tld          taglibs-string.tld  x.tld
classes  lib      taglibs-log.tld  web.xml

WEB-INF/lib should look akin to:

commons-lang-1.0.jar  jdbc2_0-stdext.jar  saxpath.jar         xalan.jar
dom.jar               jstl.jar            standard.jar        xercesImpl.jar
jaxen-full.jar        log4j-1.2.7.jar     taglibs-log.jar
jaxp-api.jar          sax.jar             taglibs-string.jar

taglibs-string pulls in the commons-lang requirement and taglibs-log pulls
in the log4j requirement, but I thought I'd include them as good marketing :)

web.xml should contain bits like:

<!-- setting up the jstl data source -->
<context-param>
    <param-name>javax.servlet.jsp.jstl.sql.dataSource</param-name>
    <param-value>jdbc/TimeTrackerDS</param-value>
</context-param>

<!-- setting up a jakarta taglib -->
<taglib>
    <taglib-uri>http://jakarta.apache.org/taglibs/string-1.0</taglib-uri>
    <taglib-location>/WEB-INF/taglibs-string.tld</taglib-location>
</taglib>

<!-- setting up one of the jstl taglibs. you need 4 of these -->
<taglib>
    <taglib-uri>http://java.sun.com/jstl/core</taglib-uri>
    <taglib-location>/WEB-INF/c.tld</taglib-location>
</taglib>

I think the taglib-uri's change for jstl 1.1.

Hen

On Tue, 15 Jul 2003, C F wrote:

> Hello,
> I tried for many hours to get Taglibs working with Tomcat.  I'm at my wit's end!!!!!
 Hopefully someone here can help.
>
> I'm using Tomcat tomcat-4.1.24 and jakarta-taglibs-20030713 nightly build.  I'm trying
to get the standard JSTL 1.0 tags working.
> When I copy the jars from standard-1.0\lib into my WEB-INF\lib.  I get a bunch of errors
starting up when Tomcat (partial stack trace at the bottom of this message).
> When I don't do the jars and I just copy the tld files from standard-1.0\tld into my
WEB-INF directory and put the <tablib> entries into the web.xml.... I don't get any
errors at Tomcat startup but when I try to use the JSTL tags such as <c:out/>, I get
a message saying that it can't find the "out" class!
> I've seen about 3 or 4 different versions of installations directions floating around
for TagLibs and I think I've tried every combination of all of them.  I'm out of ideas. Help!
 Thanks!!!
>
> ===============================================================
>
>
>
>
>
> Using CATALINA_BASE:   C:\tomcat
> Using CATALINA_HOME:   C:\tomcat
> Using CATALINA_TMPDIR: C:\tomcat\temp
> Using JAVA_HOME:       C:\j2sdk1.4.1_02
> Jul 14, 2003 11:55:10 PM org.apache.commons.modeler.Registry loadRegistry
> INFO: Loading registry information
> Jul 14, 2003 11:55:11 PM org.apache.commons.modeler.Registry getRegistry
> INFO: Creating new Registry instance
> Jul 14, 2003 11:55:12 PM org.apache.commons.modeler.Registry getServer
> INFO: Creating MBeanServer
> Jul 14, 2003 11:55:15 PM org.apache.coyote.http11.Http11Protocol init
> INFO: Initializing Coyote HTTP/1.1 on port 8080
> Starting service Tomcat-Standalone
> Apache Tomcat/4.1.24
> Jul 14, 2003 11:55:31 PM org.apache.commons.digester.Digester error
> SEVERE: Parse Error at line 6 column 19: Document root element "taglib", must match DOCTYPE
root "null".
> org.xml.sax.SAXParseException: Document root element "taglib", must match DOCTYPE root
"null".
>         at org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(Unknown
Source)
>         at org.apache.xerces.util.ErrorHandlerWrapper.error(Unknown Source)
>         at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
>         at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
>         at org.apache.xerces.impl.dtd.XMLDTDValidator.rootElementSpecified(Unknown Source)
>         at org.apache.xerces.impl.dtd.XMLDTDValidator.handleStartElement(Unknown Source)
>         at org.apache.xerces.impl.dtd.XMLDTDValidator.startElement(Unknown Source)
>         at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanStartElement(Unknown
Source)
>         at org.apache.xerces.impl.XMLDocumentScannerImpl$ContentDispatcher.scanRootElementHook(Unknown
Source)
>         at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown
Source)
>         at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown
Source)
>         at org.apache.xerces.parsers.DTDConfiguration.parse(Unknown Source)
>         at org.apache.xerces.parsers.DTDConfiguration.parse(Unknown Source)
>         at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
>         at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
>         at org.apache.commons.digester.Digester.parse(Digester.java:1618)
>         at org.apache.catalina.startup.ContextConfig.tldScanStream(ContextConfig.java:977)
>         at org.apache.catalina.startup.ContextConfig.tldScanJar(ContextConfig.java:921)
>         at org.apache.catalina.startup.ContextConfig.tldScan(ContextConfig.java:868)
>         at org.apache.catalina.startup.ContextConfig.start(ContextConfig.java:647)
>         at org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:243)
>         at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:166)
>         at org.apache.catalina.core.StandardContext.start(StandardContext.java:3567)
>         at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1188)
>         at org.apache.catalina.core.StandardHost.start(StandardHost.java:738)
>         at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1188)
>         at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:347)
>         at org.apache.catalina.core.StandardService.start(StandardService.java:497)
>         at org.apache.catalina.core.StandardServer.start(StandardServer.java:2190)
>         at org.apache.catalina.startup.Catalina.start(Catalina.java:512)
>         at org.apache.catalina.startup.Catalina.execute(Catalina.java:400)
>         at org.apache.catalina.startup.Catalina.process(Catalina.java:180)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>         at java.lang.reflect.Method.invoke(Method.java:324)
>         at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:203)
> Jul 14, 2003 11:55:31 PM org.apache.commons.digester.Digester error
> SEVERE: Parse Error at line 6 column 19: Document is invalid: no grammar found.
> org.xml.sax.SAXParseException: Document is invalid: no grammar found.
>         at org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(Unknown
Source)
>         at org.apache.xerces.util.ErrorHandlerWrapper.error(Unknown Source)
>         at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
>         at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
>         at org.apache.xerces.impl.dtd.XMLDTDValidator.handleStartElement(Unknown Source)
>         at org.apache.xerces.impl.dtd.XMLDTDValidator.startElement(Unknown Source)
>         at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanStartElement(Unknown
Source)
>         at org.apache.xerces.impl.XMLDocumentScannerImpl$ContentDispatcher.scanRootElementHook(Unknown
Source)
>         at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown
Source)
>         at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown
Source)
>         at org.apache.xerces.parsers.DTDConfiguration.parse(Unknown Source)
>         at org.apache.xerces.parsers.DTDConfiguration.parse(Unknown Source)
>         at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
>         at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
>         at org.apache.commons.digester.Digester.parse(Digester.java:1618)
>         at org.apache.catalina.startup.ContextConfig.tldScanStream(ContextConfig.java:977)
>         at org.apache.catalina.startup.ContextConfig.tldScanJar(ContextConfig.java:921)
>         at org.apache.catalina.startup.ContextConfig.tldScan(ContextConfig.java:868)
>         at org.apache.catalina.startup.ContextConfig.start(ContextConfig.java:647)
>         at org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:243)
>         at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:166)
>         at org.apache.catalina.core.StandardContext.start(StandardContext.java:3567)
>         at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1188)
>         at org.apache.catalina.core.StandardHost.start(StandardHost.java:738)
>         at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1188)
>         at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:347)
>         at org.apache.catalina.core.StandardService.start(StandardService.java:497)
>         at org.apache.catalina.core.StandardServer.start(StandardServer.java:2190)
>         at org.apache.catalina.startup.Catalina.start(Catalina.java:512)
>         at org.apache.catalina.startup.Catalina.execute(Catalina.java:400)
>         at org.apache.catalina.startup.Catalina.process(Catalina.java:180)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>         at java.lang.reflect.Method.invoke(Method.java:324)
>         at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:203)
>
>
>
> ---------------------------------
> Do you Yahoo!?
> SBC Yahoo! DSL - Now only $29.95 per month!


---------------------------------------------------------------------
To unsubscribe, e-mail: taglibs-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: taglibs-user-help@jakarta.apache.org


Mime
View raw message