This week's book giveaway is in the Agile and other Processes forum.
We're giving away four copies of The Mikado Method and have Ola Ellnestam and Daniel Brolund on-line!
See this thread for details.
The moose likes Tomcat and the fly likes Neat trick for Unix shell users.. Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Products » Tomcat
Reply Bookmark "Neat trick for Unix shell users.." Watch "Neat trick for Unix shell users.." New topic
Author

Neat trick for Unix shell users..

Ben Souther
Sheriff

Joined: Dec 11, 2004
Posts: 13410

If you code for Tomcat as I do sans-IDE, you might find this tip useful.

Even with the "reloadable" attribute set to true, it is often necessary to manually reload an application (web.xml changes, context scope vars etc..) running in Tomcat.
The fastest way to do this (CPU wise) is with the Tomcat manager application.
The problem is that this involves having a browser open and on that page or else reaching for the mouse (a loathsome chore).

wget to the rescue!

Like most command line junkies I have a script that I use to set up my environment for each project (classpath etc..).

By creating an alias that calls wget (a command line tool for pulling HTTP content from cron scripts for mirroring websites), pointed to the manager app, I've made it easy to quickly reload the app I'm working on without leaving the window I'm in.

Here is the command:



Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
Sonny Gill
Ranch Hand

Joined: Feb 02, 2002
Posts: 1211

Good tip Ben, Thanks.


The future is here. It's just not evenly distributed yet. - William Gibson
Consultant @ Xebia. Sonny Gill Tweets
 
I agree. Here's the link: http://zeroturnaround.com/jrebel - it saves me about five hours per week
 
subject: Neat trick for Unix shell users..
 
Similar Threads
Tomcat 4 : How to deploy and run JSP and Servlets
classpath problem..
Tomcat restarts & development speed
Beginner's Servlet Not Found Error
Springapp Tutorial FileNotFoundException at Step 1.11, running ant deploy reload