Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Can't get servlet mapping right - newbie question

Status
Not open for further replies.

marcdauncey

Programmer
Jul 10, 2003
4
GB
Hi everyone, I have what is probably a basic problem with deploying a sample war file on IBM WAS 4.0.

I can't get the servlet mapping right and I wondered if someone could point out where I am going wrong.

The app is called DominoExample and is running correctly according to the WAS administrator. I have set the context root to be "/DominoExample" and I am trying to call a servlet called "DominoExampleServer" in the package "com.csl.domino.example". My understanding is that " should invoke the servlet, but instead I am getting a 404 error, file not found.

The text from my web.xml file follows below:

<?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?>
<!DOCTYPE web-app PUBLIC &quot;-//Sun Microsystems, Inc.//DTD Web Application 2.2//EN&quot; &quot;<web-app id=&quot;WebApp&quot;>
<display-name>DominoExample</display-name>
<servlet id=&quot;Servlet_1&quot;>
<servlet-name>DominoExampleServer</servlet-name>
<display-name>DominoExampleServer</display-name>
<servlet-class>DominoExampleServer</servlet-class>
</servlet>
<servlet id=&quot;Servlet_2&quot;>
<servlet-name>discussiontree</servlet-name>
<display-name>discussiontree</display-name>
<jsp-file>/discussiontree.jsp</jsp-file>
</servlet>
<servlet-mapping id=&quot;ServletMapping_1&quot;>
<servlet-name>DominoExampleServer</servlet-name>
<url-pattern>/DominoExampleServer</url-pattern>
</servlet-mapping>
<servlet-mapping id=&quot;ServletMapping_2&quot;>
<servlet-name>discussiontree</servlet-name>
<url-pattern>/discussiontree.jsp</url-pattern>
</servlet-mapping>
<welcome-file-list id=&quot;WelcomeFileList_1&quot;>
<welcome-file>discussiontree.jsp</welcome-file>
</welcome-file-list>
</web-app>

Many thanks


Marc
 
The most obvious error is in your <servlet-class>. It should be:

<servlet-class>com.csl.domino.example.DominoExampleServer</servlet-class>
good luck!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top