aspose file tools*
The moose likes Tomcat and the fly likes Tomcat 4 and 5, Servlet Configuration Difference Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » Tomcat
Bookmark "Tomcat 4 and 5, Servlet Configuration Difference" Watch "Tomcat 4 and 5, Servlet Configuration Difference" New topic
Author

Tomcat 4 and 5, Servlet Configuration Difference

Siamak Saarmann
Ranch Hand

Joined: Aug 21, 2004
Posts: 78
Hello,

1- I am trying to use Tomcat5 for servlet container to run examples. I
create a directory in webapps directory and put a web.xml inside its WEB-INF
directory.

This configuration of servlet works on Tomcat4 but not on Tomcat5. What is
the difference between two versions?

2- I can only run examples by creating a new context from inside Tomcat5
admin panel. But I can not find where it has written the configuration. (I
search the Tomcat5 directory for any file which contains my contexts'
directory but windows can not find any file). Where does Tomcat5 write
config for new contexts?

I appereciate your help.

Regards,
Mac



---
These are the instructions I follow:

1 Copy the HelloWorldServlet.class file to the directory

c:\tomcat4.0.1\webapps\chapter01\WEB-INF\classes

2 Create a text file named web.xml in the
c:\tomcat4.0.1\webapps\chapter01\WEB-INF directory. Write the following
lines in the file:



PhD Artificial Intelligence, OCJP1.6
William Brogden
Author and all-around good cowpoke
Rancher

Joined: Mar 22, 2000
Posts: 12781
    
    5
Your servlet class needs to be in a package. As a general rule, ALL classes used in servlets should be in a package and the location of the class files under WEB-INF/classes needs to reflect the package.
Tomcat 4.0.1 had the "invoker" turned on by default, this stopped somewhere in the middle of Tomcat4 releases. Read the Javaranch Invoker servlet FAQ.
Bill
Joyce Lee
Ranch Hand

Joined: Jul 11, 2003
Posts: 1392
Hi Siamak,

You can also check out CoreServlets.com.

Joyce
Siamak Saarmann
Ranch Hand

Joined: Aug 21, 2004
Posts: 78
William and Joyce

Really thank you for yor help.

Regards,
Mac
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Tomcat 4 and 5, Servlet Configuration Difference