You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Michael Lindsey <ml...@law.berkeley.edu> on 2001/09/26 18:33:21 UTC

where for web.xml

Hi all, I'm making the leap from client- to server-side java, and have
spent the past week getting everything configured, etc.  I'm using
Tomcat 3.2.1/Linux RH6.2 and Marty Hall's book _Core Servlets and JSP_
and have hit a brick wall.  The docs for Marty Hall's book, Tomcat docs,
etc are not solving the problem.  Apologies up front for the low-level
question here, but the docs just aren't cutting it.

My problem, is that I can't get Tomcat to acknowledge the init-params in
my web.xml.

I'm trying to call http://localhost/mike/servlet/coreservlets.ShowMsg

from the following directory structure:

/jakarta-tomcat
     /bin
     /config
     /doc
     /lib
     /logs
     /src
     /webapps
          /ROOT
          /admin
          /examples
          /mike
               /WEB-INF
                    /classes
                         /coreservlets
                              /ShowMessage.class
           /test
           /work


My server.xml in /jakarta-tomcat/conf  includes


...

<context path="/mike"
    docBase="webapps/mike"
    crossContext="false"
    reloadable="true"    >
</context>

...



I've got my web.xml in ...mike/WEB-INF

it reads...

<!DOCTYPE... >   <web-app>.  <servlet>

    <servlet-name>ShowMsg</servlet-name>
    <servlet-class>ShowMessage</servlet-class>
    <init-param>
        <param-name>foo</param-name>
        <param-value>bar</param-name>
    </init-param>
</servlet>
</web-app>

I also tried putting it in /jakarta-tomcat/conf/ per someone else's
suggestion.  No luck.
I know Marty Hall's book is highly recommended from all corners, but
there seems to be a lot of Tomcat issues up front that I need to get
ironed out.  If anyone has a tutorial they recommend, I'd love to hear
about it.

Thanks a lot,

Mike Lindsey