Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Web Tools Project (WTP) » Run all Tomcat apps not just WTP deployed apps
Run all Tomcat apps not just WTP deployed apps [message #178884] Mon, 11 September 2006 08:56 Go to next message
Eclipse User
Originally posted by: tomh.a-t-g.com

I am trying to setup our existing application development to uset Eclipse
WTP. We have been using MyEclipse. We are using Eclipse 3.1.2 with Web
Standard Tools 1.0.3. I realize there are newer versions, but this is
because another plugin dependency with Jasper Assistant. We are running on
Windows XP. I have pointed my WTP server at the same Tomcat I used with
MyEclipse and it seems to only want to start Tomcat and not the app we had
deployed there. We use an xml file in the
TOMCAT_HOME\conf\Catalina\localhost directory that points to where Eclipse
keeps the files so we didn't have to deploy and undeploy. Is there a way I
can have my WTP server just start all the apps in Tomcat instead of just
looking for those it is deploying?

If not how do I setup this existing application in WTP? I went through the
tutorial and it talks about new applications.
Thanks,
Tom
Re: Run all Tomcat apps not just WTP deployed apps [message #178894 is a reply to message #178884] Mon, 11 September 2006 09:23 Go to previous messageGo to next message
Larry Isaacs is currently offline Larry Isaacs
Messages: 1303
Registered: July 2009
Senior Member
The default behavior for Tomcat servers is to create separate server
instances. In terms of your Tomcat installation, this means
CATALINA_HOME (where jars live) != CATALINA_BASE (where conf lives).
Double-click on the Tomcat server in the Servers view and click on "Open
launch configuration" in the Server configuration editor that appears.
Switch to the Arguments tab in the launch configuration dialog that
opens and note the location of the catalina.base system property in the
VM Arguments field. This implies that by default, the standard webapps
and others you may have deployed there are not present by default.

If you uncheck the "Run modules directly from the workspace" option in
the Overview section of the Server configuration editor, catalina.base
will be set to your Tomcat installation along with catalina.home. This
means that starting Tomcat from within Eclipse will serve the standard
webapps and your others. However, in this configuration, the files for
the Tomcat server under the Servers project in your workspace will
overwrite those in your Tomcat installation every time you start Tomcat
within Eclipse. Thus, you would need to "manage" your Tomcat server
from within Eclipse.

If you go with the option checked and you really want one or more of the
webapps in your installation, you can add them manually using the
Modules tab of the Server configuration editor.

Cheers,
Larry

Tom Henricksen wrote:
> I am trying to setup our existing application development to uset Eclipse
> WTP. We have been using MyEclipse. We are using Eclipse 3.1.2 with Web
> Standard Tools 1.0.3. I realize there are newer versions, but this is
> because another plugin dependency with Jasper Assistant. We are running on
> Windows XP. I have pointed my WTP server at the same Tomcat I used with
> MyEclipse and it seems to only want to start Tomcat and not the app we had
> deployed there. We use an xml file in the
> TOMCAT_HOME\conf\Catalina\localhost directory that points to where Eclipse
> keeps the files so we didn't have to deploy and undeploy. Is there a way I
> can have my WTP server just start all the apps in Tomcat instead of just
> looking for those it is deploying?
>
> If not how do I setup this existing application in WTP? I went through the
> tutorial and it talks about new applications.
> Thanks,
> Tom
>
>
Re: Run all Tomcat apps not just WTP deployed apps [message #179646 is a reply to message #178894] Fri, 22 September 2006 01:42 Go to previous messageGo to next message
Alan Chandler is currently offline Alan Chandler
Messages: 45
Registered: July 2009
Member
Larry Isaacs wrote:
....
>
> If you uncheck the "Run modules directly from the workspace" option in
> the Overview section of the Server configuration editor, catalina.base
> will be set to your Tomcat installation along with catalina.home.
> This means that starting Tomcat from within Eclipse will serve the
> standard
> webapps and your others. However, in this configuration, the files
> for the Tomcat server under the Servers project in your workspace will
> overwrite those in your Tomcat installation every time you start
> Tomcat
> within Eclipse. Thus, you would need to "manage" your Tomcat server
> from within Eclipse.
>
> If you go with the option checked and you really want one or more of
> the webapps in your installation, you can add them manually using the
> Modules tab of the Server configuration editor.
>

I was reading this slightly old post because of issues I have. However,
in the last paragraph above you talk about the "Modules" tab of
the "Server Configuration Editor", and that doesn't quite parse for me.

There are several places where I can edit the server configuration, and
none of them seem to have a Modules tab. Can you be more specific
about which dialog box you are talking about, and how do you navigate
there.

TIA
Re: Run all Tomcat apps not just WTP deployed apps [message #179680 is a reply to message #179646] Fri, 22 September 2006 08:26 Go to previous messageGo to next message
Larry Isaacs is currently offline Larry Isaacs
Messages: 1303
Registered: July 2009
Senior Member
Double-click on the Tomcat server in the Servers view or right-click on
it and select Open from the context menu. What opens is the Server
configuration editor. A the bottom of this editor should be Overview
and Modules tabs. That Modules tab is the one you want. You can also
add <Context> elements yourself by modifying the server.xml found in the
appropriate subfolder of the Servers project found in your workspace.

Cheers,
Larry


Alan Chandler wrote:
> Larry Isaacs wrote:
> ...
>> If you uncheck the "Run modules directly from the workspace" option in
>> the Overview section of the Server configuration editor, catalina.base
>> will be set to your Tomcat installation along with catalina.home.
>> This means that starting Tomcat from within Eclipse will serve the
>> standard
>> webapps and your others. However, in this configuration, the files
>> for the Tomcat server under the Servers project in your workspace will
>> overwrite those in your Tomcat installation every time you start
>> Tomcat
>> within Eclipse. Thus, you would need to "manage" your Tomcat server
>> from within Eclipse.
>>
>> If you go with the option checked and you really want one or more of
>> the webapps in your installation, you can add them manually using the
>> Modules tab of the Server configuration editor.
>>
>
> I was reading this slightly old post because of issues I have. However,
> in the last paragraph above you talk about the "Modules" tab of
> the "Server Configuration Editor", and that doesn't quite parse for me.
>
> There are several places where I can edit the server configuration, and
> none of them seem to have a Modules tab. Can you be more specific
> about which dialog box you are talking about, and how do you navigate
> there.
>
> TIA
>
>
Re: Run all Tomcat apps not just WTP deployed apps [message #179746 is a reply to message #179680] Sat, 23 September 2006 03:55 Go to previous messageGo to next message
Alan Chandler is currently offline Alan Chandler
Messages: 45
Registered: July 2009
Member
Larry Isaacs wrote:

> Double-click on the Tomcat server in the Servers view or right-click
> on
> it and select Open from the context menu. What opens is the Server
> configuration editor. A the bottom of this editor should be Overview
> and Modules tabs. That Modules tab is the one you want. You can also
> add <Context> elements yourself by modifying the server.xml found in
> the appropriate subfolder of the Servers project found in your
> workspace.

Thanks, I never noticed the modules tab before and I had been editing
the server.xml file manually.

Unfortunately it doesn't solve my problem - which is that I am setting
up a JDNI reference to a database for the context and although its
working in my production environment, under eclipse I am getting an
errors of the form

org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot create JDBC
driver of class '' for connect URL 'null'

Anyone any ideas - server.xml has

<Context docBase="akcmoney" path="/akcmoney" reloadable="true"
source="org.eclipse.jst.j2ee.server:akcmoney">
<Resource auth="Container" name="jdbc/akcmoney"
type="javax.sql.DataSource"/>
<ResourceParams name="jdbc/akcmoney">
<parameter>
<name>factory</name>
<value>org.apache.commons.dbcp.BasicDataSourceFactory</value >
</parameter>
<parameter>
<name>driverClassName</name>
<value>org.postgresql.Driver</value>
</parameter>
<parameter>
<name>url</name>
<value>jdbc:postgresql://127.0.0.1:5432/akcmoney</value>
</parameter>
<parameter>
<name>username</name>
<value>tomcat4</value>
</parameter>
<parameter>
<name>password</name>
<value>xxxxxxx</value>
</parameter>
<parameter>
<name>maxActive</name>
<value>20</value>
</parameter>
<parameter>
<name>maxIdle</name>
<value>10</value>
</parameter>
<parameter>
<name>maxWait</name>
<value>-1</value>
</parameter>
</ResourceParams>


</Context>
Re: Run all Tomcat apps not just WTP deployed apps [message #179802 is a reply to message #179746] Mon, 25 September 2006 10:11 Go to previous message
Larry Isaacs is currently offline Larry Isaacs
Messages: 1303
Registered: July 2009
Senior Member
Is the production environment on a different system or the same system
running Eclipse? Except for potentially the system, I assume everything
is the same between the Eclipse environment and production environment,
i.e. same version of Tomcat, same content in the webapp, etc. Is this
correct?

Cheers,
Larry

Alan Chandler wrote:
> Larry Isaacs wrote:
>
>> Double-click on the Tomcat server in the Servers view or right-click
>> on
>> it and select Open from the context menu. What opens is the Server
>> configuration editor. A the bottom of this editor should be Overview
>> and Modules tabs. That Modules tab is the one you want. You can also
>> add <Context> elements yourself by modifying the server.xml found in
>> the appropriate subfolder of the Servers project found in your
>> workspace.
>
> Thanks, I never noticed the modules tab before and I had been editing
> the server.xml file manually.
>
> Unfortunately it doesn't solve my problem - which is that I am setting
> up a JDNI reference to a database for the context and although its
> working in my production environment, under eclipse I am getting an
> errors of the form
>
> org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot create JDBC
> driver of class '' for connect URL 'null'
>
> Anyone any ideas - server.xml has
>
> <Context docBase="akcmoney" path="/akcmoney" reloadable="true"
> source="org.eclipse.jst.j2ee.server:akcmoney">
> <Resource auth="Container" name="jdbc/akcmoney"
> type="javax.sql.DataSource"/>
> <ResourceParams name="jdbc/akcmoney">
> <parameter>
> <name>factory</name>
> <value>org.apache.commons.dbcp.BasicDataSourceFactory</value >
> </parameter>
> <parameter>
> <name>driverClassName</name>
> <value>org.postgresql.Driver</value>
> </parameter>
> <parameter>
> <name>url</name>
> <value>jdbc:postgresql://127.0.0.1:5432/akcmoney</value>
> </parameter>
> <parameter>
> <name>username</name>
> <value>tomcat4</value>
> </parameter>
> <parameter>
> <name>password</name>
> <value>xxxxxxx</value>
> </parameter>
> <parameter>
> <name>maxActive</name>
> <value>20</value>
> </parameter>
> <parameter>
> <name>maxIdle</name>
> <value>10</value>
> </parameter>
> <parameter>
> <name>maxWait</name>
> <value>-1</value>
> </parameter>
> </ResourceParams>
>
>
> </Context>
>
Previous Topic:refresh JSPs
Next Topic:Exception handling with JAX-RPC
Goto Forum:
  


Current Time: Wed Jul 30 15:21:03 EDT 2014

Powered by FUDForum. Page generated in 0.02644 seconds