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

Servlet question

Ben Lim

Joined: Apr 04, 2005
Posts: 9
hi i have install tomcat5.0.28, so now i want to put a new servlet code into the tomcat server, which folder should i put in?
Mark Spritzler

Joined: Feb 05, 2001
Posts: 17276

I hope so, considering that this is a Servlets forum.

Sometimes a more descriptive topic name is better so that we can know what your question on Servlets is really about.


Perfect World Programming, LLC - iOS Apps
How to Ask Questions the Smart Way FAQ
Mark Spritzler

Joined: Feb 05, 2001
Posts: 17276

Well, now I read your question, and it isn't about a Servlet in particular, but a Tomcat question. So I will move this thread to the Apache/Tomcat forum.

William Brogden
Author and all-around good cowpoke

Joined: Mar 22, 2000
Posts: 13037
The regular installation of Tomcat includes documentation files that cover all questions like this. If you can see the regular Tomcat startup screen, you are in business.
Ben Weng

Joined: Feb 22, 2005
Posts: 19
You don't drop it anywhere and hope it works. You'll have to package it someway and deploy it in tomcat, by deploying, the least thing to do is to let tomcat know you've come up with some servlets and the path to get to it.
As one option, Tomcat has a manager that lets you deploy your application which I found very useful during development.

Good luck.

-Ben<br />SCJP/SCJD 1.4<br />Certified Sybase DBA
Thana Bujakorn

Joined: Jan 04, 2004
Posts: 11
I suggest you put it in Tomcat5/webapps/YourApp/WEB-INF ..., The book Head First Servlet & JSP is a pretty good one for whoever wants to learn servlet and JSP, It has the whole chapter on deploying webapps, I suggest you to buy it


(scjp 1.4)
Satish SN
Ranch Hand

Joined: Apr 19, 2005
Posts: 70

u compile the servlet file and put the Servlet1.class in /uapp/WEB-INF/classes folder

u need to modify the web.xml in the /WEB-INF folder by adding



resart the tomcat server this should solve ur problem

Satish SN<br />SCJP 1.4 & SCWCD 1.4
I agree. Here's the link:
subject: Servlet question
It's not a secret anymore!