tomcat-taglibs-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "George Hester" <hesterl...@hotmail.com>
Subject Re: taglib standard 1.0 in Tomcat
Date Fri, 27 Feb 2004 22:52:01 GMT
Thanks Han my apologies.  Yes it was JavaServer Pages published by O'Reilly.  Any suggestions
how I can undisable EL in "JSP 1.2/Servlet 2.3 web.xml" and if I did that would it work then?
 If not that's fine I'll have to look for something similar that will work with what I have.
 The reason I have not gone to Tomcat 5 is I thought it was a beta product and the Tomcat
I have is working fine.  It took me two months to get it that way and I really don't want
to bang my head for another two months getting Tomcat 5 to work.  It has to work with IIS
5 or it is sort of worthless to me.

-- 
George Hester
__________________________________
"Hans Bergsten" <hans@gefionsoftware.com> wrote in message news:403EF8A1.3020007@gefionsoftware.com...
> George Hester wrote:
> > OK what I have done is transfer some of the standard taglib 1.0 
>  > examples to my webapp.  I know these taglibs are working because
>  > I used the import and pulled up my ftp site.  So I don't think
>  > there is anything wrong with my installation.  I think the
>  > counters1.jsp is bum.  I got that right out of the book by O'Reilly
>  > called Tomcat.  And I don't think it works.  That's par for the course
>  > with these books on programming.  At least that has been my
>  > experience.
> > 
> > Here's their code:
> > 
> > <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
> > <html>
> > <head>
> > <title>Counter Page</title>
> > </head>
> > <body bgcolor="white">
> > <%-- Increment Counters --%>
> > <c:set var="sessionCounter" scope="session" value="${sessionCounter + 1}"/>
> > <c:set var="applCounter" scope="application" value="${applCounter + 1}"/>
> > <h1>Counter page</h1><p>
> > This page has been visited <b>${sessionCounter}</b> times within the
current session<br/>
> > and <b>${applCounter}</b> times by all users since the application was
started.</p>
> > </body>
> > </html>
> > 
> > And here's the result:
> > 
> > Counter page
> > 
> > This page has been visited ${sessionCounter} times within the current session
> > and ${applCounter} times by all users since the application was started.
> > 
> > 
> > $40 for this and on pg 30.  I'll just have to find a book with working code.  
>  > I been through Wrox; Sun and now it look like O'Reilly is no
>  > different in publishing code that looks good on paper but fails in 
> practice.
>  > Thanks for your attention on this.  The install is fine.
> 
> This page uses JSP 2.0 syntax (EL expressions directly in template
> text), and from your previous posts it seems like your using a JSP
> 1.2 container (Tomcat 4.1.x). You must use a JSP 2.0 container, such
> as Tomcat 5.x instead. In this example it doesn't really matter, but
> you should also use JSTL 1.1 instead of 1.0 with a JSP 2.0 container.
> 
> The EL is disabled by default if you use a JSP 1.2/Servlet 2.3 web.xml
> file, so you must also use a JSP 2.0/Servlet 2.4 web.xml file, i.e,
> one that starts with:
> 
>    <web-app xmlns="http://java.sun.com/xml/ns/j2ee"
>      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>      xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
>        http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"
>      version="2.4">
> 
> 
> Unless there's a copy of this example in another O'Reilly book, this
> looks like an example from my book named "JavaServer Pages, 3rd
> Edition", not "Tomcat" as you say above. It's clearly marked both on
> the cover and in the text to describe JSP 2.0, and it shows you how to
> install Tomcat 5, not 4.x, in Chapter 4. And the sample application
> comes with the correct web.xml version. So please, keep the versions
> straight and I can guarantee you that the examples work as they should.
> 
> Hans
> -- 
> Hans Bergsten                                <hans@gefionsoftware.com>
> Gefion Software                       <http://www.gefionsoftware.com/>
> Author of O'Reilly's "JavaServer Pages", covering JSP 2.0 and JSTL 1.1
> Details at                                    <http://TheJSPBook.com/>


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