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.

-- 
George Hester
__________________________________
"Hans Bergsten" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED]
> 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:
> > 
> > <[EMAIL PROTECTED] prefix="c" uri="http://java.sun.com/jsp/core"; %>
> > 
> > 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 
> > (http://java.sun.com/jsp/core) 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 "http://java.sun.com/jstl/core";, not
>                                               ^^^^
> "http://java.sun.com/jsp/core";
> 
> hANS
> -- 
> Hans Bergsten                                <[EMAIL PROTECTED]>
> 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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to