This is the web.xml file I uploaded
<?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>
<listener>
<listener-class>com.worktigers.core.SessionAppListener</listener-class>
</listener>
<welcome-file-list>
<welcome-file>index.jsp</welcome-file>
</welcome-file-list>
</web-app>
But I got the following error from Tomcat.
2007-01-12 18:31:25 ContextConfig[/worktigers] Parse error in application web.xml
org.xml.sax.SAXParseException: The processing instruction target matching "[xX][mM][lL]" is not allowed.
at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
TA
Malai
Answering your original question. Yes it is possible to have a web.xml without servlet classes, if you are not using servlet classes.
>
> But I got the following error from Tomcat.
>
> 2007-01-12 18:31:25 ContextConfig[/worktigers] Parse
> error in application web.xml
> org.xml.sax.SAXParseException: The processing
> instruction target matching "[xX][mM][lL]" is not
> allowed.
> at
> t
> org.apache.xerces.parsers.AbstractSAXParser.parse(Unkn
> own Source)
>
> TA
> Malai
It looks like there may be BOM characters (invisible in regular editors), before the opening angle bracket of the XML prolog: <?xml version="1.0"
The special characters usually are inserted by some editors such as Notepad.
You can download a free Hex editor, like Cygnus hex editor and see if you have the 3 special characters (in Hex) appearing before the XML prolog.
If you see anything before the prolog delete them, save the web.xml file and re-test it.
Reading from previous answers to your problem from here:
http://forum.java.sun.com/thread.jspa?threadID=694303&messageID=4033694
http://mail-archives.apache.org/mod_mbox/xerces-j-users/200201.mbox/%3Cp04330102b8689660dcbc@%5B192.168.254.4%5D%3E