You are viewing a plain text version of this content. The canonical link for it is here.
Posted to taglibs-user@tomcat.apache.org by Rahul Akolkar <ra...@gmail.com> on 2007/12/16 18:06:46 UTC

Re: TagLib error in web.xml

Please do not send user list email to taglibs-user-owner. Please
subscribe to the taglibs user list (if you haven't already) and send
emails to the list, see:

  http://jakarta.apache.org/site/mail2.html#Taglibs

See reply below --


On 12/12/07, d s <mi...@yahoo.com> wrote:
>
> Hi,
>
> I'm a newbie at TagLib. I hope this is the right forum for this.
>
> I would like to have a JSP page that can take XSLT.
> I'm using JBOSS and Myeclipse, jre1.6
>
> The problem I have at the moment is the web.xml have an error when I put
>   <taglib>
>     http://jakarta.apache.org/taglibs/xsl-1.0
>
> <taglib-location>/WEB-INF/taglibs-xsl.tld</taglib-location>
>   </taglib>
>
<snip/>

The XSL taglib is JSP 1.1 (Servlet 2.2), however the web.xml below
seems to be refering to the Servlet 2.4 schema (where there is no
longer any need to have <taglib> declarations in the web.xml anymore).

You could try to fix that, however, note that the XSL taglib is
deprecated (as noted on the Jakarta Taglibs site). I'd recommend
taking a close looking at the Standard taglib:

  http://jakarta.apache.org/taglibs/doc/standard-doc/intro.html

In particular, <xml:transform> from the Standard taglib may be useful.

-Rahul



> Here's the error:
> cvc-complex-type.2.4.a: Invalid content was found starting with element
> 'taglib'. One of '{"http://java.sun.com/xml/ns/j2ee":description,
> "http://java.sun.com/xml/ns/j2ee":display-name,
> "http://java.sun.com/xml/ns/j2ee":icon,
> "http://java.sun.com/xml/ns/j2ee":distributable,
> "http://java.sun.com/xml/ns/j2ee":context-param,
> "http://java.sun.com/xml/ns/j2ee":filter,
> "http://java.sun.com/xml/ns/j2ee":filter-mapping,
> "http://java.sun.com/xml/ns/j2ee":listener,
> "http://java.sun.com/xml/ns/j2ee":servlet,
> "http://java.sun.com/xml/ns/j2ee":servlet-mapping,
> "http://java.sun.com/xml/ns/j2ee":session-config,
> "http://java.sun.com/xml/ns/j2ee":mime-mapping,
> "http://java.sun.com/xml/ns/j2ee":welcome-file-list,
> "http://java.sun.com/xml/ns/j2ee":error-page,
> "http://java.sun.com/xml/ns/j2ee":jsp-config,
> "http://java.sun.com/xml/ns/j2ee":security-constraint,
> "http://java.sun.com/xml/ns/j2ee":login-config,
> "http://java.sun.com/xml/ns/j2ee":security-role,
> "http://java.sun.com/xml/ns/j2ee":env-entry,
> "http://java.sun.com/xml/ns/j2ee":ejb-ref,
> "http://java.sun.com/xml/ns/j2ee":ejb-local-ref,
> "http://java.sun.com/xml/ns/j2ee":service-ref,
> "http://java.sun.com/xml/ns/j2ee":resource-ref,
> "http://java.sun.com/xml/ns/j2ee":resource-env-ref,
> "http://java.sun.com/xml/ns/j2ee":message-destination-ref,
> "http://java.sun.com/xml/ns/j2ee":message-destination,
> "http://java.sun.com/xml/ns/j2ee":locale-encoding-mapping-list}'
> is
> expected. RealTimeApp/WebRoot/WEB-INF web.xml
>
> Below is my jsp.
>
> <%@ taglib uri="http://jakarta.apache.org/taglibs/xsl-1.0"
>  prefix="xsl" %>
>   <html>
> <head><title>Phone Book</title></head>
> <body>
>   <xsl:InsertWithXSL  xml="/data/book.xml" xsl="/data/book.xsl" />
>
>   <table>
>   <tr>
>   <td bgcolor="#99CC99">&nbsp;&nbsp;&nbsp;&nbsp;</td>
>   <td><em>Nomal Time</em></td>
>   </tr>
>   <tr>
>   <td bgcolor="666633">&nbsp;&nbsp;&nbsp;&nbsp;</td>
>   <td><em>Real Time</em></td>
>   </tr>
>   </table>
>   </body>
> </html>
>
> Does anyone tell me what did i do wrong?
>
> Cheers,
>

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