Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
The moose likes Tomcat and the fly likes Problem running servlets in tomcat 4.0.1 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Products » Tomcat
Bookmark "Problem running servlets in tomcat 4.0.1" Watch "Problem running servlets in tomcat 4.0.1" New topic
Author

Problem running servlets in tomcat 4.0.1

gizp stone
Greenhorn

Joined: Jan 18, 2002
Posts: 6
Hi all
i have installed tomcat4.0.1 on windows 2000.
pls help me in getting servlets run on this server.
Any help will be appreciated
Regards
Gizp Stone
Matthew Phillips
Ranch Hand

Joined: Mar 09, 2001
Posts: 2676
What is the problem that you are having?


Matthew Phillips
Dave Vick
Ranch Hand

Joined: May 10, 2001
Posts: 3244
gizp
What are the problems you're having? Are you gettng any errors? What exactly is happening?
If it is a problem with tomcat itself you're probably going to get better answers in the tomcat forum.
Give us some more details and we can help you out.
Here are a couple of good resources that might get you started:
http://www.moreservlets.com/Using-Tomcat-4.html
http://jakarta.apache.org/tomcat/tomcat-4.0-doc/index.html


Dave
gizp stone
Greenhorn

Joined: Jan 18, 2002
Posts: 6
Thanks for the links Dave.
Using the links i have been able to run html and jsp files using Tomcat4.0.1
Regarding Servlets i created the classes folder in the install_dir/webapps/ROOT/WEB-INF/ and placed my class file in the classes folder.
Now when i try to call the servlet using the browser by http://localhost/servlet/HelloServlet
it gives me a 404 error.
Do i need set some other classpaths to run the servlets or do i need to place my class files in some other folder
thanks
gizp stone
gizp stone
Greenhorn

Joined: Jan 18, 2002
Posts: 6
HI GUYS
I HAVE SUCCESSFULLY RUN SERVLET ON TOMCAT THANKS TO ALL OF U
I SET THE CATALINA_HOME VARIABLE AND THE SERVLETS WORKED
THANKS A TONNNE
GIZP STONE
Wasim Ahmed
Ranch Hand

Joined: Jan 31, 2001
Posts: 90
Hi Gizp,
How did you run the Html and JSP files? I am having problem with these, I can view the welcome page but can't view the Hello.html and Hello.jsp files. I added them in my install-dir/webapps/ROOT/Myfiles/
What I did wrong? can you help please.
BTW what do you mean by "setting CATALINA_HOME" values, please explain... Thanks
Mike Curwen
Ranch Hand

Joined: Feb 20, 2001
Posts: 3695

that would be your problem.

Read the Tomcat docs!

http://jakarta.apache.org/tomcat/tomcat-4.0-doc/RUNNING.txt
Priya Singh
Ranch Hand

Joined: Mar 19, 2004
Posts: 33
Hi, I have a very similar problem .. Am goin with the tutorial I have
I created classes dir in root\web-inf and i placed my .java n .class in it , server can see my jsp n html files but not this HelloServlet . I also made an entry in web.xml for servlet mapping but still i am getting 404 file not found error.. can nebody think what could possibly be givin me this error ..
thanks for ur time
Mike Curwen
Ranch Hand

Joined: Feb 20, 2001
Posts: 3695

What does your directory look like? (where are your class files)

What do the mappings in web.xml look like?
Anuradha Krishna
Greenhorn

Joined: Mar 14, 2004
Posts: 6
Hi,
Try enabling the configuration for the default servlet and invoker servlet in the web.xml file, which is present in the conf directory.
That should help load the servlets by default from the WEB-INF/classes directory.
HTH.
Regards,
Anuradha
 
 
subject: Problem running servlets in tomcat 4.0.1