File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Servlets and the fly likes HelloWorldServlet Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "HelloWorldServlet" Watch "HelloWorldServlet" New topic


Jeffrey Pony

Joined: Jun 24, 2002
Posts: 25
Iam trying to deploy a simple HelloWorldServlet on ApacheTomcat4.1.18.
My web.xml is as follows

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

<!DOCTYPE web-app
PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"




I do not have a package structure for the HelloWorldServlet.
The directory structure is :
jakarta-tomcat-4.1.18\webapps\chapter01\WEB-INF\classes with the class file residing in classes directory.

I also do not have the <servlet-mapping> specified intentionally.
The server is on running on port 8080 on my box.

I distinctly remember being able to invoke a servlet 'long back' back using
but fail to do so now.

Iam able to invoke the servlet if I set the servlet mapping.
What am I doing wrong or is my memory failing me.

Thanks in advance.
Ben Souther

Joined: Dec 11, 2004
Posts: 13410

The invoker servlet is no longer enabled by default in tomcat.
for more details.

If you wish to use it, you will need to uncomment the entry for it in the default web.xml under TOMCAT_HOME/conf.

Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
Jeffrey Pony

Joined: Jun 24, 2002
Posts: 25
Thanks Ben.
I agree. Here's the link:
subject: HelloWorldServlet
jQuery in Action, 3rd edition