You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by Jeff Turner <je...@socialchange.net.au> on 2001/10/21 08:43:56 UTC

[PATCH][3.3] tomcat.sh cleanup

Hi,

The help text displayed when you type "./tomcat.sh" currently reads:

Usage:
tomcat (start|env|run|stop|jspc)
        start - start tomcat in the background
        run   - start tomcat in the foreground
        run -wait - wait until tomcat is initialized before returning  
            -security - use a SecurityManager when starting
        stop  - stop tomcat
        env  -  set CLASSPATH and TOMCAT_HOME env. variables
        jspc - run jsp pre compiler


This is out of date (missing 'enableAdmin' and 'estart'), is partially
incorrect (-wait applies to 'start', not 'run'), and is hard to read.

The attached patch fixes this, so it will print:

./tomcat.sh (start|run|stop|enableAdmin|estart|env|jspc)
  start            - start tomcat in the background
  start -security  -   use a SecurityManager when starting
  start -noout     -   redirect stdout/stderr to $TOMCAT_HOME/logs/stdout.log
  start -wait      -   wait until tomcat is initialized before returning
  run              - start tomcat in the foreground
  run -security    -   use a SecurityManager when starting
  stop             - stop tomcat
  stop -force      - stop tomcat with the 'kill' command if necessary
  enableAdmin      - Trust the admin web application,
                     i.e. rewrites conf/apps-admin.xml with trusted="true"
  estart           - Start Tomcat using the/your EmbededTomcat class which
                     uses a hardcoded set of modules
  env              - set CLASSPATH and TOMCAT_HOME env. variables
  jspc             - run jsp pre compiler


The patch also fixes indentation, and parametrizes the MAX_WAIT variable to
reliably fix another doc bug.


Also, I noticed that line 294 contains:

TOMCAT_OPTS="$TOMCAT_OPTS -Djava.security.policy==${TOMCAT_HOME}/conf/tomcat.policy "

Shouldn't that be a single '='? There is the same thing in tomcat.bat. Not
being sure of the implications, I haven't changed this in the patch.


--Jeff

Re: [PATCH][3.3] tomcat.sh cleanup

Posted by Jeff Turner <je...@socialchange.net.au>.
On Sun, Oct 21, 2001 at 11:16:31PM +1000, Jeff Turner wrote:
> On Sun, Oct 21, 2001 at 08:06:06AM -0400, Keith Wannamaker wrote:
> > It would be nice also to display the command that is used
> > to initialize the jk web config files, jkconf or whatever.
> 
> Oh yes.. you get that help currently if you type './tomcat.sh start -help'.
> 
> Rather than try to duplicate that, the attached revised patch adds 2 more
> lines:
> 
> echo "  start -help      -   more options"
> echo "  start -help      -   more options"

Feh.. that's as nonsensical as it sounds. Fixed patch attached. Extra entries:

  start -help      -   more options
                         (config, debug, estart, home, install, jkconf, sandbox)
  
  stop -help       -   more options
                         (ajpid, host, home, pass, port)


--Jeff

> enableAdmin ought also to have -help, but it's currently broken.
> 
> --Jeff
> 
> > Keith


Re: [PATCH][3.3] tomcat.sh cleanup

Posted by Jeff Turner <je...@socialchange.net.au>.
On Sun, Oct 21, 2001 at 08:06:06AM -0400, Keith Wannamaker wrote:
> It would be nice also to display the command that is used
> to initialize the jk web config files, jkconf or whatever.

Oh yes.. you get that help currently if you type './tomcat.sh start -help'.

Rather than try to duplicate that, the attached revised patch adds 2 more
lines:

echo "  start -help      -   more options"
echo "  start -help      -   more options"


enableAdmin ought also to have -help, but it's currently broken.

--Jeff

> Keith

RE: [PATCH][3.3] tomcat.sh cleanup

Posted by Keith Wannamaker <Ke...@Wannamaker.org>.
It would be nice also to display the command that is used
to initialize the jk web config files, jkconf or whatever.
Keith

| -----Original Message-----
| From: Jeff Turner [mailto:jeff@socialchange.net.au]
| Sent: Sunday, October 21, 2001 2:44 AM
| To: tomcat-dev@jakarta.apache.org
| Subject: [PATCH][3.3] tomcat.sh cleanup
| 
| 
| Hi,
| 
| The help text displayed when you type "./tomcat.sh" currently reads:
| 
| Usage:
| tomcat (start|env|run|stop|jspc)
|         start - start tomcat in the background
|         run   - start tomcat in the foreground
|         run -wait - wait until tomcat is initialized before returning  
|             -security - use a SecurityManager when starting
|         stop  - stop tomcat
|         env  -  set CLASSPATH and TOMCAT_HOME env. variables
|         jspc - run jsp pre compiler
| 
| 
| This is out of date (missing 'enableAdmin' and 'estart'), is partially
| incorrect (-wait applies to 'start', not 'run'), and is hard to read.
| 
| The attached patch fixes this, so it will print:
| 
| ./tomcat.sh (start|run|stop|enableAdmin|estart|env|jspc)
|   start            - start tomcat in the background
|   start -security  -   use a SecurityManager when starting
|   start -noout     -   redirect stdout/stderr to $TOMCAT_HOME/logs/stdout.log
|   start -wait      -   wait until tomcat is initialized before returning
|   run              - start tomcat in the foreground
|   run -security    -   use a SecurityManager when starting
|   stop             - stop tomcat
|   stop -force      - stop tomcat with the 'kill' command if necessary
|   enableAdmin      - Trust the admin web application,
|                      i.e. rewrites conf/apps-admin.xml with trusted="true"
|   estart           - Start Tomcat using the/your EmbededTomcat class which
|                      uses a hardcoded set of modules
|   env              - set CLASSPATH and TOMCAT_HOME env. variables
|   jspc             - run jsp pre compiler
| 
| 
| The patch also fixes indentation, and parametrizes the MAX_WAIT variable to
| reliably fix another doc bug.
| 
| 
| Also, I noticed that line 294 contains:
| 
| TOMCAT_OPTS="$TOMCAT_OPTS 
| -Djava.security.policy==${TOMCAT_HOME}/conf/tomcat.policy "
| 
| Shouldn't that be a single '='? There is the same thing in tomcat.bat. Not
| being sure of the implications, I haven't changed this in the patch.
| 
| 
| --Jeff
|