How to start and stop Tomcat from ANT
March 25, 2006 112 Comments
This approach is not based on the Tomcat Ant Tasks or a brute force <exec dir=”${tomcat.home}/bin” executable=”startup.bat”/> kind of approach.
After wading through startup.bat and catalina.bat I figured that they boil down to the following:
<target name="tomcat-start">
<java jar="${tomcat.home}/bin/bootstrap.jar" fork="true">
<jvmarg value="-Dcatalina.home=${tomcat.home}"/>
</java>
</target>
<target name="tomcat-stop">
<java jar="${tomcat.home}/bin/bootstrap.jar" fork="true">
<jvmarg value="-Dcatalina.home=${tomcat.home}"/>
<arg line="stop"/>
</java>
</target>
You can have in build.properties, something like the following entry:
tomcat.home=E:/peter/opt/apache-tomcat-5.5.12
It works great and in Eclipse and NetBeans the stack traces within the log window hyperlink to the source code just as you would expect. You would normally combine these ant targets with a “war” task. The Tomcat Reload Ant task can also be used to speed up development time.
One of the advantages of this approach is that you can extend it to start Tomcat for remote debugging:
<target name="tomcat-start-debug">
<java jar="${tomcat.home}/bin/bootstrap.jar" fork="true">
<jvmarg value="-Dcatalina.home=${tomcat.home}"/>
<jvmarg value="-Xdebug"/>
<jvmarg
value="-Xrunjdwp:transport=dt_socket,address=8000,server=y,suspend=n"/>
</java>
</target>





Congrats!.
Is one of the best approaches to manage tomcat ignition.
Thanks a lot.
Works great!
One minor adjustment if you have spaces in your tomcat.home. For example: C:\Program Files\Apache Software Foundation\Tomcat 5.5
Tokenize the second ${tomcat.home} value:
Thanks!
Hello
When I try to implement the tomcat-start and stop i got the error like
tomcat-stop:
[java] java.lang.NoClassDefFoundError: Files/Apache
[java] Exception in thread “main”
[java] Java Result: 1
Please help me why this error show up.
Thanks Mark G & sbaidya for helping me identify a subtle bug in the snippets. When the path of “tomcat.home” has spaces, then “jvmarg line” usage would make the JVM think that the line contained multiple ‘tokens’
The solution is to use “jvmarg value” and ant will do the rest. I have updated the post.
It works fine dude! Good job! Thanks.
How do you configure this so that Tomcat is launched in a separate command line?
You mean something like a DOS window? I don’t think that’s possible with Ant. Not sure why you’d want this and what I would do is use the normal *.bat / *.sh scripts.
Note that when launching within Eclipse or NetBeans, any error stack traces hyperlink to source code, which is a huge time saver.
Pingback: Le blog » Archive du blog » Lancer et arrêter Tomcat dans Ant
Pingback: Le blog
very good example ….if possible please put some more examples on different ant tasks that can be easily done in similar fashion.
Pingback: How to start and stop Jetty from Ant « Incremental Operations
hi, can u plz tell me how can I stop and restart tomcat remotly.
Thanks.
the code I am using is:
===================================1. target name=”tomcat-stop22222″
2. telnet userid=”retadmin”
password=”wed@day”
server=”iserver” port=”40″
timeout=”20″
3. write echo=”false”
stop tomcat5
write
4. telnet
5. target
hi,this code worked perfectly… thanks a lot….
but when i start executing it using
it didnt worked.It is giving the error saying
Execute failed:
java.io.IOException: CreateProcess: startup.bat error=2
But when i execute this command to open a simple notepad application, it perfectly worked
Could you tell me the solution for this?
Hi,
It is working! Thanks for the script.
I used the content of the tasks and defined them in Eclipse like External Tools. Here is the configuration for Start Tomcat:
In Main Tab:
Location: ${java_home}/bin/java.exe
Working Directory: ${project_loc}
Arguments: -Dcatalina.home=${tomcat_home} -Dorg.apache.tapestry.disable-caching=true -jar ${tomcat_home}/bin/bootstrap.jar
In Common Tab check “Laucnh in backgrund”
in Console View you get the output.
For Debug and Stop is similar.
If you want to start and stop tomcat conditionally the following works for me.
Assumptions:
A. Tomcat uses the port 8080 (this is the default)
B. You have downloaded the latest ant-contrib.jar from http://ant-contrib.sourceforge.net/
C. The latest ant-contrib.jar is named ant-contrib-1.0b3.jar (the latest version will probably be called something different so rename in the code below as appropriate)
1. Place ant-contrib-1.0b3.jar into the base directory of your project.
3. Add the following code to the build.xml
<taskdef resource=”net/sf/antcontrib/antcontrib.properties”>
<classpath>
<pathelement location=”${basedir}/ant-contrib-1.0b3.jar”/>
</classpath>
</taskdef>
4. Change your tomcat-start task to:
<target name=”tomcat-start”>
<if><not><http url=”http://localhost:8080″/></not><then>
<java jar=”${tomcat.home}/bin/bootstrap.jar” fork=”true”>
<jvmarg value=”-Dcatalina.home=${tomcat.home}”/>
</java>
</then></if>
</target>
5. Apply the same logic to the tomcat-stop task (the same change but without the <not></not>)
PS – there is no step 2 :)
Download ant-contrib: isn’t that step 0? :P
Honestly I don’t like extra JAR files having to be placed in the project folder structure.
Why do you need the extra JAR file if you can do without it?
You should read a more recent blog post of mine that shows how to conditionally stop and start Jetty using Ant. The same principles will apply to Tomcat of course.
http://ptrthomas.wordpress.com/2006/10/10/how-to-start-and-stop-jetty-from-ant/
Is there anyway to start tomcat thru tomcat plugin for eclipse, using ANT.
for instance, i want to run my ant build scripts and automatically start tomcat within eclipse, once build is complete,.
Suggestion, don’t use the tomcat plugin for eclipse :)
Also look at the link in my previous comment.
Works, but when I invoke tomcat-start from my build.xml in the command line, the build.xml never ends and the server console appears to be dumping out to the window I invoked my build.xml from. The last thing I see (if I do not access my app) is Server startup time in the window. Any ideas?
This is normal and you get to see the log in the console just as you would if you used Tomcat’s start.bat. You do have to open a new console and run “ant tomcat-stop”, CTRL-C would also work of course.
Thing is – within Eclipse and NetBeans, with the built-in Ant support – it is very easy to select and run an Ant target – e.g. double-click within the Ant view for Eclipse and I can create toolbar shortcuts to Ant targets in NetBeans.
thx for this easy solution, but i have still a problem. I want ant to delete the old webapp before deploying a new one. So it´s necessary the tomcat is stopped. How check the status and then go on with the deleting task? thx a lot
Yes, have a look at the link at comment #17 and that should be exactly what you need. Although that example uses Jetty, it should be very easy for you to apply it to Tomcat.
Checking if the web server is running or not is as easy as using the ant “socket” task.
The solution to this is to add spawn=”true” to the ANT task.
Warren said on March 28, 2007:
“Works, but when I invoke tomcat-start from my build.xml in the command line, the build.xml never ends and the server console appears to be dumping out to the window I invoked my build.xml from. The last thing I see (if I do not access my app) is Server startup time in the window. Any ideas?”
Thank you Peter(17) and Stewart(24) – that is just what I needed :)
Thanks Peter! This approach works great! I have been trying to get Tomcat running using the Tomcat-Ant-Tasks http://tomcat.apache.org/tomcat-5.5-doc/manager-howto.html#Executing%20Manager%20Commands%20With%20Ant . But I keep on getting an Exception when I try to start Tomcat:
java.net.ConnectException: Connection refused: connect.
I have tried deploy, reload and undeploy and they work fine. any ideas why. Thanks again.
Really hard to tell Abhishek, but looks like something in your Ant target is trying to connect to Tomcat before it is started and obviously cannot. Maybe you have something mixed up?
I want to comment on #24 – I am not sure if spawn=”true” is a good idea because then the Tomcat console will not be visible. You will never know if Tomcat is running or not and it will be much more difficult to “kill” the process.
Hi,
I’ve tried this method which seems to work fine, except that due to my configuration, I need to provide Tomcat with a set of “config” files before it starts. I’ve tried to set the nested “classpath” tag in the “java” tag but it doesn’t work: files are still unfounded by the classLoader.
If anyone can help on this….
John: for the “java” task, instead of using the “jar” attribute, try using the “classname” attribute with a value of “org.apache.catalina.startup.Bootstrap”
And now the nested “classpath” tag should take effect. You should add “${tomcat.home}/bin/bootstrap.jar” to the classpath of course.
Do let me know if this works.
HI Peter
how to refresh the tomcat cache with out restarting it when there is any change in properties file (for e.g loacl.properties).
i guess reloadable=true in conf/server.xml will be for .java files
and in case of jsp files if there is any timestamp difference in .jsp and .class contents of tomcat/work folder will get refreshed
but i have no clue how to handle .properties or xml files
Not sure Vikram.
Maybe if you know which Java file is responsible for re-loading the *.properties or *.xml file – you can use the Ant “touch” task:
http://ant.apache.org/manual/CoreTasks/touch.html
Thanks Peter i will try this and let u know
Hi Peter
i got the solution , by enabling Reload an existing application using Tomcat Manager ,This can be useful when the web application context is not reloadable and you have updated classes or property files in the /WEB-INF/classes directory or when you have added or updated jar files in the /WEB-INF/lib directory. I have implemented this in a sample web app by changing values in properties file with out restarting it . it worked fine. Thorough testing needs to be done
i referred this link
http://tomcat.apache.org/tomcat-5.0-doc/manager-howto.html#Reload%20An%20Existing%20Application
Vikram
Hi All,
If you have setup Tomcat as a service and want to initiate this service via Ant you can do the following. Execute tomcat as a service when the service is called Tomcat5
<target name="tomcat-start-debug">
<exec executable="net">
<arg value="start"/>
<arg value="Tomcat5"/>
</exec>
</target>
<target name="tomcat-stop">
<exec executable="net">
<arg value="stop"/>
<arg value="Tomcat5"/>
</exec>
</target>
Keeps the ant tasks clean and all the arguments within the service that can be managed via the Tomcat monitor.I have tested this with Tomcat 5.0.
Renny
Thanks Renny, of course I guess this works only on Windows :) And developers are assumed to have the Tomcat service installed.
The Ant based approach in the blog post works anywhere and is simpler to roll out to large teams. You just have to extract the zip distribution of Tomcat.
Excellent. Thanks you saved me alot of time. Very useful.
I am using the approach described in the post on Win XP, but have noticed that though Tomcat is stopped, the java process that was forked remains alive.
This is bad for since it keeps locks on files that I’d like to change.
Has anyone experienced this? Have a solution to have the java executable terminate ?
I’ve seen this happen when a web app deployed within Tomcat has a problem shutting down gracefully, specifically when I had Quartz mis-configured once.
Try to see if a ‘vanilla’ Tomcat shuts down fine with this approach and then you can confirm if it indeed is a problem with your WAR.
That was it. Thanks !
WHEN I USE THE DOWN ANT SCRIPT I GET java.net.ConnectException: Connection refused: connect
********************************
********************************
ALL THE Exception IS:
tomcat-stop:
[java] 21/01/2008 12:02:39 ص org.apache.catalina.startup.Catalina stopServer
[java] SEVERE: Catalina.stop:
[java] java.net.ConnectException: Connection refused: connect
[java] at java.net.PlainSocketImpl.socketConnect(Native Method)
[java] at java.net.PlainSocketImpl.doConnect(Unknown Source)
[java] at java.net.PlainSocketImpl.connectToAddress(Unknown Source)
[java] at java.net.PlainSocketImpl.connect(Unknown Source)
[java] at java.net.SocksSocketImpl.connect(Unknown Source)
[java] at java.net.Socket.connect(Unknown Source)
[java] at java.net.Socket.connect(Unknown Source)
[java] at java.net.Socket.(Unknown Source)
[java] at java.net.Socket.(Unknown Source)
[java] at org.apache.catalina.startup.Catalina.stopServer(Catalina.java:395)
[java] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[java] at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
[java] at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
[java] at java.lang.reflect.Method.invoke(Unknown Source)
[java] at org.apache.catalina.startup.Bootstrap.stopServer(Bootstrap.java:344)
[java] at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:435)
[java] Java Result: 1
BUILD SUCCESSFUL
ALSO THE TOMCAT SERVER STIL WORK AND NOT STOP WHERE THE PROBLEM IN THE SCRIPT OF (TOMCAT-STOP)
PAKRY: looks like the Server port (default 8005) on which Tomcat listens for shutdown requests is blocked, you can try to change it by editing conf/server.xml
Dear, the start target is indeed working BUT as soon as I close the dow window in which the ANT was running, the tomcat is stopped. I think it is because the target is not run in the background (like one would do in UNIX with the & switch) … How can we achieve this using the target as in your excellent article?
thx a lot
Dear,
Sorry for the previous post, I did not see the question was already answered, the spawn did indeed do the trick.
thx a lot
PS This is the code then:
how to start or stop web application instance in tomcat(not full tomcat) using ant script?
@Neeraj – refer the link to Tomcat Ant Tasks that appears at the start of the blog post.
Great post but I have one problem I have spent many hours trying to resolve. Any suggestions will be appreciated.
Here’s the background: On my local machine I do development work for a web appl in Java 1.4 and Tomcat 5.02 to be compatible with the shared hosting environment where it will be deployed. I also have Java 6 installed on my local machine.
Here’s the problem: The server starts and runs perfectly until a new JSP gets deployed and the server tries to compile it. Then I get an error telling me that rt.jar has the wrong version of Object and it is plain from the error message that it is looking at the Java 6 version of rt.jar.
Obviously the compile step is not using the same classpath as the start task. I tried the technique in comment 29 but nothing changed. I have the java home and classpath system variables pointing at Java 1.4. I’m no registry expert but I suppose there must be something in there that makes Java 6 the default but actually I want it to be except for this application. There’s bound to be a way to explicitly set the classpath for the JSP compiles in Tomcat but I haven’t been able to find it and it’s apparently not the classpath used in the Ant start task.
Here’s my Ant task, but as I said it appears the classpath here has nothing to do with the classpath used to compile JSP’s.
Sorry but the Ant task was stripped off my comment…trying again…
Hi
May i know what is the command for prompting either yes or no option for performing some action based on prompt value like Deletion or Compiling or Building files.Kindly provide the solution ASAP.
@Neeta – here you go:
<input message="Are you sure?" validargs="y,n" addproperty="input"/> <condition property="abort"> <equals arg1="n" arg2="${input}"/> </condition> <fail if="abort">User aborted.</fail>Hi Peter
Thanks a lot.Its working fine.I have one more Question like i have two locations,in which i have to copy the data from the selected location by the user.Is it possible to write to avoid redundancy.
The snippet of code is as follows where am facing problem
I have to specify dynamically assign the value which user selected option to the pathvariable(Either RelArea or SVNArea).Is there any possiblities to meet this requirements.
Pingback: An alternative Maven plugin for Ant and NetBeans « Incremental Operations
i can’t start my tomcat server i have tomcat 6.x and jdk 1.6 installed and im using myeclipse 5.5.. when i start the tomcat server it waits for aplication server ” trying to connect to application server” and it waits only…. my application server is RMI class and it is working… i mean it’s already started but my tomcat can’t detect it… what is the problem ??????????
Here is the solution that recreated tomcat service each time. That is very useful if you have to maintain server hosts running the same application and doing changes in tomcat service setup.
http://gusiev.com#Ant%20task%20to%20install%20tomcat%20service
Pingback: How to run a seam-gen project in Tomcat 6 | InteliDev
Thanks man, nice post
If I want to launch my webbrowser with a url right after starting up Tomcat, how can I determine if Tomcat has finished loading?
In my ANT script I start up Tomcat, then I call
If I use spawn=true for the tomcat startup, then I will not see the tomcat output, and my browser launches and loads the url.
However, if I want to see the tomcat output and remove the spawn attribute, my web browser never launches – the console window just shows the tomcat output.
Why is this?
@Flex coder: look at the Ant snippet at the end of this post, specifically the “waitfor” element:
http://ptrthomas.wordpress.com/2009/01/24/how-to-start-and-stop-jetty-revisited/
Hmm…my code didn’t post…here’s another try
Thanks Peter – that helped a lot!
I’ve implemented the waitfor and my script runs – the browser launches successfully etc. The only problem is the console window displays the tomcat startup log – the rest of my ant script – the part that says “Build completed – time 1 min 2 sec” is not being output to the console.
In eclipse, I have to click on my ant file again and run it, this causes the last bit of output to be printed to the console.
I’ve read the posts above, but do not want to use spawn=”true” – I want to see the tomcat startup along with the rest of my ant output.
Is there a workaround for this?
@Flex coder: hmm, not sure.
But do you really need this? The way I normally work is I start tomcat from ant within eclipse and it occupies a console. When I double-click on another ant target to stop tomcat, the original console will gracefully end with the build complete message etc.
The problem is with the environnment that has been set up for me to work with.
I have a Flex front end project that talks to a database backend – the pre-existing ANT script setup by our lead developer does a whole bunch of fancy stuff – cleans the output directories, builds the war and copies it over to our tomcat server etc. Tomcat needs to be stopped for the script to run and the build to complete.
When coding the UI in flex it gets very repetitious. Here’s the way I have been working for the past year. After any code change I have to 1) stop tomcat, 2) build the ANT script – wait till its done, 3) restart tomcat 4) launch my browser with the application url or run it from eclipse with the run dialog and then 5) clean the browser cache 6) click login from our Flex UI to login to the app since it uses Spring Security.
This gets very very tedious after doing it hundreds of times a day.
So I thought that it would be great (just like when I used to work with .NET and Visual Studio) if I could just hit 1 button to run everything.
So far I’ve got it all working for the most part now – my ant script does all of the above – it’s just that the console output hangs at Tomcat startup and I don’t see the ‘Build complete’ message.
I guess I could remove the Tomcat startup code and the exec which loads my browser and put those in a separate ant script that I could click on and run after I see the ‘Build successful’ message. At least 2 clicks are better than the way I was doing it before!
Thanks for the previous link – it helped me to get the current setup working. I could just use spawn=”true” to suppress the Tomcat output and it will all work – it’s just that I would like to have a log for Tomcat.
exec dir=”${env.TOMCAT_HOME}/bin” executable=”startup.bat”
spawn=”true” vmlauncher=”true” /
@Sachin – please read the FIRST sentence of the blog post VERY CAREFULLY.
How do I gracefully stop webapp within tomcat (5.5.2x)using windows batch file ? I don’t want to stop tomcat itself !!!
@Rahi You can’t. Use Ant. follow the links at the start of this blog post. If you are really want to use batch files (yuck), write a batch file that invokes Ant.
I am not fond of batch files. Any script that works on windows is fine.
Thanks for quick reply..I will check the links.
E:\SAM-PC\springapp>ant install
Buildfile: build.xml
install:
BUILD FAILED
java.io.IOException: Server returned HTTP response code: 401 for URL: http://loc
alhost:8080/manager/install?path=%2Fspringapp&war=springapp
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLCon
nection.java:1245)
at org.apache.catalina.ant.AbstractCatalinaTask.execute(AbstractCatalina
Task.java:223)
at org.apache.catalina.ant.AbstractCatalinaTask.execute(AbstractCatalina
Task.java:146)
at org.apache.catalina.ant.InstallTask.execute(InstallTask.java:114)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.jav
a:106)
at org.apache.tools.ant.Task.perform(Task.java:348)
at org.apache.tools.ant.Target.execute(Target.java:357)
at org.apache.tools.ant.Target.performTasks(Target.java:385)
at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1337)
at org.apache.tools.ant.Project.executeTarget(Project.java:1306)
at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExe
cutor.java:41)
at org.apache.tools.ant.Project.executeTargets(Project.java:1189)
at org.apache.tools.ant.Main.runBuild(Main.java:758)
at org.apache.tools.ant.Main.startAnt(Main.java:217)
at org.apache.tools.ant.launch.Launcher.run(Launcher.java:257)
at org.apache.tools.ant.launch.Launcher.main(Launcher.java:104)
Total time: 0 seconds
i am getting the above error ,may i know wht mistake i made in my application
it exactly what i am looking for.
Thank you
hi when i start tomcat using ant target i get this kind of error
C:\Users\rohitsi\Desktop\DynamicCYBMonitor\build.xml:96: java.net.ConnectException: Connection refused: connect please help
One step further and continue after tomcat starts using the parallel task with daemons
<parallel> <daemons> <java jar="${tomcat.home}/bin/bootstrap.jar" fork="true"> <jvmarg value="-Dcatalina.home=${tomcat.home}"/> </java> </daemons> <sequential> <sleep seconds="10"/> <echo message="list" /> <list url="${tomcat.manager.url}" username="${tomcat.username}" password="${tomcat.password}"/> <java jar="${tomcat.home}/bin/bootstrap.jar" fork="true"> <jvmarg value="-Dcatalina.home=${tomcat.home}"/> <arg line="stop"/> </java> </sequential> </parallel>@B.Doyle – thanks for the comment, I just fixed the XML code that was lost when you posted initially.
This no longer works in Tomcat 7. The default Tomcat logging mechanism, JULI, is no longer in bootstrap.jar’s Manifest classpath. Therefore, it must be added manually. In order to do that, we must override the Manifest by calling the main class directly. This is the code I ended up with after also examining Peter Thomas’ excellent article on Jetty.
<path id="tomcat.class.path"> <fileset dir="${tomcat.home}/lib"> <include name="**/*.jar"/> <include name="**/*.zip"/> </fileset> <pathelement location="${tomcat.home}/bin/bootstrap.jar"/> <pathelement location="${tomcat.home}/bin/tomcat-juli.jar"/> </path> <target name="deploy" depends="war"> <sequential> <antcall target="tomcat-stop"/> <delete dir="${tomcat.home}/webapps/${dist.context}" failonerror="false"/> <copy file="${dist.dir}/${dist.filename}" todir="${tomcat.home}/webapps"/> <antcall target="tomcat-start"/> </sequential> </target> <target name="tomcat-start"> <java classname="org.apache.catalina.startup.Bootstrap" fork="true" classpathref="tomcat.class.path"> <jvmarg value="-Dcatalina.home=${tomcat.home}"/> </java> </target> <target name="tomcat-stop" depends="tomcat-check-status" if="tomcat.started"> <java classname="org.apache.catalina.startup.Bootstrap" fork="true" classpathref="tomcat.class.path"> <jvmarg value="-Dcatalina.home=${tomcat.home}"/> <arg line="stop"/> </java> <sleep seconds="5"/> </target> <target name="tomcat-check-status"> <condition property="tomcat.started"> <socket server="localhost" port="8080"/> </condition> </target>Hi !!
Thanks for sharing this knowledge in the web. Good luck….
I tried your first post (start tomcat from bootstrap.jar) and run into ClassNotFoundException, it was looking for class from tomcat-juli.jar. Searched the web and some guys advised to modify MANIFEST.MF of bootstrap.jar. Did so, included tomcat-juli.jar for property Class-path inside Manifest file. And it worked for me. However, I found it a bit cumbersome and decided to come back to this thread. Re-read it and … bingo! One of the last comments – appropriate solution.
Thanks, very helpful.
Thanks Brian ;-) it works
while am using the code the server will be started, how can i stop the server…
By the way, I have endorsed libs in “${tomcat.home}/endorsed” directory in tomcat 6, so it will works with additional jvmarg:
…
…
By the way, I have endorsed libs in “${tomcat.home}/endorsed” directory in tomcat 6, so it will works with additional jvmarg:
…
<java jar=”${tomcat.home}/bin/bootstrap.jar” fork=”true” dir=”${tomcat.home}/webapps”$gt;
<jvmarg value=”-Dcatalina.home=${tomcat.home}”/$gt;
<jvmarg value=”-Djava.endorsed.dirs=${tomcat.home}/endorsed”/$gt;
</java$gt;
…
ha,
I’m so bad in forum conversation. =)
By the way, I have endorsed libs in “${tomcat.home}/endorsed” directory in tomcat 6, so it will works with additional jvmarg:
…
…
Whatever…
By the way, I have endorsed libs in “${tomcat.home}/endorsed” directory in tomcat 6, so it will works with additional jvmarg:
<java jar=”${tomcat.home}/bin/bootstrap.jar” fork=”true” dir=”${tomcat.home}/webapps”>
<jvmarg value=”-Dcatalina.home=${tomcat.home}”/>
<jvmarg value=”-Djava.endorsed.dirs=${tomcat.home}/endorsed”/>
</java>
Nice article. Btw, if some of you have problems running the tomcat. I also have an article that has a built-in tomcat you can download. That way, you won’t have to have problems with tomcat versions. It also has dt_socket argument when running the tomcat so debugging is good to go. Check it out :
http://stikiflem.com/2011/06/how-to-run-tomcat-using-ant/
hi
the script works like fire…awesome..
i just need to know if we can keep separate consoles for ant script and tomcat i.e. the tomcat startup logs should come on a different console.?
The script works fine but the spawn attribute does not work for me. I am using Tomcat 6.0.32 and TFS to invoke ANT file. I have my start task as
The build.xml never ends. It keeps running. Any suggestions?
Thanks,
Sorry…my script did not make it in the previous post..
Hello,
As suggested here is the script that I used in build.xml for tomcat 7
But the path from the property file for build.tomcat.dir is not reflecting instead the script is taking my workspace path. Any clue on how to resolve this?
Thanks
sorry here are the scripts:
tomcat.class.path is the path id as described by Brian.
C:\Dev\WebDev\XYZ\${build.tomcat.dir}\lib does not exist. where as my tomcat is at c:\tomcat
Any clue why the property path is not reflecting here…… in all other tasks all the property paths are reflected
Great blog..Just looking for ..I want to stop appservers in tomcat but is there any way to check the running process ( PID) and if there is any running process can we kill it to make sure the app server really stops
Hi there! This is kind of off topic but I need some guidance from an established
blog. Is it very hard to set up your own blog?
I’m not very techincal but I can figure things out pretty fast. I’m thinking about creating my own but I’m not sure where to begin. Do you have any tips or suggestions? Appreciate it
Hi! I know this is somewhat off topic but
I was wondering which blog platform are you using for this website?
I’m getting fed up of WordPress because I’ve had problems with hackers and
I’m looking at options for another platform. I would be awesome if you could point me in the direction of a good platform.
Thank you for another excellent article. The place
else could anyone get that type of info in such an ideal approach of writing?
I have a presentation subsequent week, and I’m on the search for such information.
I am in fact pleased to glance at this weblog posts which includes tons of useful
information, thanks for providing these information.
Why viewers still use to read news papers when in this technological world all is available
on net?
It’s a shame you don’t have a donate button!
I’d certainly donate to this superb blog! I guess for now i’ll
settle for book-marking and adding your RSS feed to my Google account.
I look forward to new updates and will talk about this site with my Facebook group.
Talk soon!
Greetings! I’ve been following your site for a while now and finally got the courage to go ahead and give you a shout out from Kingwood Tx! Just wanted to tell you keep up the excellent job!
Wow, superb blog layout! How lengthy have you ever been running a blog for?
you made running a blog glance easy. The total
glance of your web site is fantastic, let alone the content material!
Quality articles or reviews is the secret to attract the visitors to go to see the web page,
that’s what this web page is providing.
What’s up to every , since I am truly eager of reading this web site’s post to be updated
on a regular basis. It consists of nice information.
Wow! At last I got a website from where I
know how to in fact take helpful data regarding my study and knowledge.
Good info. Lucky me I found your blog by accident
(stumbleupon). I’ve book-marked it for later!
What’s up Dear, are you genuinely visiting this web page daily, if so then you will definitely take good experience.
Wow that was unusual. I just wrote an extremely long comment but after I clicked submit my comment didn’t appear. Grrrr… well I’m not
writing all that over again. Anyways, just wanted to say wonderful blog!
Hello, I enjoy reading all of your article. I wanted to write a little comment to
support you.
I’m not sure why but this site is loading very slow for me. Is anyone else having this issue or is it a problem on my end? I’ll
check back later on and see if the problem still exists.
Woah! I’m really digging the template/theme of this site. It’s simple, yet
effective. A lot of times it’s very hard to get that “perfect balance” between user friendliness and visual appearance. I must say that you’ve done a great job
with this. Additionally, the blog loads very fast for me on Internet explorer.
Superb Blog!
No matter if some one searches for his required
thing, thus he/she wishes to be available that in detail,
thus that thing is maintained over here.
Hello, i think that i saw you visited my weblog thus i came to “return the favor”.
I am trying to find things to improve my website!
I suppose its ok to use some of your ideas!!
It’s appropriate time to make some plans for the future and it’s time to be happy.
I’ve read this put up and if I could I want to counsel you some interesting issues or tips. Perhaps you could write subsequent articles referring to this article. I wish to read more issues approximately it!
You actually make it seem so easy with your presentation but I find this matter to be really something that I
think I would never understand. It seems too complicated and very broad for me.
I’m looking forward for your next post, I will try to get the hang of it!
Great article! We are linking to this particularly great article on our
site. Keep up the good writing.
After I originally left a comment I appear to have clicked the -Notify me when new comments are
added- checkbox and from now on every time a comment is added I receive 4 emails with the exact
same comment. There has to be an easy method you can remove me from that
service? Many thanks!
My blog about technological innovation: wireless stereo speaker