You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by "Kaleta, Philip (EDU)" <pk...@edu.gov.mb.ca> on 2001/03/15 21:55:44 UTC

Struts not recognizing AddHandler .do

I don't know what's wrong. There are 2 problems that I'm having. The
index.jsp loads for the struts-example application, but I get a 503 Error
(Location: /struts-example/tour.do) when I try to follow the "walking tour"
or the "register" link. The server is not recognizing the  files with
extension *.do
The struts-example also gives me the error (in red font at the top of the
index page) "ERROR: User database not loaded -- check servlet container logs
for error messages." In reference to this, I've noticed in the servlet.log
file, the following lines:
Context log path="/struts-example" :database: init
Context log path="/struts-example" :database: Initializing database servlet
Context log path="/struts-example" :database: Loading database from
'/WEB-INF/database.xml'
Context log path="/struts-example" :database: Database load exception
Here's how I set up struts:
I've just unpacked the latest nightly download of struts
(jakarta-struts-20010315.zip). I copied the struts-documentation and
struts-example WAR files into the tomcat/webapps directory. I rebooted
tomcat.

I made the necessary adjustments to the tomcat-apache.conf file (including
the new "Alias" statements and <Directory> and <Location> tags, and the
"AddHandler jserv-servlet .do", just as I'm told in the INSTALL file) and
saved it in the apache/conf folder. I referenced that file in the httpd.conf
file at the end like this ...     Include
"C:\Apache\conf\tomcat-apache.conf". I also added the "index.jsp" to
"DirectoryIndex index.html index.jsp" in the httpd.conf file.

I added the following to the CLASSPATH

set
CLASSPATH=%CLASSPATH%;%TOMCAT_HOME%\webapps\struts-documentation\Web-inf\cla
sses
set
CLASSPATH=%CLASSPATH%;%TOMCAT_HOME%\webapps\struts-documentation\Web-inf\lib
\struts.jar
set
CLASSPATH=%CLASSPATH%;%TOMCAT_HOME%\webapps\struts-example\Web-inf\classes
set
CLASSPATH=%CLASSPATH%;%TOMCAT_HOME%\webapps\struts-example\Web-inf\lib\strut
s.jar

And still I get the error! The application can't bring up the database, and
can't display *.do files!

HELP!!!

Any assistance is greatly appreciated.

Re: Struts not recognizing AddHandler .do

Posted by "Craig R. McClanahan" <cr...@apache.org>.

On Thu, 15 Mar 2001, Kaleta, Philip (EDU) wrote:

> I don't know what's wrong. There are 2 problems that I'm having. The
> index.jsp loads for the struts-example application, but I get a 503 Error
> (Location: /struts-example/tour.do) when I try to follow the "walking tour"
> or the "register" link. The server is not recognizing the  files with
> extension *.do
> The struts-example also gives me the error (in red font at the top of the
> index page) "ERROR: User database not loaded -- check servlet container logs
> for error messages." In reference to this, I've noticed in the servlet.log
> file, the following lines:
> Context log path="/struts-example" :database: init
> Context log path="/struts-example" :database: Initializing database servlet
> Context log path="/struts-example" :database: Loading database from
> '/WEB-INF/database.xml'
> Context log path="/struts-example" :database: Database load exception

This one means something bad happened.  There should also be a stack trace
or some more details about what went wrong.

> Here's how I set up struts:
> I've just unpacked the latest nightly download of struts
> (jakarta-struts-20010315.zip). I copied the struts-documentation and
> struts-example WAR files into the tomcat/webapps directory. I rebooted
> tomcat.
> 

By the way, what version of Tomcat are you using?  Tomcat 3.1 has lots of
bugs and is not a suitable platform for Struts applications -- you need to
use at least Tomcat 3.2.

> I made the necessary adjustments to the tomcat-apache.conf file (including
> the new "Alias" statements and <Directory> and <Location> tags, and the
> "AddHandler jserv-servlet .do", just as I'm told in the INSTALL file) and
> saved it in the apache/conf folder. I referenced that file in the httpd.conf
> file at the end like this ...     Include
> "C:\Apache\conf\tomcat-apache.conf". I also added the "index.jsp" to
> "DirectoryIndex index.html index.jsp" in the httpd.conf file.
> 
> I added the following to the CLASSPATH
> 
> set
> CLASSPATH=%CLASSPATH%;%TOMCAT_HOME%\webapps\struts-documentation\Web-inf\cla
> sses
> set
> CLASSPATH=%CLASSPATH%;%TOMCAT_HOME%\webapps\struts-documentation\Web-inf\lib
> \struts.jar
> set
> CLASSPATH=%CLASSPATH%;%TOMCAT_HOME%\webapps\struts-example\Web-inf\classes
> set
> CLASSPATH=%CLASSPATH%;%TOMCAT_HOME%\webapps\struts-example\Web-inf\lib\strut
> s.jar
> 
> And still I get the error! The application can't bring up the database, and
> can't display *.do files!
> 

You should absolutely not be doing this.  The servlet container already
deals with making resources from /WEB-INF/classes and /WEB-INF/lib
available.


> HELP!!!
> 
> Any assistance is greatly appreciated.
> 
Craig