Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: Can't get simple servlet to work

Re: Can't get simple servlet to work

From: dmz17 <dmz17_at_nospam.nowhere.com>
Date: Fri, 10 Jan 2003 21:55:05 +0100
Message-ID: <pan.2003.01.10.20.55.05.530357@nospam.nowhere.com>


On Fri, 10 Jan 2003 15:38:57 +0000, Peter Chatterton wrote:

> UPDATE
> I just tried:
>     http://localhost/servlet/xmlagency.XAGServlet/
> and it doesn't work either.
> 
> "Peter Chatterton" <peter_at_chatterton.name> wrote in message
> news:dUFT9.5628$IC6.567383_at_news20.bellglobal.com...

>> I created a servlet similar to IsItWorking as follow:
>> package xmlagency;
>> import ch06.*;
>> import java.io.*;
>> import javax.servlet.*;
>> import javax.servlet.http.*;
>> public class XAGServlet extends HttpServlet {
>> public static final String TITLE = "Yes, It's working!";
>> public void service (HttpServletRequest request,
> HttpServletResponse
>> response)
>> throws ServletException, IOException
>> and the rest is unchanged.
>> and I copied it to the same dir that IsItWorking is in.
>> I checked this by changing IsItWorking.
>>
>> Normally
>> http://localhost/servlet/IsItWorking/
>> works.
>>
>> But:
>> http://localhost/servlet/XAGServlet/
>> Gives:
>> "The requested URL /servlet/XAGServlet was not found on this server."
>>
>> jserv.log has:
>> [10/01/2003 20:06:25:724] (ERROR) ajp12: Servlet Error:
>> NoClassDefFoundError: XAGServlet
>>
>> error.log has:
>> [Fri Jan 10 15:07:22 2003] [error] [client 127.0.0.1] File does not exist:
>> c:/orant9i/apache/apache/htdocs/jserv/status
>>
>> Any help would be much appreciated.
>> Peter.
>>
>>
>>

I think what you want to do is create a directory called xmlagency in the directory where your servlets are supposed to go. Then put your class file in that directory.

Oh, you are using jserv. Sorry, I forgot how they do it, but still, figure out where the servlets go and create the directory structure.

Or try not using a package statement in your servlet, then dump the class where IsItWorking.class resides.

Since it is Jserv you may need to restart JServ, although I am a bit rusty on JServ.

Cheers,

dmz17 Received on Fri Jan 10 2003 - 14:55:05 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US