This week's book giveaway is in the Performance forum.
We're giving away four copies of The Java Performance Companion and have Charlie Hunt, Monica Beckwith, Poonam Parhar, & Bengt Rutisson on-line!
See this thread for details.
Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Problem running servlets in tomcat 4.0.1

 
gizp stone
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 2676
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What is the problem that you are having?
 
Dave Vick
Ranch Hand
Posts: 3244
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
gizp stone
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 90
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 3695
IntelliJ IDE Java Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
that would be your problem.

Read the Tomcat docs!

http://jakarta.apache.org/tomcat/tomcat-4.0-doc/RUNNING.txt
 
Priya Singh
Ranch Hand
Posts: 33
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 3695
IntelliJ IDE Java Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What does your directory look like? (where are your class files)

What do the mappings in web.xml look like?
 
Anuradha Krishna
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic