Title: RE: Servlets In A Package

>> looking for the class Interest instead of InterestServlet.

That's what I thought.

>> make sure there are no extra spaces in the class
>> name for the web.xml.

I've gone over this file byte by byte and I've arrived at this:

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

<!DOCTYPE web-app
    PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.2//EN"
    "http://java.sun.com/j2ee/dtds/web-app_2_2.dtd">

<web-app>
    <servlet>
        <servlet-name>interest</servlet-name>
        <servlet-class>org.jboss.docs.interest.InterestServlet</servlet-class>
    </servlet>

    <servlet-mapping>
        <servlet-name>interest</servlet-name>
        <url-pattern>/catalog</url-pattern>
    </servlet-mapping>
</web-app>-----------------------------------

I'll now try changing the name of the servlet and different packages to see what happens.

Thanks for your help.

Martin

-----Original Message-----
From: Michael Wentzel [mailto:[EMAIL PROTECTED]]
Sent: 25 July 2001 12:33
To: '[EMAIL PROTECTED]'
Subject: RE: Servlets In A Package


I've recently installed JBoss-2.4.0_Tomcat-3.2.2 and I'm now starting to
experiment with all the JBoss samples. The first, Interest, contains a
servlet that I'm trying to get up and running. This InterestServlet is in a
package org.jboss.docs.interest which I've compiled and placed in
webapps\demo\WEB-INF\classes\org\jboss\docs\interest

>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
From your NoClassDef message it doesn't seem like the problem is in your
servlet
being in a package.  It is finding the correct package but it's looking for
the
class Interest instead of InterestServlet.  Although your snipping in your
original post looked fine make sure there are no extra spaces in the class
name for the
web.xml.  Also, can you get any servlet mappings to work for servlets in
packages?
If so I would review your web.xml again very closely and look for
missing/extra tags or characters.


---
Michael Wentzel
Software Developer
Software As We Think - http://www.aswethink.com

Reply via email to