You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Jonathan Pierce <Jo...@seagram.com> on 2001/10/22 22:15:06 UTC

Re[2]: TagLibs in Tomcat4.0.1

Thanks Craig...

I figured it out after I sent the message to the list. I should have realized
that the XML elements needed to be in a specific order. I didn't see an example
taglib in the /conf/web.xml so it wasn't obvious to me at first.

Jonathan

____________________Reply Separator____________________
Subject:    Re: TagLibs in Tomcat4.0.1
Author: tomcat-user@jakarta.apache.org
Date:       10/22/2001 10:11 AM

This error is coming from the XML parser when reading your web.xml file.
It means that you have your elements out of order.  The required order is
listed after the "must match" part (i.e. <icon> must be first if it is
present, then <display-name>, and so on).

You didn't show your entire web.xml, but you definitely cannot put
<taglib> directives ahead of things like <servlet> or <servlet-mapping>.

Craig

On Mon, 22 Oct 2001, Jonathan Pierce wrote:

> Date: Mon, 22 Oct 2001 12:55:35 -0400
> From: Jonathan Pierce <Jo...@seagram.com>
> Reply-To: tomcat-user@jakarta.apache.org
> To: tomcat-user@jakarta.apache.org
> Subject: TagLibs in Tomcat4.0.1
>
> I'm trying to use tag libraries for the first time in Tomcat 4.0.1. I thought
> I'd try the io taglib first. I followed the instructions, and added the taglib
> element to the examples/WEB-INF/web.xml file as described in the
documentation,
> but I'm getting a SAX parse error that I don't understand since the xml looks
> correct to me.
>
> The DTD looks correct, and the tag being complained about looks valid to me.
> What am I doing wrong here?
>
> My Tomcat4.0.1 \webapps\examples\WEB-INF\web.xml contains the following:
>
> <?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>
>
>     <taglib>
>         <taglib-uri>http://jakarta.apache.org/taglibs/io-1.0</taglib-uri>
>         <taglib-location>/WEB-INF/io.tld</taglib-location>
>     </taglib>
>
> ...
>
> </webapp>
>
> The error message I get is below: The taglib tag is mentioned in the error so
I
> don't understand what is wrong.
>
> Starting service Tomcat-Standalone
> Apache Tomcat/4.0.1
> PARSE error at line 284 column 11
> org.xml.sax.SAXParseException: The content of element type "web-app" must
match
> "(icon?,display-name?,description?,distributable?,context-param*,filter*,filte
r-
> mapping*,listener*,servlet*,servlet-mapping*,session-config?,mime-mapping*,wel
co
> me-file-list?,error-page*,taglib*,resource-env-ref*,resource-ref*,security-con
st
> raint*,login-config?,security-role*,env-entry*,ejb-ref*,ejb-local-ref*)".
> Starting service Tomcat-Apache
> Apache Tomcat/4.0.1
>
>
>


Does tomcat 3.2.1 handle checkboxes properly?

Posted by Brandon Cruz <bc...@norvax.com>.
I have a form that submits information to a bean.

When this page is a *.jsp form, checkboxes with the sam name and different
values do not return like they should.  If I have...
<input type=checkbox value=temp2 name=template>
<input type=checkbox value=temp3 name=template>

I should get template = temp2, temp3 when they are submitted.

This works properly when the page is *.html and the request is processed by
Apache, but does not work properly when the request is *.jsp and processed
by tomcat 3.2.1.

Anyone know how to get around this problem?

Thanks!

Brandon


Re[2]: TagLibs in Tomcat4.0.1

Posted by "Craig R. McClanahan" <cr...@apache.org>.

On Mon, 22 Oct 2001, Jonathan Pierce wrote:

> Date: Mon, 22 Oct 2001 16:15:06 -0400
> From: Jonathan Pierce <Jo...@seagram.com>
> Reply-To: tomcat-user@jakarta.apache.org
> To: tomcat-user@jakarta.apache.org, tomcat-user@jakarta.apache.org
> Subject: Re[2]: TagLibs in Tomcat4.0.1
>
> Thanks Craig...
>
> I figured it out after I sent the message to the list. I should have realized
> that the XML elements needed to be in a specific order. I didn't see an example
> taglib in the /conf/web.xml so it wasn't obvious to me at first.
>

There's an example of a <taglib> element in the web.xml file for the
examples web-app ($CATALINA_HOME/webapps/examples/WEB-INF/web.xml).

> Jonathan
>

Craig


> ____________________Reply Separator____________________
> Subject:    Re: TagLibs in Tomcat4.0.1
> Author: tomcat-user@jakarta.apache.org
> Date:       10/22/2001 10:11 AM
>
> This error is coming from the XML parser when reading your web.xml file.
> It means that you have your elements out of order.  The required order is
> listed after the "must match" part (i.e. <icon> must be first if it is
> present, then <display-name>, and so on).
>
> You didn't show your entire web.xml, but you definitely cannot put
> <taglib> directives ahead of things like <servlet> or <servlet-mapping>.
>
> Craig
>
> On Mon, 22 Oct 2001, Jonathan Pierce wrote:
>
> > Date: Mon, 22 Oct 2001 12:55:35 -0400
> > From: Jonathan Pierce <Jo...@seagram.com>
> > Reply-To: tomcat-user@jakarta.apache.org
> > To: tomcat-user@jakarta.apache.org
> > Subject: TagLibs in Tomcat4.0.1
> >
> > I'm trying to use tag libraries for the first time in Tomcat 4.0.1. I thought
> > I'd try the io taglib first. I followed the instructions, and added the taglib
> > element to the examples/WEB-INF/web.xml file as described in the
> documentation,
> > but I'm getting a SAX parse error that I don't understand since the xml looks
> > correct to me.
> >
> > The DTD looks correct, and the tag being complained about looks valid to me.
> > What am I doing wrong here?
> >
> > My Tomcat4.0.1 \webapps\examples\WEB-INF\web.xml contains the following:
> >
> > <?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>
> >
> >     <taglib>
> >         <taglib-uri>http://jakarta.apache.org/taglibs/io-1.0</taglib-uri>
> >         <taglib-location>/WEB-INF/io.tld</taglib-location>
> >     </taglib>
> >
> > ...
> >
> > </webapp>
> >
> > The error message I get is below: The taglib tag is mentioned in the error so
> I
> > don't understand what is wrong.
> >
> > Starting service Tomcat-Standalone
> > Apache Tomcat/4.0.1
> > PARSE error at line 284 column 11
> > org.xml.sax.SAXParseException: The content of element type "web-app" must
> match
> > "(icon?,display-name?,description?,distributable?,context-param*,filter*,filte
> r-
> > mapping*,listener*,servlet*,servlet-mapping*,session-config?,mime-mapping*,wel
> co
> > me-file-list?,error-page*,taglib*,resource-env-ref*,resource-ref*,security-con
> st
> > raint*,login-config?,security-role*,env-entry*,ejb-ref*,ejb-local-ref*)".
> > Starting service Tomcat-Apache
> > Apache Tomcat/4.0.1
> >
> >
> >
>
>