Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » ServerTools (WTP) » Start Tomcat within eclipse from ANT task
icon5.gif  Start Tomcat within eclipse from ANT task [message #541938] Wed, 23 June 2010 09:46 Go to next message
Sharon Whipple is currently offline Sharon WhippleFriend
Messages: 7
Registered: July 2009
Junior Member
Hi all

I am trying to restart Eclipse internal Tomcat in order to automate some deployment process of our web services within eclipse.

To start tomcat in my IDE I click the start tomcat within the Eclipse IDE (see attached Image)http://techteam.files.wordpress.com/2009/02/m77cdad3d.png
I would like to be able to start the same Tomcat using ANT,

If I will start tomcat normally from :
c:\Program Files\Apache Software Foundation\Tomcat 5.5\bin\startup.bat
I will have to make sure that my web project is deployed to
c:\Program Files\Apache Software Foundation\Tomcat 5.5\webapps\

If I will be able to start the IDE tomcat server then the IDE will take care of the deployment to its internal webapps (or linkage to webapps)

Thank you.
Sharon

http://techteam.files.wordpress.com/2009/02/m77cdad3d.png
Re: Start Tomcat within eclipse from ANT task [message #542659 is a reply to message #541938] Fri, 25 June 2010 14:38 Go to previous messageGo to next message
Larry Isaacs is currently offline Larry IsaacsFriend
Messages: 1354
Registered: July 2009
Senior Member
On 6/23/2010 5:46 AM, Sharon Whipple wrote:
> Hi all
>
> I am trying to restart Eclipse internal Tomcat in order to automate some
> deployment process of our web services within eclipse.
>
> To start tomcat in my IDE I click the start tomcat within the Eclipse
> IDE (see attached
> Image)http://techteam.files.wordpress.com/2009/02/m77cdad3d.png
> I would like to be able to start the same Tomcat using ANT,
>
> If I will start tomcat normally from :
> c:\Program Files\Apache Software Foundation\Tomcat 5.5\bin\startup.bat
> I will have to make sure that my web project is deployed to c:\Program
> Files\Apache Software Foundation\Tomcat 5.5\webapps\
>
> If I will be able to start the IDE tomcat server then the IDE will take
> care of the deployment to its internal webapps (or linkage to webapps)
>
> Thank you.
> Sharon
>
>

If you start the Tomcat server in Eclipse, switch to the Debug
perspective and go to the Debug view, you can right-click on the first
subitem in the tree and select "Properties". The dialog that appears
will show you the Java command line that runs the Tomcat server.
Executing this command outside of Eclipse or within Ant will run the
Tomcat server in exactly the same way that Eclipse does. What this
doesn't do that the "Start Server" command in Eclipse typically does is
force changes to be published. I'm not sure how or if that can be done
from Ant.

Cheers,
Larry
Re: Start Tomcat within eclipse from ANT task [message #544019 is a reply to message #541938] Thu, 01 July 2010 11:32 Go to previous messageGo to next message
Sharon Whipple is currently offline Sharon WhippleFriend
Messages: 7
Registered: July 2009
Junior Member
Thank you Larry,
I was able to find the command :

"C:\Program Files\Java\jdk1.5.0_13\bin\java.exe"
agentlib:jdwp=transport=dt_socket,suspend=y,address=localhos t:2468
"-Dcatalina.base=C:\Documents and Settings\sharonw\workspace\.metadata\.plugins\org.eclipse.ws t.server.core\tmp1 "
"-Dcatalina.home=c:\Program Files\Apache Software Foundation\Tomcat 5.5"
"-Dwtp.deploy=C:\Documents and Settings\sharonw\workspace"
"-Djava.endorsed.dirs=c:\Program Files\Apache Software Foundation\Tomcat 5.5\common\endorsed"
-Xms256m -Xmx1024m -XX:PermSize=-XX:MaxPermSize=256m -Dfile.encoding=Cp1255
"-Xbootclasspath:C:\PATH..." org.apache.catalina.startup.Bootstrap start


But it fail to run:

ERROR: transport error 202: connect failed: Connection refused ["transport.c",L41]
ERROR: JDWP Transport dt_socket failed to initialize, TRANSPORT_INIT(510) ["debugInit.c",L500]
JDWP exit error JVMTI_ERROR_INTERNAL(113):
No transports initializedFATAL ERROR in native method: JDWP No transports initialized, jvmtiError=JVMTI_ERROR_INTERNAL(113)

[Updated on: Thu, 01 July 2010 11:34]

Report message to a moderator

Re: Start Tomcat within eclipse from ANT task [message #545094 is a reply to message #544019] Tue, 06 July 2010 14:59 Go to previous message
Larry Isaacs is currently offline Larry IsaacsFriend
Messages: 1354
Registered: July 2009
Senior Member
On 7/1/2010 7:32 AM, Sharon Whipple wrote:
> Thank you Larry,
> I was able to find the command :
>
> "C:\Program Files\Java\jdk1.5.0_13\bin\java.exe"
> agentlib:jdwp=transport=dt_socket,suspend=y,address=localhos t:2468
> "-Dcatalina.base=C:\Documents and
> Settings\sharonw\workspace\.metadata\.plugins\org.eclipse.ws
> t.server.core\tmp1 " "-Dcatalina.home=c:\Program Files\Apache Software
> Foundation\Tomcat 5.5" "-Dwtp.deploy=C:\Documents and
> Settings\sharonw\workspace" "-Djava.endorsed.dirs=c:\Program
> Files\Apache Software Foundation\Tomcat 5.5\common\endorsed" -Xms256m
> -Xmx1024m -XX:PermSize=-XX:MaxPermSize=256m -Dfile.encoding=Cp1255
> "-Xbootclasspath:C:\PATH..." org.apache.catalina.startup.Bootstrap start
> :blush:
> But it fail to run:
>
> ERROR: transport error 202: connect failed: Connection refused
> ["transport.c",L41]
> ERROR: JDWP Transport dt_socket failed to initialize,
> TRANSPORT_INIT(510) ["debugInit.c",L500]
> JDWP exit error JVMTI_ERROR_INTERNAL(113): No transports
> initializedFATAL ERROR in native method: JDWP No transports initialized,
> jvmtiError=JVMTI_ERROR_INTERNAL(113)

The fact that you get this outside of Eclipse indicates it's a problem
between Java and your system. Google may be able to provide an answer.
You might start with this one:

http://wiki.eclipse.org/Debug_FAQ#I_can_run_a_program_but_no t_debug_it.3F.3F.3F

Cheers,
Larry
Previous Topic:JSF 2.0 completion in .xhtml files with Eclipse 3.6 M6
Next Topic:why jst.server.tomcat not extended from jst.server.generic?
Goto Forum:
  


Current Time: Fri Apr 19 12:31:29 GMT 2024

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

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

Back to the top