You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Kevin O'Mara <kj...@scienceus.org> on 2007/05/06 02:33:42 UTC

Tomcat5 on Mac OS X, problem with book or installation?

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

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 
directory, and a jspbook.xml file in the $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._

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


      Apache Tomcat/5.5.20


Please help.  Thanks in advance.

--


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


Re: Tomcat5 on Mac OS X, problem with book or installation?

Posted by Bill Barker <wb...@wilshire.com>.
"Rashmi Rubdi" <ra...@gmail.com> wrote in message 
news:3ef28230705051916x3821c580ha11eb54468ece0c5@mail.gmail.com...
> On 5/5/07, Kevin O'Mara <kj...@scienceus.org> 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

Yes, it sounds like the instructions are for Tomcat 4.1.x.

>
>> 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: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
> 




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


Re: Tomcat5 on Mac OS X, problem with book or installation?

Posted by Rashmi Rubdi <ra...@gmail.com>.
On 5/5/07, Kevin O'Mara <kj...@scienceus.org> 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: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: Tomcat5 on Mac OS X, problem with book or installation?

Posted by Martin Gainty <mg...@hotmail.com>.
apologies for he late reply but I wanted to ask if the servlet-name and 
servlet-mapping
and welcome-file-list from web.xml for entry jspbook have been entered

here is an example that may help (sub in jspbook)
 <servlet>
      <servlet-name>jspbook</servlet-name>
      <servlet-class>package.jspbook</servlet-class>
      <init-param>
         <param-value>jspbook.properties</param-value>
      </init-param>
 </servlet>
<servlet-mapping>
        <servlet-name>jspbook</servlet-name>
        <url-pattern>/jspbook</url-pattern>
 </servlet-mapping>
    <welcome-file-list>
        <welcome-file>index.jsp</welcome-file>
    </welcome-file-list>

Does this help?
Martin--
This email message and any files transmitted with it contain confidential
information intended only for the person(s) to whom this email message is
addressed.  If you have received this email message in error, please notify
the sender immediately by telephone or email and destroy the original
message without making a copy.  Thank you.

----- Original Message ----- 
From: "Kevin O'Mara" <kj...@scienceus.org>
To: <us...@tomcat.apache.org>
Sent: Saturday, May 05, 2007 8:33 PM
Subject: Tomcat5 on Mac OS X, problem with book or installation?


>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
>
> 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 
> directory, and a jspbook.xml file in the $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._
>
> ------------------------------------------------------------------------
>
>
>      Apache Tomcat/5.5.20
>
>
> Please help.  Thanks in advance.
>
> --
>
>
> ---------------------------------------------------------------------
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
> 


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