|
Server : Apache/2.2.2 (Fedora) System : Linux App1.pathumtani.go.th 2.6.20-1.2320.fc5smp #1 SMP Tue Jun 12 19:40:16 EDT 2007 i686 User : apache ( 48) PHP Version : 5.2.9 Disable Function : NONE Directory : /proc/self/root/usr/bin/ |
Upload File : |
#!/bin/sh
# -----------------------------------------------------------------------------
# Script for Jasper compiler
#
# Environment Variable Prequisites
#
# JASPER_HOME May point at your Catalina "build" directory.
#
# JASPER_OPTS (Optional) Java runtime options used when the "start",
# "stop", or "run" command is executed.
#
# JAVA_HOME Must point at your Java Development Kit installation.
#
# JAVA_OPTS (Optional) Java runtime options used when the "start",
# "stop", or "run" command is executed.
#
# $Id: jasper.sh 305839 2003-10-01 18:39:08Z kinman $
# -----------------------------------------------------------------------------
# OS specific support. $var _must_ be set to either true or false.
cygwin=false
os400=false
case "`uname`" in
CYGWIN*) cygwin=true;;
OS400*) os400=true;;
esac
# resolve links - $0 may be a softlink
PRG="$0"
while [ -h "$PRG" ]; do
ls=`ls -ld "$PRG"`
link=`expr "$ls" : '.*-> \(.*\)$'`
if expr "$link" : '.*/.*' > /dev/null; then
PRG="$link"
else
PRG=`dirname "$PRG"`/"$link"
fi
done
# Get standard environment variables
PRGDIR=`dirname "$PRG"`
JASPER_HOME=`cd "$PRGDIR/.." ; pwd`
if [ -r "$JASPER_HOME"/bin/setenv.sh ]; then
. "$JASPER_HOME"/bin/setenv.sh
fi
# Set standard commands for invoking Java.
_RUNJAVA="$JAVA_HOME"/bin/java
_RUNJDB="$JAVA_HOME"/bin/jdb
_RUNJAVAC="$JAVA_HOME"/bin/javac
# Get standard Java environment variables
if [ -r "$JASPER_HOME"/bin/jasper5-setclasspath.sh ]; then
BASEDIR="$JASPER_HOME"
. "$JASPER_HOME"/bin/jasper5-setclasspath.sh
else
echo "Cannot find $JASPER_HOME/bin/jasper5-setclasspath.sh"
echo "This file is needed to run this program"
exit 1
fi
# Add on extra jar files to CLASSPATH
CLASSPATH=$CLASSPATH:$(build-classpath \
ant \
commons-collections \
commons-el \
commons-daemon \
commons-logging \
jasper-compiler \
jasper-runtime \
eclipse-ecj.jar \
jsp-2.0-api \
servlet-2.4-api \
xerces-j2 \
xml-commons-apis \
)
# For Cygwin, switch paths to Windows format before running java
if $cygwin; then
JAVA_HOME=`cygpath --path --windows "$JAVA_HOME"`
JASPER_HOME=`cygpath --path --windows "$JASPER_HOME"`
CLASSPATH=`cygpath --path --windows "$CLASSPATH"`
fi
# ----- Execute The Requested Command -----------------------------------------
if [ "$1" = "jspc" ] ; then
shift
exec "$_RUNJAVA" $JAVA_OPTS $JASPER_OPTS \
-Djava.endorsed.dirs="$JAVA_ENDORSED_DIRS" -classpath "$CLASSPATH" \
-Djasper.home="$JASPER_HOME" \
-Dcatalina.home="$JASPER_HOME" \
org.apache.jasper.JspC "$@"
elif [ "$1" = "debug" ] ; then
shift
exec "$_RUNJDB" $JAVA_OPTS $JASPER_OPTS \
-Djava.endorsed.dirs="$JAVA_ENDORSED_DIRS" -classpath "$CLASSPATH" \
-Djasper.home="$JASPER_HOME" \
-Dcatalina.home="$JASPER_HOME" \
org.apache.jasper.JspC "$@"
else
echo "Usage: $0 ( jspc )"
echo "Commands:"
echo " jspc - Run the offline JSP compiler"
exit 1
fi