First thanks for the help. My Comments below....

Randy Layman wrote:

>       Ok, lets try a few other things:
>       1.  Does /run/servlet/com.(fill in fully qualified class
> here).Phonebook work?  If not, double check your class file is in the
> correct place and that the package statement in the file matches the
> structure here.  One thing that I've found sometime helps is to compile to a
> directory (javac -d), jar that directory and then use that JAR or un-jar
> into the WEB-INF/classes directory.  This makes sure that the directories
> have the correct structure.

Not like this:
http://10.44.82.2:8080/run/servlet/com.willeke.servlet.phonebook.Phonebook
or
http://10.44.82.2:8080/run/servlet/com/willeke/servlet/phonebook/Phonebook
Currently I am NOT using a jar file. Al in WEB-INF\Classses\com.sss.sss
OOPS!
Boy do I feel stupid.
I copied the source file and not the class files.
All is well and thanks for making me look stupid. :-)

> 
> 
>       2.  Do you get any messages in the console when starting Tomcat
> about unable to load servlet?  If so, what are they?
> 
>       3.  Have you restarted Tomcat since editing web.xml? (I know its
> obvious, but it really should be working by the time you get to this point)
> 
>       4.  Have you verified that the servlet tag is in the correct place
> in the web.xml file?  (My usage suggests that Tomcat doesn't complain for
> out-of-order elements, just ignores them.)
> 
>       The good way to do servlet mapping is to put it into the web.xml
> file like you have attempted to do.  The old way is what I suggested above
> (using the /servlet/classname).  
> 
>       If the above doesn't work, could you send me your entire web.xml
> file so that I can look it over?
> 
>       Randy
> 
>> -----Original Message-----
>> From: Jim Willeke [mailto:[EMAIL PROTECTED]]
>> Sent: Thursday, April 19, 2001 8:50 AM
>> To: [EMAIL PROTECTED]
>> Subject: Re: Servlet Placement and URLs to Run...
>> 
>> 
>> No joy. 404 error.
>> 
>> I would like to do it the new current, specfull way. What 
>> might that be?
>> -jim
>> 
>> Randy Layman wrote:
>> 
>>>     How about http://10.44.82.2:8080/run/pb?  When you specify the
>>> servlet-mapping you are telling Tomcat what URL in the 
>> 
>> webapp to handle -
>> 
>>> /pb means "Any Request for pb in the root of my webapp".  The
>>> /servlet/className convention is a holdover from how the 
>> 
>> older containers
>> 
>>> used to do things and is no longer part of the spec.
>>> 
>>>     Randy
>>> 
>>>> -----Original Message-----
>>>> From: Jim Willeke [mailto:[EMAIL PROTECTED]]
>>>> Sent: Thursday, April 19, 2001 8:09 AM
>>>> To: [EMAIL PROTECTED]
>>>> Subject: Servlet Placement and URLs to Run...
>>>> 
>>>> 
>>>> I have a servlet that I have used in other enviroments 
>>> 
>> without issues.
>> 
>>>> I am trying to get it to run under Tomcat and seem to have several 
>>>> roadblocks.
>>>> The Examples work and I do have a servlet SnoopServlet 
>>> 
>> that works in 
>> 
>>>> this same container.
>>>> (http://10.44.82.2:8080/run/servlet/SnoopServlet) So, I am 
>>>> assuming the 
>>>> plumbing works and it is a problem with me not knowing where 
>>>> to put this 
>>>> or call that.
>>>> 
>>>> Ther servlet is in \tomcat\webapps\run\WEB-INF\classes
>>>> \tomcat\ is tomcathome
>>>> the actual class file is in:
>>>> \tomcat\webapps\run\WEB-INF\classes\com\willeke\servlet\phoneb
>>>> ook\Phonebook.class
>>>> The servlet being in the package com.willeke.servlet.phonebook
>>>> This runs and works fine in Jbuilder (Which uses tomcat internally)
>>>> 
>>>> The issues I need to resolve:
>>>> 1. What is the right URL to call to load this servlet?
>>>> 
>>>> 
>>>> 2. In the \tomcat\webapps\run\WEB-INF\web.xml I have:
>>>>    <servlet>
>>>>      <servlet-name>
>>>>          Pb
>>>>      </servlet-name>
>>>>      <servlet-class>
>>>>          com.willeke.servlet.phonebook.Phonebook
>>>>      </servlet-class>
>>>>    </servlet>
>>>> 
>>>>    <servlet-mapping>
>>>>        <servlet-name>
>>>>            Pb
>>>>        </servlet-name>
>>>>        <url-pattern>
>>>>            /pb
>>>>        </url-pattern>
>>>>    </servlet-mapping>
>>>> None of the following seem to work:
>>>> http://10.44.82.2:8080/run/servlet/com/willeke/servlet/phonebo
>>> 
>>> ok/Phonebook
>>> 
>> http://10.44.82.2:8080/run/servlet/com.willeke.servlet.phonebo
> 
> ok.Phonebook
> 
>> http://10.44.82.2:8080/run/servlet/Pb
>> http://10.44.82.2:8080/run/servlet/pb
>> 
>> Any help would be appreciated.
>> -jim
>> 
>> 
>> 
>> 
>> 

Reply via email to