put a servlet mapping in your web.xml file..........
<servlet>
<servlet-name>HelloWorld</servlet-name>
<servlet-class>HelloWorld</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>HelloWorld</servlet-name>
<url-pattern>/servlet/HelloWorld</url-pattern>
</servlet-mapping>
see http://jakarta.apache.org/tomcat/tomcat-4.1-doc/appdev/deployment.html for
more info.....
shawn
On Wednesday 30 October 2002 02:36 pm, Raghava Rao wrote:
> Hello,
> I'm new to Servlet programming and need help in starting to develop
> servlets.
> I have downloaded jakarta-tomcat-4.0.6. Once installed, it's installed as
> C:\Program Files\Apache Tomcat 4.0
> Now, I have a development environment of my own, where I write and compile
> my Java files.. Like, C:\servlet\examples\HelloWorld.java
> After providing the servlet.jar file in my CLASSPATH, and compiling
> HelloWorld.java, I got HelloWorld.class. Now, where do I move this class
> file to view it as http://localhost/servlet/HelloWorld??
>
> I copied the classfile to C:\Program Files\Apache Tomcat
> 4.0\webapps\ROOT\WEB-INF\classes, where classes dir was created by me and
> class files copied there.
>
> Now, starting the Tomcat Webserver, I try opening this in Internet Explorer
> as http://localhost/servlet/HelloWorld, I get the webpage error as:
> Apache Tomcat/4.0.6 - HTTP Status 404 - /servlet/HelloWorld
>
> ---------------------------------------------------------------------------
>-----
>
> type Status report
>
> message /servlet/HelloWorld
>
> description The requested resource (/servlet/HelloWorld) is not available.
>
> What am I missing? I've thoroughly followed
> http://www.moreservlets.com/Using-Tomcat-4.html, need help at the earliest.
> Thank you.
> Raghava
>
>
>
>
>
> _________________________________________________________________
> Unlimited Internet access for only $21.95/month. Try MSN!
> http://resourcecenter.msn.com/access/plans/2monthsfree.asp
--
To unsubscribe, e-mail: <mailto:tomcat-user-unsubscribe@;jakarta.apache.org>
For additional commands, e-mail: <mailto:tomcat-user-help@;jakarta.apache.org>