Have you tried putting your java file in
WEB-INF\src\coreservlets\ShowMessage.java
instead...
Resin by default uses the src dir for the java source and the classes
directory for the class files. You can specify this behavior in the web.xml
file.
Also, have you made sure that your doc root points to c:\resin-2.1.0 and not
to
c:\resin-2.1.0\docs
HTH,
Ozzy
-----------------------------------
Osvaldo Espaillat
ozzy@xxx.com
Unwired Solutions Inc.,
Your eEnterprise Solutions Company
http://www.unwiredsolutions.com
-----------------------------------
-----Original Message-----
From: owner-resin-interest@xxx.com
[mailto:owner-resin-interest@xxx.com]On Behalf Of
david.kittos@xxx.co.uk
Sent: Tuesday, April 02, 2002 10:01 AM
To: resin-interest@xxx.com
Subject: Beginner Servlet Config Q (with parameters)
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 10:27:42 -0800
This archive was generated by hypermail 2.1.8 : Thu Sep 28 2006 - 20:17:00 PDT