• 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
  • Liutauras Vilda
  • Jeanne Boyarsky
  • paul wheaton
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Henry Wong
Saloon Keepers:
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Tim Moores
  • Mikalai Zaikin
Bartenders:
  • Frits Walraven

Eclispe's Dynamic Web Project

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

I am using Eclipse Java EE IDE for Web Developers & Tomcat.

When I run a dynamic web project through eclipse, why do I not see it deployed in the tomcat/webapps folder?

Where does the deployment actually reside?

Thanks.

 
Sheriff
Posts: 14691
16
Eclipse IDE VI Editor Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Your dynamic web project should be associated to a server. You can see your servers in the Servers view. Under your Tomcat server, you should see your application. You should also have a "Servers" project, which holds your Tomcat configuration. In this project, there is a file called server.xml. If you look at its content, you should see a Context tag pointing to your project. That's why your files are not actually deployed to the server. Tomcat knows where it has to find them.
 
Joseph Sweet
Ranch Hand
Posts: 327
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
So when I start tomcat up the usual way, i.e. not from within eclipse, how can I tell it to run a project which is deployed outside of the tomcat/webapps folder?
 
Christophe Verré
Sheriff
Posts: 14691
16
Eclipse IDE VI Editor Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You've got to make your own context file. This is explained here.
 
Saloon Keeper
Posts: 28319
210
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Joseph Sweet wrote:So when I start tomcat up the usual way, i.e. not from within eclipse, how can I tell it to run a project which is deployed outside of the tomcat/webapps folder?



You provide a Context definition. This can be a META-INF/context.xml file in the WAR or an XML file that you install in the TOMCAT_HOME/conf/Catalina/localhost directory (which will override META-INF/context.xml).

The root of this file is the Tomcat Context element, and the docBase= attribute should have the absolute pathname of the WAR file or of an exploded WAR directory. The app will be deployed under the context name that you provide on the path= attribute.
 
Joseph Sweet
Ranch Hand
Posts: 327
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks for this info guys!

Is there a way to tell Eclipse to physically deploy a web project into the tomcat/webapps folder?
 
No matter. Try again. Fail again. Fail better. This time, do it with this tiny ad:
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
reply
    Bookmark Topic Watch Topic
  • New Topic