Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Newcomers » Newcomers » Problem with Eclipse tomcat server context getting stripped
Problem with Eclipse tomcat server context getting stripped [message #769703] Thu, 22 December 2011 09:59 Go to next message
Ari  is currently offline Ari
Messages: 1
Registered: December 2011
Junior Member
Hello all, I had a long-running issue in Eclipse Helios. and after getting a new computer, I realized I had same issue pop up a week after using Indigo, and was wondering if i can look at changing any settings to fix this as not sure what I could have done to get this behavior ...

Basically when I start up my Eclipse tomcat server, the <Context.../> it publishes in the server.xml used to look like this (the one published in C:\dev\workspace\eclipse-workspace\.metadata\.plugins\org.eclipse.wst.server.core\tmp4\conf):

      <Context docBase="C:\dev\workspace\eclipse-workspace\.metadata\.plugins\org.eclipse.wst.server.core\tmp4\wtpwebapps\my_app" path="/my_app" reloadable="true" source="org.eclipse.jst.j2ee.server:my_app">
      	<Resource auth="Container" driverClassName="oracle.jdbc.OracleDriver" factory="oracle.jdbc.pool.OracleDataSourceFactory" maxActive="100" maxIdle="30" maxWait="1000" name="jdbc/our_db" 
	    	user="our_username" password="our_password" removeAbandoned="true" type="oracle.jdbc.pool.OracleConnectionPoolDataSource" 
	    	url="jdbc:oracle:thin:@db.example.com:our_port:db_name" />
      </Context>     



... but now it looks like this:
      <Context docBase="C:\dev\workspace\eclipse-workspace\.metadata\.plugins\org.eclipse.wst.server.core\tmp4\wtpwebapps\ROOT" path="" reloadable="false"/><Context docBase="C:\dev\workspace\eclipse-workspace\.metadata\.plugins\org.eclipse.wst.server.core\tmp4\wtpwebapps\my_app" path="/my_app" reloadable="true" source="org.eclipse.jst.j2ee.server:my_app"/>



Basically I lose all my database info in my_app's Context, plus it adds the "ROOT" context in the published server.xml, and my server doesnt doesnt start up correctly as a result of that ... I usually just put a comment above my Eclipse server.xml (the one in C:\dev\workspace\eclipse-workspace\Servers\my_app - Tomcat v6.0 Server at localhost-config) with my <Context.../> xml again and that doesn't get stripped out... then in the server.xml published in C:\dev\workspace\eclipse-workspace\.metadata\.plugins\org.eclipse.wst.server.core\tmp4\conf, I copy whats in that comment and overwrite the stripped down version Eclipse creates, and quickly restart the tomcat server in Eclipse.

Its a pain as another simple tomcat project I setup in Eclipse started having same issue, so was wondering what I can do to solve as its a bit of hassle to start up the server each time [the good Context i copy manually will always get stripped out when project auto-published i think, so i have to re-copy,save,restart server in Eclipse].

Thanks!,
Ari
Re: Problem with Eclipse tomcat server context getting stripped [message #769839 is a reply to message #769703] Thu, 22 December 2011 14:27 Go to previous message
Russell Bateman is currently offline Russell Bateman
Messages: 3138
Registered: July 2009
Location: Provo, Utah, USA
Senior Member

On 22-Dec-11 07:59, Ari wrote:
> Hello all, I had a long-running issue in Eclipse Helios. and after
> getting a new computer, I realized I had same issue pop up a week after
> using Indigo, and was wondering if i can look at changing any settings
> to fix this as not sure what I could have done to get this behavior ...
> Basically when I start up my Eclipse tomcat server, the <Context.../> it
> publishes in the server.xml used to look like this (the one published in
> [snip]
> Its a pain as another simple tomcat project I setup in Eclipse started
> having same issue, so was wondering what I can do to solve as its a bit
> of hassle to start up the server each time [the good Context i copy
> manually will always get stripped out when project auto-published i
> think, so i have to re-copy,save,restart server in Eclipse].
>
> Thanks!,
> Ari

This is rather more an Eclipse web tools forum question. You'll get much
more and better help there.
Previous Topic:Upgrading
Next Topic:eclipse doesn't even start...
Goto Forum:
  


Current Time: Sat Aug 02 02:53:23 EDT 2014

Powered by FUDForum. Page generated in 0.01584 seconds