Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » ServerTools (WTP) » Tomcat Server oroblem with Eclipse
Tomcat Server oroblem with Eclipse [message #173002] Wed, 05 July 2006 11:45 Go to next message
Eclipse UserFriend
Originally posted by: fleming.rhrk.uni-kl.de

Hello everyone,

I want to know how to bind an existing Tomcat Server Configuration in
Eclipse with Eclipse webtools.At the moment Eclipse creates his own
server.xml file without using the one I have already configured. How can I
use my own configuration of Tomcat with Eclipse webtools.

Thank you for help.
Re: Tomcat Server oroblem with Eclipse [message #173033 is a reply to message #173002] Wed, 05 July 2006 12:06 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: gene.rockhoppertech.com

Marc Fleming wrote:
> Hello everyone,
>
> I want to know how to bind an existing Tomcat Server Configuration in
> Eclipse with Eclipse webtools.At the moment Eclipse creates his own
> server.xml file without using the one I have already configured. How can
> I use my own configuration of Tomcat with Eclipse webtools.
> Thank you for help.
>
The easiest solution: You could copy your elements into the eclipse
generated server.xml

what are your custom elements though? Perhaps a context.xml would be a
better solution.
Re: Tomcat Server oroblem with Eclipse [message #173110 is a reply to message #173002] Wed, 05 July 2006 14:47 Go to previous messageGo to next message
Larry Isaacs is currently offline Larry IsaacsFriend
Messages: 1354
Registered: July 2009
Senior Member
When you create a Tomcat server, it will "import" the server.xml file,
and others, that exist at that time, leaving out and Context elements it
may contain. It leaves out the contexts because it defaults to running
with a separate catalina.base to avoid altering your Tomcat
installation. You can change this by double clicking on the Tomcat
server in the Servers view and unchecking the "Run modules directly from
the workspace" setting. This will cause the server to be run with the
catalina.base set to your Tomcat installation. However, at this point
Eclipse WTP now "owns" your installation. The imported server.xml file
found under the Servers project in your workspace, along with the
others, will overwrite the ones in your installation every time you
start the server.

With "Run modules..." checked or unchecked, it is the server.xml under
the Servers project that controls the Tomcat configuration. You should
be able to make any needed modifications to define your configuration.

Cheers,
Larry

Marc Fleming wrote:
> Hello everyone,
>
> I want to know how to bind an existing Tomcat Server Configuration in
> Eclipse with Eclipse webtools.At the moment Eclipse creates his own
> server.xml file without using the one I have already configured. How can
> I use my own configuration of Tomcat with Eclipse webtools.
> Thank you for help.
>
Re: Tomcat Server problem with Eclipse [message #173150 is a reply to message #173110] Wed, 05 July 2006 16:15 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: fleming.rhrk.uni-kl.de

Hello I succeeded to start the right server now. Thank you for this help.
But I also want to be able to use JUDDI (an implementation of UDDI) out of
Eclipse. JUDDI must be able to locate my database. This works when I start
Tomcat from the command line because Tomcat then knows where to find the
web.xml and juddi.properties file of juddi WEB-Application. But when I
start the Server from Eclipse JUDDI doesn`t have database access. I
supose this is because Eclipse doesn't know where to search for JUDDI
application and its configuration files web.xml and juddi.properties. How
can I integrate these ones together whith JUDDI in Eclise. Eclipse only
knows the web.xml of my new project which has to use JUDDI.

Thank you for help
Re: Tomcat Server problem with Eclipse [message #173165 is a reply to message #173150] Wed, 05 July 2006 16:31 Go to previous messageGo to next message
Larry Isaacs is currently offline Larry IsaacsFriend
Messages: 1354
Registered: July 2009
Senior Member
You can try manually defining an external web application. Double-click
on the the Tomcat server in the servers view. In the Tomcat
configuration editor that appears, switch to the Modules tab. Click on
"Add External Web Module" and specify the Document base and Path. This
adds a <Context> element to the server.xml under the Servers project.
If further customization is needed, open the server.xml and add any
necessary modifications.

Cheers,
Larry

Marc Fleming wrote:
> Hello I succeeded to start the right server now. Thank you for this
> help. But I also want to be able to use JUDDI (an implementation of
> UDDI) out of Eclipse. JUDDI must be able to locate my database. This
> works when I start Tomcat from the command line because Tomcat then
> knows where to find the web.xml and juddi.properties file of juddi
> WEB-Application. But when I start the Server from Eclipse JUDDI doesn`t
> have database access. I supose this is because Eclipse doesn't know
> where to search for JUDDI application and its configuration files
> web.xml and juddi.properties. How can I integrate these ones together
> whith JUDDI in Eclise. Eclipse only knows the web.xml of my new project
> which has to use JUDDI.
>
> Thank you for help
>
Re: Tomcat Server problem with Eclipse [message #173264 is a reply to message #173033] Thu, 06 July 2006 07:38 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: fleming.rhrk.uni-kl.de

Hello again. I have located the problem.I now have remarked that when
start Tomcat from command line JUDDI also doesn`t get a connection to the
datababase. This is because Eclipse overwrites my original server.xml and
deletes the following Context tag from the original server.xml.The Context
tag is the following:

<Context path="/juddi" docBase="juddi" debug="5" reloadable="true"
crossContext="true">
<ResourceLink name="jdbc/postgres" global="jdbc/postgres"
type="javax.sql.DataSource"/>
<Logger className="org.apache.catalina.logger.FileLogger"
prefix="localhost_juddiDB_log" suffix=".txt" timestamp="true"/>
</Context>

I then tried to add this Context tag to the server.xml file of Eclipse and
tried to restart the server out of Eclipse. I got the following server
Error message from Eclipse:

Could not find a client that is able to launch the selection.

What does this mean? What should I do? I also tried your suggestion to
add an external web module. But this didn't work. Perhaps I have entered
the wrong docBase and path parameter. What should I enter there. For both
parameters I entered the home directory of JUDDI. I tried before I
modified the server.xml.

Thank you for help.

Cheers,
Marc
Re: Tomcat Server problem with Eclipse [message #173328 is a reply to message #173264] Thu, 06 July 2006 12:17 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: gene.rockhoppertech.com

Marc Fleming wrote:
>
> Hello again. I have located the problem.I now have remarked that when
> start Tomcat from command line JUDDI also doesn`t get a connection to
> the datababase. This is because Eclipse overwrites my original
> server.xml and deletes the following Context tag from the original
> server.xml.The Context tag is the following:
>
> <Context path="/juddi" docBase="juddi" debug="5" reloadable="true"
> crossContext="true">
> <ResourceLink name="jdbc/postgres" global="jdbc/postgres"
> type="javax.sql.DataSource"/>
> <Logger className="org.apache.catalina.logger.FileLogger"
> prefix="localhost_juddiDB_log" suffix=".txt" timestamp="true"/>
> </Context>
>
> I then tried to add this Context tag to the server.xml file of Eclipse
> and tried to restart the server out of Eclipse. I got the following
> server Error message from Eclipse:
>
> Could not find a client that is able to launch the selection.
>
> What does this mean? What should I do? I also tried your suggestion to
> add an external web module. But this didn't work. Perhaps I have entered
> the wrong docBase and path parameter. What should I enter there. For
> both parameters I entered the home directory of JUDDI. I tried before I
> modified the server.xml.
>
> Thank you for help.
>
> Cheers,
> Marc

You'd think that creating a META-INF/context.xml would work - as it
should - and as the tomcat docs suggest - but it doesn't with wtp.

As a kludge create a tomcatdir/conf/context.xml with the context element
you provided above.
Re: Tomcat Server problem with Eclipse [message #173382 is a reply to message #173328] Thu, 06 July 2006 15:57 Go to previous message
Eclipse UserFriend
Originally posted by: fleming.rhrk.uni-kl.de

It now works correctly.
Thank you to Gene De Lisa.
Previous Topic:Tomcat realms problem - SQLException
Next Topic:Eclipse with WTP and Tomcat on Mac
Goto Forum:
  


Current Time: Thu Mar 28 12:36:17 GMT 2024

Powered by FUDForum. Page generated in 0.05280 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top