Your docBase in the <Context ...> element only needs a relative location of 
"Book".  Also, your "path" attribute requires a forward slash prefix.  So, 
rewrite it like this:

<Context path="/Book" docBase="Book">

Should work now.

You only need to provide a fully qualified path in docBase if your app 
exists outside the defined "appBase" directoy defined in the parent
<Host ...> element.

Also, if you are literally using "$CATALINA_HOME" in your server.xml, I 
don't think that will be expanded to the actual value of that system 
variable, but I could be wrong.  If I'm right, using it will not work any 
way you look at it.  You'd probably have to replace $CATALNA_HOME with the 
actual  path to where $CATALINA_HOME exists.


jake

At 06:26 PM 9/21/2002 +0800, you wrote:

>I'm having problems configuring the tomcat server.
>
>I've created a directory 'Book' in $CATALINA_HOME/webapps
>   $CATALINA_HOME/webapps/Book
>                             /WEB-INF/classes
>
>I've added the following line in server.xml
>
>           <Context docBase="$CATALINA_HOME/webapps/Book"
>path="Book">
>         </Context>
>
>I've placed a class file called CartItem.class in Book/WEB-INF/classes
>
>I've got a directory Book/jsp that contains a file called
>ShoppingCart.jsp.
>
>I've restarted tomcat
>
>Now when I access http://localhost:8080/Book/jsp/ShoppingCart.jsp I get
>errors
>
>ShoppingCart_jsp.java:7: '.' expected
>import CartItem;
>                ^
>
>These are examples are from a book so I'm wondering what is wrong.  The
>book was written with Tomcat3.x in mind so not sure whether this is my
>configuration problem or wrong code.
>
> >From Tomcat Web Application Manager I can see that the configuration is
>somewhat correct since it's running.
>
>
>--
>To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
>For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to