Tomcat + Eclipse setup

H

Horst Walter

I have a brief question about my Tomcat config. I try to place the
webapps folder structure inside my Eclipse project strutcure, but
outside the Tomcat home directory. Example:

c:\Eclipse\MyProject
c:\Java\Tomcat\webapps

In order to do so I set in the server XML:

<Host name="localhost" debug="0"
appBase="c:\Eclipse\MyProject" unpackWARs="true" autoDeploy="true"
xmlValidation="false" xmlNamespaceAware="false">

mywebapp.xml:
<Context path="/mywebapp" docBase="c:\Eclipse\MyProject\mywebapp">

Question: I would expect mywebapp.war to be automatically unpacked
when I place it in c:\Eclipse\MyProject (it's the appbase). That's the
way it works when I leave the webapp dir unchanged (inside tomcat
home). However, it does not work when I set the dir outside the tomcat
home dir.

Any hints would be appreciated.
Regards HW

PS: Tomcat 5.0.25 on Win2k
 
S

Stian Bakken

What are you trying to accomplish here? If you want to write and debug an
application under Tomcat using Eclipse, I suggest you give the Sysdeo tomcat
plugin a try :)

Stian
 
B

Bryce

I have a brief question about my Tomcat config. I try to place the
webapps folder structure inside my Eclipse project strutcure, but
outside the Tomcat home directory. Example:

c:\Eclipse\MyProject
c:\Java\Tomcat\webapps

In order to do so I set in the server XML:

<Host name="localhost" debug="0"
appBase="c:\Eclipse\MyProject" unpackWARs="true" autoDeploy="true"
xmlValidation="false" xmlNamespaceAware="false">

Well... If you specify appBase here...
mywebapp.xml:
<Context path="/mywebapp" docBase="c:\Eclipse\MyProject\mywebapp">

You don't nececarilly need the docBase here, as apps in MyProject will
be deployed. Where is your mywebapp.xml located? You definitely don't
need it if you are wanting to drop a war file in there. I'm confused
though, if you are just dropping a war file, why do you need it in
your Eclipse project structure?
 
H

Horst Walter

First of all, thanks a lot for your help!

Actually, I did it the way you suggested. I only changed the context
path, which is working fine when the structure is already there.

Then I came across the problem, that a team delivers me a war file,
which I wanted to drop to the webapps dir and get it automatically
unpacked. An there I got stuck.

Regards HW
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,070
Latest member
BiogenixGummies

Latest Threads

Top