• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Tim Cooke
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Liutauras Vilda
Sheriffs:
  • Rob Spoor
  • Junilu Lacar
  • paul wheaton
Saloon Keepers:
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Carey Brown
  • Scott Selikoff
Bartenders:
  • Piet Souris
  • Jj Roberts
  • fred rosenberger

Stop/Start Tomcat within eclipse

 
Ranch Hand
Posts: 294
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi all
Is it possible to stop/start internal eclipse tomcat using ant task?
 
author
Posts: 5856
7
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
There is no Tomcat internal to Eclipse - when you created a Tomcat sever in Eclipse, you had to specify the Tomcat installation directory.
 
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Sharon whipple wrote:Hi all
Is it possible to stop/start internal eclipse tomcat using ant task?



Yes,
<target name="start">
<exec executable="cmd">
<arg value="/c"/>
<arg value="${path}/catalina.bat"/>
</exec>
</target>
 
Sharon whipple
Ranch Hand
Posts: 294
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thank you Jagdishkumar
Executing CMD catalina.bat start
Will start Tomcat in new process, and won’t start the "internal" eclipse tomcat,
Although this is the server path, webapps dir doesn’t contain the deployed war currently under development in eclipse.
Am I missing something?
 
Author
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Just out of curiosity, why do you want to use the "internal" Tomcat?
 
Saloon Keeper
Posts: 25608
183
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

David Newton wrote:Just out of curiosity, why do you want to use the "internal" Tomcat?



Probably for debugging. Note that she said the WAR wasn't deployed.

The (never-to-be-sufficiently-accursed) WTP Eclipse plugin makes a copy of some (but not all) of the Tomcat conf directories and files and botches them up, putting the application context elements in the copied server.xml file, despite that being discouraged since the end of life of Tomcat Version 3. So if an external agency attempts to start Tomcat, it won't use the Eclipse copy of the server.xml, unless you go to pains to redirect the CATALINA_BASE to the WTP copy instead of the normal config.

It's all pretty nasty as far as I'm concerned, having enjoyed the more civilized approach of the sysdeo plugin for all those years. Rather than using Ant to start the "Eclipse Tomcat", I'd recommend just starting Tomcat via Eclipse itself.
 
Sharon whipple
Ranch Hand
Posts: 294
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

David Newton wrote:Just out of curiosity, why do you want to use the "internal" Tomcat?



We have several grueling process in our app,
for example deploying Web services using Axis and creating the Web services beans,
this process include restarting the server several times,

I am trying to automate these processes using ant.

Nothing I can do to make it ant/ tomcat use the eclipse tomcat instance located at:
.. \workspace\.metadata\.plugins\org.eclipse.wst.server.core\tmp1

Can i make eclipse deploy the war first to my installed tomcat at "c:\program files\Apache ..."
 
Sharon whipple
Ranch Hand
Posts: 294
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am still trying to overcome restarting tomcat within eclipse,
Any idea will be welcome!
 
David Newton
Author
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You can use whatever Tomcat you want--just configure it in the app servers.
 
Sharon whipple
Ranch Hand
Posts: 294
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

David Newton wrote:You can use whatever Tomcat you want--just configure it in the app servers.


Sorry for my ignorance,
Say my source files are under "c:\myProj", And tomcat is installed under: "c:\Program Files\Apache Software Foundation\Tomcat 5.5"
I can restart the tomcat server under this directory,But how do I make eclipse deploy source files to the tomcat webapps dir?

 
David Newton
Author
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Just set up the project to run using that server; Eclipse will handle deployment issues.
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic