Hi,
I suppose that the WebServer hosting the servlet is up and running,
so that you see some sort of Welcome/Congratulation-Page on
http://localhost:8080/.
So the WebServer needs to know what to look for. Probably there
are one or several WebApps running by default and HelloServlet
is part of that App. All WebApplications have some sort of
configuration file in XML, where the servlet-mapping is defined.
This is the place where you tell the Server where to look for
servlets. Many times you find a servlet-invoker by default:
<http-server>
<servlet-mapping url-pattern='/servlet/*'
servlet-name='...'/>
</http-server>
So http://localhost:8080/servlet/HelloServlet could be working.
Look for WEB-INF directories and the web.xml files beneath it.
You may find something like this:
<servlet-mapping url-pattern='/examples' servlet-name='HelloServlet'/>
<servlet servlet-name='HelloServlet' servlet-class='test.HelloServlet'>
</servlet>
When there is a HelloServlet.class (package test!) in the WEB-INF/
classes/test - directory then your example
localhost:8080/examples/HelloServlet
should find the servlet.
I don't know what's your Server so I can just recommend to do some
investigation in deploying of WebApps and Servlet-Mapping.
Regards,
Stefan
>----- Original Message -----
>From: "drew w" <[EMAIL PROTECTED]>
>To: <[EMAIL PROTECTED]>
>Sent: Wednesday, April 25, 2001 4:27 AM
>Subject: /examples/HelloServlet Page not found error
>
>
> > When I type localhost:8080/examples/HelloServlet I get:
> >
> > Page not found error
> >
> > When I type localhost:8080/examples/HelloServlet.class I get:
> >
> > Download file pop-up box ...
> >
> >
> > Does anyone know what might be the problem?
> >
> > Thanks,
> > Andrew
===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".
Some relevant FAQs on JSP/Servlets can be found at:
http://java.sun.com/products/jsp/faq.html
http://www.esperanto.org.nz/jsp/jspfaq.html
http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets