Skip to Main Content

Java EE (Java Enterprise Edition) General Discussion

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

simple hello world servlet not running , plz help

843841Dec 15 2007 — edited Dec 15 2007
plz help i have tried various combination but none worked ...
examples are running well in tomcat but my web application' servlets are not.
so
i m using j2se , i know servlets is in j2ee, i am using dailup so can not download j2ee(120Mb)
i have downloaded servlet.jar file extracted it and keeping it in the same folder of my HelloWorldServlet.java compiled it.
inside ROOT\FPS\WEB-INF here is web.xml

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

<web-app xmlns="http://java.sun.com/xml/ns/j2ee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"
version="2.4">

<display-name> my fps </display-name>
<description>
Welcome to Tomcat
</description>

<servlet>
<servlet-name>hello</servlet-name>
<servlet-class>HelloWorldServlet</servlet-class>
</servlet>

<servlet-mapping>
<servlet-name>hello</servlet-name>
<url-pattern>/abc/hello</url-pattern>
</servlet-mapping>
</web-app>

inside ROOT\FPS\WEB-INF\classes\HelloWorldServlet.class is kept.

this is the url i type in tomcat
http://localhost:8080/FPS/abc/hello
and output was

HTTP Status 404 - /FPS/abc/login

type Status report

message /FPS/abc/hello

description The requested resource (/FPS/abc/hello) is not available.
Apache Tomcat/6.0.7

please i m pissed
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jan 12 2008
Added on Dec 15 2007
1 comment
217 views