On 5/5/07, Kevin O'Mara <[EMAIL PROTECTED]> wrote:
I am using tomcat5 5.5.20, Revision 3, java/tomcat5 from MacPorts.

I am following the instructions for the Addison Wesley book: "Servlets
and JavaServer Pages: The J2EE Web Tier" from the first chapter.

The first chapter may be found here: http://www.jspbook.com/jspbook-01.pdf

Sorry, I didn't refer to the book, but just wanted to let you know
that the instructions for different versions of Tomcat can differ
across versions.

If the book is providing instructions for a much older version of
Tomcat, and if you are using a much later version of Tomcat the
instructions can be significantly different from my experience with
any software.

I am on the part where the author is creating the jspbook directory and
is placing a web.xml file in the $CATALINA_HOME/webapps/jspbook/WEB-INF

So far the above configuration looks correct to me.

directory, and a jspbook.xml file in the $CATALINA_HOME/webapps In Tomcat 5.5.x

jspbook.xml should not be placed under $CATALINA_HOME/webapps

directory.  I cannot get the webapps/jspbook directory to be recognized
by my Tomcat setup no matter what I do, after following these steps and
continuous restarting of the server. I am assuming that it is ok to
forgo the editing of the server.xml file like the book says.

This is the error I receive after retrieving http://localhost:8080 -


  HTTP Status 404 - /jspbook/

------------------------------------------------------------------------

*type* Status report

*message* _/jspbook/_

*description* _The requested resource (/jspbook/) is not available._

In your case, it appears that the folder under $CATALINA_HOME/webapps/jspbook/
is empty and the directory listing is set to false.

It helps to set directory listing to true, because if you place a JSP
file other than
index.jsp under $CATALINA_HOME/webapps/jspbook/ directory , or if the
directory is empty you will get the HTTP Status 404 - /jspbook/

In order to set the directory listing to true follow these simple steps

1) Open the web.xml file under $CATALINA_HOME/conf/ directory

2) Look for :

       <init-param>
           <param-name>listings</param-name>
           <param-value>false</param-value>
       </init-param>

change that to

       <init-param>
           <param-name>listings</param-name>
           <param-value>true</param-value>
       </init-param>

------------------------------------------------------------------------


      Apache Tomcat/5.5.20


Please help.  Thanks in advance.


Once you set the directory listing to true, you should be able to see
the directory under

http://localhost:8080/jspbook/ which is currently empty.

Place some dummy JSP file under webapps/jspbook , either call it
index.jsp or anything else .jsp and you should be able to see its
contents from the browser by invoking
http://localhost:8080/jspbook/

-Regards
Rashmi

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to