Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / Tools / December 2003

Tip: Looking for answers? Try searching our database.

tomcat error....

Thread view: 
devu - 26 Dec 2003 11:03 GMT
Am crossposting this one since java.lang did not throw up any replies.
Hope I get one here

Hello,

I'm getting the following error when trying to start Apache Tomcat.The
version shows up in the snapshot. I can't figure out why this is
happening. It is aparently the <context-param> tag. If I remove it
tomcat starts properly. I have pasted web.xml below with the error.

WEB.XML
?xml version="1.0" encoding="ISO-8859-1"?>

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

<web-app>
<servlet>
<servlet-name>rooms</servlet-name>
<servlet-class>ListRooms</servlet-class>
</servlet>

<context-param>
<param-name>listroom_path</param-name>
<param-value>context_chat</param-value>
</context-param>
</web-app>

ERROR:
Starting service Tomcat-Standalone
Apache Tomcat/4.0.5
PARSE error at line 17 column 11
org.xml.sax.SAXParseException: The content of element type "web-app"
must match
"(icon?,display-name?,description?,distributable?,context-param*,filter*,filter-
mapping*,listener*,servlet*,servlet-mapping*,session-config?,mime-mapping*,welco
me-file-list?,error-page*,taglib*,resource-env-ref*,resource-ref*,security-const
raint*,login-config?,security-role*,env-entry*,ejb-ref*,ejb-local-ref*)".
Starting service Tomcat-Apache
Apache Tomcat/4.0.5

Also posting a previous question which went unanswered:

In the case of servlets, if the SingleThreadModel interface is "NOT"
implemented, can we assume that the container will create only one
Instance of the servlet ?? Or is this container dependent.

Thanks in advance,

Devu.
Herman Timmermans - 26 Dec 2003 10:48 GMT
> Am crossposting this one since java.lang did not throw up any replies.
> Hope I get one here
[quoted text clipped - 31 lines]
> org.xml.sax.SAXParseException: The content of element type "web-app"
> must match

"(icon?,display-name?,description?,distributable?,context-param*,filter*,filter-

mapping*,listener*,servlet*,servlet-mapping*,session-config?,mime-mapping*,welco

me-file-list?,error-page*,taglib*,resource-env-ref*,resource-ref*,security-const
> raint*,login-config?,security-role*,env-entry*,ejb-ref*,ejb-local-ref*)".
> Starting service Tomcat-Apache
[quoted text clipped - 9 lines]
>
> Devu.
*************************************************************************
Hi,

The <context-param> tag must be placed at the start of the <web-app> tag.  
In other words, it can follow either the <web-app> tag or its
<description></description> tag only. This means that you should modify
your web.xml and make sure that <context-param> tag proceeds the <servlet>
tag.  This should do it.
Brgds, Herman
Signature

Suse Linux Professional 8.1 on Athlon 1.1 Ghz 512 Mb
Anti Spam = remove the "dot" and the "at"
Registered Linux User #264690



Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.