• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

HelloWorldServlet

 
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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"
"http://java.sun.com/dtd/web-app_2_3.dtd">

<web-app>

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

</web-app>


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
http://localhost:8080/chapter01/servlet/HelloWorldServlet
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.
 
Sheriff
Posts: 13411
Firefox Browser VI Editor Redhat
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The invoker servlet is no longer enabled by default in tomcat.
See:
http://jakarta.apache.org/tomcat/faq/misc.html#evil
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.
 
Jeffrey Pony
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks Ben.
 
reply
    Bookmark Topic Watch Topic
  • New Topic