tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Pid <...@pidster.com>
Subject Re: Getting a servlet to work within static pages
Date Fri, 02 Jul 2010 13:23:49 GMT
On 02/07/2010 14:01, David kerber wrote:
> My system:
> Debian Lenny (5.x) on a low end machine in my basement (so I can do
> whatever I want/need to it)
> 
> TC 6.0.24, installed in /home/davek/apache-tomcat-6.0.24
> 
> java version "1.5.0_17"
> Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_17-b04)
> Java HotSpot(TM) Client VM (build 1.5.0_17-b04, mixed mode, sharing)
> 
> Web content and apps are installed in
> /home/content/webapps/ROOT
> and
> /home/content/webapps/ginp
> 
> ROOT contains all the static content for my personal website, with
> various html files and sub-folders, and a couple of .jsp files from this
> issue I'm asking about.
> 
> ginp is the open-source photo album project I'm using to manage and
> display post some of my pictures.
> 
> I'm trying to figure out how to use some of the functions from ginp
> (specifically one of several defined as tagsets) in my static pages to
> display a list of available photo albums.  And I want to do this
> transparently, so the list appears to be just part of a static page,
> without me having to have /ginp/ show on the url because it was
> redirected or forwarded to the servlet.
> 
> I've tried renaming the .html page to .jsp and putting the code to call
> the tag in the desired spot (code below), but I'm getting the exception
> below.  I think the biggest issue is my unfamiliarity with using
> tablibs, but am wondering if there is also some tomcat setup issues I'm
> missing here.
> 
> Any help appreciated!!
> 
> Dave
> 
> 
> The complete .jsp is:
> 
> <HTML>
> <HEAD>
>   <TITLE>Photography</TITLE>
> </HEAD>
> <BODY background=sand.gif>
> <H2 align=center>Photography</H2>
> <P>
> Some of my favorite pictures for you to peruse and comment on:
> 
> <br>
> <h3>Picture collections</h3>
> 
> <%@ taglib uri="/ginp" prefix="ginp" %>

Silly question, have you got the jars for that taglib in:

ROOT/WEB-INF/lib?

p

> <ginp:setup />
> <h1><ginp:trans code="Collections" /></h1>
> <h3><ginp:getcollectiontitles>
>     <a href="<%=link%>"><%=name%></a><br /></ginp:getcollectiontitles>
> </h3>
> <P>
> <A HREF="davek_1.htm">Back to the Home Page</A>
> </BODY>
> </HTML>
> 
> 
> 
> org.apache.jasper.JasperException: File "/ginp" not found
> org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:51)
> 
> org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:409)
> 
> org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:116)
> 
>     org.apache.jasper.compiler.TagLibraryInfoImpl.<init>(TagLibraryInfoImpl.java:160)
> 
> org.apache.jasper.compiler.Parser.parseTaglibDirective(Parser.java:382)
> org.apache.jasper.compiler.Parser.parseDirective(Parser.java:445)
> org.apache.jasper.compiler.Parser.parseElements(Parser.java:1392)
>     org.apache.jasper.compiler.Parser.parse(Parser.java:130)
> org.apache.jasper.compiler.ParserController.doParse(ParserController.java:255)
> 
> org.apache.jasper.compiler.ParserController.parse(ParserController.java:103)
> 
> org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:170)
>     org.apache.jasper.compiler.Compiler.compile(Compiler.java:332)
>     org.apache.jasper.compiler.Compiler.compile(Compiler.java:312)
>     org.apache.jasper.compiler.Compiler.compile(Compiler.java:299)
> org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:589)
> 
> org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:317)
> 
> org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:313)
> org.apache.jasper.servlet.JspServlet.service(JspServlet.java:260)
>     javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
> 



Mime
View raw message