| Author |
The requested resource (/servcart/Welcome) is not available.
|
Lou Pellegrini
Ranch Hand
Joined: Nov 11, 2003
Posts: 105
|
|
Hi,
Apache Tomcat/7.0.5
Java version
C:\Java Dev\Project Shopping Cart>java -version
java version "1.6.0_26"
Java(TM) SE Runtime Environment (build 1.6.0_26-b03)
Java HotSpot(TM) Client VM (build 20.1-b02, mixed mode, sharing)
C:\Java Dev\Project Shopping Cart>
I am getting the message "The requested resource (/servcart/Welcome) is not available."
I used ant to build servcart.war and deployed it to C:\Program Files\Apache Software Foundation\Tomcat 7.0\webapps. When I start Tomcat it extracts the war file contents into C:\Program Files\Apache Software Foundation\Tomcat 7.0\webapps\servcart with the correct packages.
The war file includes package com.ordering were Welcome.class servlet exists.
C:\Program Files\Apache Software Foundation\Tomcat 7.0\webapps\servcart\WEB-INF\web.xml contents include
All was fine using folders, but when I added the war file process I started getting the error.
Can someone please show me where I went wrong?
|
 |
Lou Pellegrini
Ranch Hand
Joined: Nov 11, 2003
Posts: 105
|
|
Disregard, I got it.
Package identification goes in <servlet-class>, not <url-pattern>.
Doh!
Now I'm getting ClassNotFoundException: com.ordering.Welcome.
|
 |
Tim Holloway
Saloon Keeper
Joined: Jun 25, 2001
Posts: 14491
|
|
You should have a file: WEB-INF/classes/com/ordering/Welcome.class.
If it's not located there and you're not packaging the class in a JAR located in WEB-INF/lib, the class won't be found.
Please remember that both class and filenames are case-sensitive, even in Windows, where the OS itself disregards filename case.
|
Customer surveys are for companies who didn't pay proper attention to begin with.
|
 |
Lou Pellegrini
Ranch Hand
Joined: Nov 11, 2003
Posts: 105
|
|
|
Thank you Tim!
|
 |
 |
|
|
subject: The requested resource (/servcart/Welcome) is not available.
|
|
|