tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chris Wolcott <>
Subject TOMCAT, Servlets and Filters?
Date Fri, 18 Oct 2002 19:43:41 GMT
WINDOWS 2000 SVR, Apache 2.0, TOMCAT 4.1

In the primary conf/web.xml, the invoker <servlet> is defined, but the 
<servlet-mapping> is commented out.  In the /examples/WEB-INF/web.xml 
file, the <servlet-mapping> definition is given.  The servlets in this 
directory work.  In this same file, there is a bunch of other stuff that 
I'm not sure if I need or not.  Particularly the <filters> & 
<filter-mapping> directives.  Do I need them?  I tried my own servlet in 
/ROOT without them and it does not work, yet I've never seen them 
mentioned on any web pages or group messages about getting servlets to 
work.  (ROOT does work if I include them)

And as long as I'm imposing. . .    ;)

My JSP will not compile automatically.  If I let it fail, then go to the 
TOMCAT/work directory and compile it by hand it will work.  (I also had 
to copy my BEANS directory under the word lib to get it to compile.)  Do 
you have any hints on getting JASPER to work, or even how to figure out 
what the compile error is?   All I get in the error log is:

= = =

2002-10-18 14:00:06 StandardWrapperValve[jsp]: Servlet.service() for 
servlet jsp threw exception
org.apache.jasper.JasperException: Unable to compile class for JSP

An error occurred at line: -1 in the jsp file: null

Generated servlet error:
    [javac] Compiling 1 source file

= = =

Finally:  (As IF!)

In the case of an APACHE/TOMCAT combination, does APACHE send the *.JSP 
to TOMCAT, then interpret the response before sending it back to the 
browser?  I currently have a few SSI in my JSP, and am using the 
<%@include file="TOP.html"%> JSP directives to get them in it, but that 
means I have to have copies of my include files in both APACHE's 
"htdocs" lib (for my other static pages) and TOMCAT's "ROOT" lib (for my 
JSP pages).  Can I change that to a normal HTTP INCLUDE?  (It didn't 
work when I was running under IIS and WebSphere.)

Thank you very much for your time.

     '-  ROOT
         '- Welcome.jsp
         '- WEB-INF
              '- web.xml
              '- classes
                  '-  filters
                  '     '- ExampleFilter.class  (Supplied by Apache as 
part of the "/examples" app)
                  '-  WolcottSoft
                      '- AccessBean.class
                      '- URLChecker.class
                      '- servlets
                          '- HelloWorldServlet.class


<?xml version="1.0" encoding="ISO-8859-1"?>

<!DOCTYPE web-app
    PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"

  <display-name>Default Web Application</display-name>
     Main webpage for this site.


  <!-- Define servlet-mapped and path-mapped ROOT 
filters                   -->
    <filter-name>Servlet Mapped Filter</filter-name>
    <filter-name>Path Mapped Filter</filter-name>

  <!-- Define filter mappings for the defined 
filters                       -->
      <filter-name>Servlet Mapped Filter</filter-name>
      <filter-name>Path Mapped Filter</filter-name>

  <!-- Define servlets that are included in the ROOT 
application            -->



  <!-- The mapping for the invoker servlet that is defined in the primary
file                                                    -->



>http://www.geocities/os2dude  This is redirected to my dynamic IP

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

View raw message