tomcat-taglibs-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Brian Buckley" <briankbuck...@attbi.com>
Subject Re: Strust + Tiles + JSTL = ERROR
Date Tue, 13 May 2003 18:17:27 GMT
Really?!  That's great.  I'm behind at TC 4.1.18-LE, Struts 1.1-b3, and
Standard Taglib 1.0.3

One would guess the fix to have been in Tomcat give this evidence.  I'll
upgrade soon enough to see.

-Brian



> All of the following seem to work fine with TC 4.1.24-LE, Struts 1.1-rc1,
and
> Standard Taglib 1.0.3:
>
> <%@ taglib prefix="html" uri="http://jakarta.apache.org/struts/tags-html"
%>
> <%@ taglib prefix="html" uri="http://jakarta.apache.org/struts/tags-html"
%>
>
> <html><head><title>Struts Test</title></head><body></body></html>
>
> -----
>
> <%@ taglib prefix="c" uri="http://java.sun.com/jstl/core" %>
> <%@ taglib prefix="c" uri="http://java.sun.com/jstl/core" %>
>
> <html><head><title>JSTL Test</title></head><body></body></html>
>
> -----
>
> <%@ taglib prefix="c" uri="http://java.sun.com/jstl/core" %>
> <%@ taglib prefix="html" uri="http://jakarta.apache.org/struts/tags-html"
%>
> <%@ taglib prefix="html" uri="http://jakarta.apache.org/struts/tags-html"
%>
>
> <html><head><title>JSTL Test2</title></head><body></body></html>
>
> Quoting Brian Buckley <briankbuckley@attbi.com>:
>
> > Tim,
> >
> > I am using Tomcat.
> >
> > However the immediate issue at hand is not about having a tag opened in
one
> > file and closed in another file.  It is about having duplicate taglib
> > declarations.
> >
> > <%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
> > <%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
> > Works! Struts allow this.
> >
> > <%@ taglib uri="http://java.sun.com/jstl/core" prefix="c" %>
> > <%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
> > <%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
> > Won't work.  JSTL does not permit any multiple taglib declarations.
> >
> > Brian
> >
> >
> > >
> > > Are you using Tomcat?  I just found out from the tomcat-dev list that
> > > the jsp spec doesn't allow the use of tags in includes .. i.e. a tag
> > > opened in one file cannot be closed in another.
> > >
> > > I'd been developing on Resin for a long time, (which allowed this
> > > behavior), but when I just tested it on a Tomcat install, I got errors
> > > similar to this (amongst others).  I really can't believe that the jsp
> > > spec doesnt allow including tags!
> > >
> > > -tim
> > >
> > > On Tuesday, May 13, 2003, at 10:30 AM, Brian Buckley wrote:
> > >
> > > > I experienced the same problem.  It is caused by having a taglib
> > > > declaration
> > > > in a JSP more than once (perhaps the result of using include files).
> > > >
> > > > It appears that the struts tags permit multiple taglib declarations
in
> > > > JSPs
> > > > while the JSTL tags do not.
> > > >
> > > > I wonder if the JSP spec addresses this.  Are tags supposed to act
like
> > > > struts or like JSTL in this regard?
> > > >
> > > > -Brian
> > > >
> > > > I solve my situation by reorganizing my JSPs so the none have
multiple
> > > > taglib declarations.  Doing so wasn't completely trivial for me :(
> > > >
> > > >> I am building a site using struts and tiles and recently I decided
to
> > > >> use JSTL as there was some tags i though would be useful. Now I get
> > > >> some
> > > >> strange error on some pages where i include my taglibs. Ther error
is
> > > >>
> > > >> jsp.error.tlv.invalid.page
> > > >>
> > > >> null: org.xml.sax.SAXParseException: Attribute "xmlns:html" was
> > > >> already
> > > >> specified for element "jsp:root".
> > > >>
> > > >> The 'html' is just the prefix of the jakarta html taglib that was
> > > >> defined before jstl. If I have a different order of taglibs then
the
> > > >> first one causes the error. I do not have any JSTL tags in this
page
> > > >> however but when i remove the taglib definition the error goes
away.
> > > >>
> > > >> any ideas?
>
> --
> Kris Schneider <mailto:kris@dotech.com>
> D.O.Tech       <http://www.dotech.com/>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: taglibs-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: taglibs-user-help@jakarta.apache.org
>
>



---------------------------------------------------------------------
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