Board index » jbuilder » web.xml problem

web.xml problem


2004-05-14 05:11:31 PM
jbuilder5
I have the following directory structure
C:\tomcat4\webapps\star1\WEB-INF\classes\com\stardeveloper\servlets\db
in my /conf/server.xml I have this line:
<Context path="/star1" docBase="star1" debug="1" reloadable="true"/>
This is my web.xml file:
----------------------------------------------------------------------------
<!DOCTYPE web-app
PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
"java.sun.com/dtd/web-app_2_3.dtd">
<web-app>
<servlet>
<servlet-name>dbtest</servlet-name>
<servlet-class>com.stardeveloper.servlets.db.DisplayServlet</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>dbtest</servlet-name>
<url-pattern>/servlet/com/stardeveloper/servlets/db/DisplayServlet</url-patt
ern>
</servlet-mapping>
</web-app>
----------------------------------------------------------------------------
http://localhost:8080/star1/servlet/com.stardeveloper.servlets.db.DisplayServlet
get a Status 404 resource not available error (The requested resource
(/star1/servlet/com.stardeveloper.servlets.db.DisplayServlet) is not
available.
I know its a simple problem, though I can't figure it out ... Any help?
Appreciated ...
 
 

Re:web.xml problem

Matt wrote:
Quote
<?xml version="1.0" encoding="ISO-8859-1"?>

<!DOCTYPE web-app
PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
"java.sun.com/dtd/web-app_2_3.dtd">

<web-app>

<servlet>
<servlet-name>dbtest</servlet-name>

<servlet-class>com.stardeveloper.servlets.db.DisplayServlet</servlet-class>
</servlet>

<servlet-mapping>
<servlet-name>dbtest</servlet-name>

<url-pattern>/servlet/com/stardeveloper/servlets/db/DisplayServlet</url-patt
ern>
</servlet-mapping>

</web-app>
----------------------------------------------------------------------------
--
When I try locating the file at this location :

http://localhost:8080/star1/servlet/com.stardeveloper.servlets.db.DisplayServlet

get a Status 404 resource not available error (The requested resource
(/star1/servlet/com.stardeveloper.servlets.db.DisplayServlet) is not
available.

I know its a simple problem, though I can't figure it out ... Any help?
Appreciated ...


You used :
http://localhost:8080/star1/servlet/com.stardeveloper.servlets.db.DisplayServlet
According to your mapping, you should have used :
http://localhost:8080/star1/servlet/com/stardeveloper/servlets/db/DisplayServlet
--
Regards,
Lori Olson (TeamB)
------------
Save yourself, and everyone else, some time and search the
newsgroups and the FAQ-O-Matic before posting your next
question.
Google Advanced Newsgroup Search
www.google.ca/advanced_group_search
Other Newsgroup Searches:
www.borland.com/newsgroups/ngsearch.html
Joi Ellis's FAQ-O-Matic:
www.visi.com/~gyles19/fom-serve/cache/1.html