• 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
  • Tim Cooke
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Liutauras Vilda
  • Henry Wong
  • Devaka Cooray
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Al Hobbs
  • Carey Brown
Bartenders:
  • Piet Souris
  • Mikalai Zaikin
  • Himai Minh

Urgent Help-Setting Context Path in tomcat 5.5.7

 
Ranch Hand
Posts: 228
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello Friends, Gurus, Mentors,
I have installed tomcat 5.5.7 and was unable to set context path to run some my own servlets and jsps.

Can You one please let me know how to setup context path for running my own servlet files
let us assume i have folder MyProject and in that i have web-inf/web.xml
and web-inf/classes/HelloServlet.class

This i copied from old tomcat4
I tried to find the context path in server.xml and web.xml.
I unable to find it.

Can anyone please explain initial things needed to setup tomcat for running custom webapps (servlets and JSPS)
if there is any link on any site or in ur javaranch please do post it.


I require this immediately please. I request people to help me...


Thanks in advance.
 
Sheriff
Posts: 13411
Firefox Browser VI Editor Redhat
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Just move your app into Tomcat's webapps directory.

If you need to manually create your Context entry, read the docs on the Tomcat site. The context element should no longer be written directly to server.xml. You now put xml fragment files in a directory under conf.

-Ben
 
Karthik Rajendiran
Ranch Hand
Posts: 228
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Can you please explain last sentence.
put xml fragment files.
please
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser VI Editor Redhat
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The Context tag that you used to write in server.xml now goes in a file with your context name and an .xml extension. There is a directory for each host under TOMCAT_HOME/conf/Catalina/localhost.

Again, non of this is necessary if you just put your app (as either a war file or a directory tree in the TOMCAT_HOME/webapps directory.

http://jakarta.apache.org/tomcat/tomcat-5.5-doc/deployer-howto.html
 
reply
    Bookmark Topic Watch Topic
  • New Topic