jsvc problem gives 404 error

I set up jsvc and get it to work, but it seems that server cannot find all pages under webapps folder any more. Do I need to change anything below the settings in the tomcat.sh file?

HTTP Status 404 - /

type Status report

message /

description The requested resource (/) is not available.

Apache Tomcat/5.5.23

Thanks,

JAVA_HOME=/usr/lib/j2sdk1.5-sun

CATALINA_HOME=/opt/apache-tomcat-5.5.23

CATALINA_BASE=/opt/apache-tomcat-5.5.23

DAEMON_HOME=/opt/apache-tomcat-5.5.23/bin

TOMCAT_USER=tomcat

TMP_DIR=/var/tmp

CATALINA_OPTS=

CLASSPATH=\

$JAVA_HOME/lib/tools.jar:\

$DAEMON_HOME/dist/commons-daemon.jar:\

$CATALINA_HOME/bin/bootstrap.jar

case "$1" in

start)

#

# Start Tomcat

#

$DAEMON_HOME/jsvc \

-user $TOMCAT_USER \

-home $JAVA_HOME \

-Dcatalina.home=$CATALINA_HOME \

-Djava.io.tmpdir=$TMP_DIR \

-outfile $CATALINA_HOME/logs/catalina.out \

-errfile '&1' \

$CATALINA_OPTS \

-cp $CLASSPATH \

org.apache.catalina.startup.Bootstrap

#

# To get a verbose JVM

# -verbose \

# To get a debug of jsvc.

# -debug \

;;

stop)

#

# Stop Tomcat

#

PID=`cat /var/run/jsvc.pid`

kill $PID

;;

*)

echo "Usage tomcat.sh start/stop"

exit 1;;

esac

[1429 byte] By [guanyua] at [2007-11-27 1:42:59]
# 1

There's no need to explicitly set a system CLASSPATH, an incorrect or incomplete classpath can cause errors like NoClassDefinitionFound etc.

If you're getting this error:

>The requested resource (/) is not available.

>Apache Tomcat/5.5.23

check a few things:

1) What is the exact URL you are trying to access that is giving the above error? Check your project's web.xml to see if the URL matches the pattern specified, in case of a Servlet. If it's a JSP there's no need to check the URL pattern in the web.xml unless it is specified explicitly.

2) Check if the Servlet you are trying to access is compiled and available under the /WEB-INF/classes folder under it's package.

3) This error also appears if you set directory listing to "false" and if there's no default page like (index.jsp or index.html) in the folder you are trying to access.

If you've named the JSP other than index.jsp then set directory listing to true, and the JSP page will appear.

HTH

appy77a at 2007-7-12 1:00:24 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...