Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Tomcat Error

 
Giri Thava
Ranch Hand
Posts: 38
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am using Kathy's "Head First Servlets and JSP" for preparing SCWCD Cert.
I tried to run the example listed in the page no 30, but I received the following error message when starting Tomcat(ver5.5).

SEVERE: Parse error in application web.xml
java.lang.IllegalArgumentException:Can't convert argument:null
SEVERE: Occurred at line 14 column 23
SEVERE: Context [/ch1] startup failed due to previous errors

The server starts up. When I launch the example in the IE the Tomcat errror message is displayed in the browser(Resource is not found).

I think the problem is with the web.xml file. I typed and saved the web.xml file as it is described in the book.

I use WinndowsXP, Java 1.5 and Tomcat 5.12.
How to solve this problem?
 
Christophe Verré
Sheriff
Posts: 14691
16
Eclipse IDE Ubuntu VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please post your web.xml
 
Giri Thava
Ranch Hand
Posts: 38
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This is my web.xml file. The servlet compiles fine.I installed Tomcat using zip file not using exe file.

<web-app xmlns="http://java.sun.com/xml/ns/j2ee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"
version="2.4">

<servlet>
<sevlet-name>Chapter1 Servlet</sevlet-name>
<servlet-class>Ch1Servlet</servlet-class>
</servlet>

<servlet-mapping>
<sevlet-name>Chapter1 Servlet</sevlet-name>
<url-pattern>/Serv1</url-pattern>
</servlet-mapping>

</web-app>
 
Ken Januski
Ranch Hand
Posts: 130
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Take a closer look at your xml. You have <sevlet-name>. I'd guess that this is also on the same line number that the error mentions.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic