aspose file tools*
The moose likes IDEs, Version Control and other tools and the fly likes context path overwritten Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » IDEs, Version Control and other tools
Bookmark "context path overwritten" Watch "context path overwritten" New topic
Author

context path overwritten

san krish
Ranch Hand

Joined: Aug 11, 2010
Posts: 40
I use apache tomcat 4.1.40. Everytime i restart my tomcat server the context path in server.xml file is overwritten and I have to edit them each time to have my application running.
My server location is c:apache-tomcat-4.1.40. So i need to edit my server.xml file inside conf in the above path during all restart. I have choosen the 2nd option in server location tab ie) Use tomcat installation. my deploy path is
wtpwebapps.
Please help.
Rene Larsen
Ranch Hand

Joined: Oct 12, 2001
Posts: 1179

From where do you start Tomcat ??

- an IDE (Eclipse, Netbeans etc.) ??
- command line ??


Regards, Rene Larsen
Dropbox Invite
san krish
Ranch Hand

Joined: Aug 11, 2010
Posts: 40
from eclipse...below is how it is overwritten...c://path is duplicated twice...so i have to delete and restart again...

<Context docBase="C:\apache-tomcat-4.1\webapps\apache-tomcat-4.1\webapps\kst" path="/kst" reloadable="true" source="org.eclipse.jst.j2ee.server:kst">
<Resource auth="Container" name="jdbc/kst" type="javax.sql.DataSource"/>
Rene Larsen
Ranch Hand

Joined: Oct 12, 2001
Posts: 1179

And how is your eclipse tomcat plugin set-up ??

I think you have chosen that the plugin should use the server.xml in your tomcat installation, instead of is own. Therefore you need to do your configuration from the plugin - and only from there.

If you still need to do some manually configuration in server.xml - then you need to stop using the plugin for any configuration (other then start/stop/restart) - and do all configuration manually.
san krish
Ranch Hand

Joined: Aug 11, 2010
Posts: 40
I just rightclick in eclipse add new server and i start/stop/restart from IDE. Does this help?
Rene Larsen
Ranch Hand

Joined: Oct 12, 2001
Posts: 1179

san [surl='http://www.javaranch.com' class='faq' title='JavaRanch wrote:java[/surl]]I just rightclick in eclipse add new server and i start/stop/restart from IDE. Does this help?


This new server - how is this set-up by default ??

Is it the server plugin from eclipse' WTP project, or some other one ??

Personally I don't use any server plugin, because it doesn't give me any help - just the opposite (like you are experience right now). I always run my server as a stand alone (started from outside my IDE), and set-up so I still can run it in debug mode from inside my IDE.
san krish
Ranch Hand

Joined: Aug 11, 2010
Posts: 40
It is server plugin from eclipse.
This is the actual path C:\apache-tomcat-4.1.40\wtpwebapps\kst
Rene Larsen
Ranch Hand

Joined: Oct 12, 2001
Posts: 1179

san java wrote:It isi server plugin from eclipse.
This is the actual path C:\apache-tomcat-4.1.40\wtpwebapps\kst


Again - what are the default config ??

double click on the server - and you should get a configuration page opened, here you should see which server.xml it is set-up to use.

Here you can see how the server plug works: http://www.mulesoft.com/tomcat-eclipse

In the configuration page you should have 3 options for the server.xml

1) don't use tomcat's own config.
2) use tomcat's config - and override
3) use a custom config location
san krish
Ranch Hand

Joined: Aug 11, 2010
Posts: 40
Under Server locations, I choose the 2nd option.
Use tomcat installation(takes control of tomcat installation)


The options are
1. Use workspace metadata(does not modify tomcat installation)
2. Use tomcat installation(takes control of tomcat installation)
3. Use custom location(does not modify tomcat installation)

i choose the 2nd option and the server path is: c:\apache-tomcat-4.1.40
deploy path is wtpwebapps
Peter Johnson
author
Bartender

Joined: May 14, 2008
Posts: 5779
    
    7

"san java", please read your private messages for an important administrative matter.


JBoss In Action
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: context path overwritten
 
Similar Threads
How and where to configure tomcat6 for default directory instead of ROOT
Deploying WAR files on Tomcat 4.0
Adding new application in tomcat
Root Context - mywebapps has no effect
configuring web application