• 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

Servlet question

 
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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?
 
ranger
Posts: 17347
11
Mac IntelliJ IDE Spring
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.

Mark
 
Mark Spritzler
ranger
Posts: 17347
11
Mac IntelliJ IDE Spring
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.

Mark
 
Author and all-around good cowpoke
Posts: 13078
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
Bill
 
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi
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

Cheers
 
Ranch Hand
Posts: 70
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

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

<servlet>
<servlet-name>Servlet1</servlet-name>
<servlet-class>Servlet1</servlet-class>
</servlet>

<servlet-mapping>
<servlet-name>Servlet1</servlet-name>
<url-pattern>/Servlet1</url-pattern>
</servlet-mapping>

resart the tomcat server this should solve ur problem
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic