Re: Beginner Servlet Config Q (with parameters)

From: Hiroshi Iwatani <HGA03630@xxx.ne.jp>
Date: Tue Apr 02 2002 - 15:18:48 PST

If the C:\resin-2.1.0 is the default document root
for Resin's default Web application, I'm afraid its
not though, the next level should be the WEB-INF,
no the web-inf. And the URL should be

   ...../servlet/moreservlets.ShowMsg

not

   ...../servlet/ShowMsg

And, should I mention that Resin 2.0.5 had a bug
on its resin.conf that disabled the use of the
default URL for servlets. Look for the archive of
this list for '404 for servlets' posted Feb. 2002.

david.kittos@xxx.co.uk wrote:
> Hello,
>
> I am going through the examples in a book and I'm having trouble configuring
> the servlet
> to behave the way I want it to....
>
> My code is in: c:\resin-2.1.0\web-inf\classes\coreservlets\ShowMessage.java
> and the ShowMessage.java code includes the statement: package coreservlets
>
> What I want to be able to do is to use the URL: http://localhost/servlet/ShowMsg
> invoke my ShowMessage servlet.
>
> Have tried the following file as well as a million variations:
>
>
> c:\resin-2.1.0\web-inf\web.xml
>
> *****************************************
> <web-app id='/'>
> <servlet-mapping url-pattern='servlet/ShowMsg'
> servlet-name='ShowMsg'/>
> <servlet servlet-name='ShowMsg'
> servlet-class='coreservlets.ShowMessage'>
> <init-param message='Testing 1 2 3'/>
> <init-param repeats='5'/>
> </web-app>
> **********************************************
>
> Unfortunately, it keeps giving me "error 500: Class `ShowMsg' was not found
> in classpath.
> Classes normally belong in /WEB-INF/classes."
>
> Please note that any other servlets that I've dropped in c:\resin-2.1.0\web-inf\classes\coreservlets
> work fine although I am not using the web.xml stuff above.
>
> I'm using IIS 5.0 on Win2k Server SP2 and Resin 2.1.0 configured to run
> as a service.
>
> Have gone through the documentation but that has left me a bit confused.
>
> Any help would be appreciated.
>
> thx
>
> David
>
>
>
>
>
>
Received on Tue 02 Apr 2002 15:18:48 -0800

This archive was generated by hypermail 2.1.8 : Thu Sep 28 2006 - 20:17:00 PDT