tomcat-taglibs-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "George Hester" <>
Subject Re: taglib standard 1.0 in Tomcat
Date Fri, 27 Feb 2004 05:38:07 GMT
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="" %>
<title>Counter Page</title>
<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>

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.

George Hester
"Hans Bergsten" <> wrote in message
> George Hester wrote:
> > OK I decided to try in the ROOT.  The web.xml in that contains virtually nothing.
 No taglib elemts at all.  I have the taglib 1.05 version.  I have my counter1.jsp as orinally
posted.  I made a subfolder of WEB-INF off the ROOT called lib.  In that I put the two jars
you said to put in there standard.jar and jstl.jar.  I have done everything you said to do
and nothing more nothing less.  I have changed to:
> > 
> > <%@taglib prefix="c" uri="" %>
> > 
> > in counter1.jsp as you said to do.  Now I access http://localhost:8080/counter1.jsp.
 That should work right?
> > 
> > I have stopped and started Tomcat.
> > 
> > type Exception report
> > 
> > message 
> > 
> > description The server encountered an internal error () that prevented it from fulfilling
this request.
> > 
> > exception 
> > 
> > org.apache.jasper.JasperException: This absolute uri (
cannot be resolved in either web.xml or the jar files deployed with this application
> > [...]
> > 
> > Apache Tomcat/4.1.29
> > 
> > Nope.  Welp back to the drawing board.  There is more involved then the "Real Deal"
it seems to me thanks though.
> > 
> The URI for JSTL 1.0 is "", not
>                                               ^^^^
> ""
> hANS
> -- 
> Hans Bergsten                                <>
> Gefion Software                       <>
> Author of O'Reilly's "JavaServer Pages", covering JSP 2.0 and JSTL 1.1
> Details at                                    <>

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message