I'm still struggling with the following web.xml : (been 3 days by now :( )
<?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>genClass</servlet-name>
<servlet-class>genClass</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>genClass</servlet-name>
<url-pattern>/genClass</url-pattern>
</servlet-mapping>
</web-app>
OS : W2K
Java : JDK and J2EE installed
can run sample-servlets
Tomcat 4.1
dir structure :
D:\applications\Tomcat 4.1\webapps\myApp\WEB-INF\web.xml
D:\applications\Tomcat 4.1\webapps\myApp\WEB-INF\classes
I am still stuck with the following errors :
DÚmarrage du service Tomcat-Standalone
Apache Tomcat/4.1.24
15 mai 2003 20:26:22 org.apache.commons.digester.Digester fatalError
GRAVE: Parse Fatal Error at line 5 column 6: The processing instruction
target m
atching "[xX][mM][lL]" is not allowed.
org.xml.sax.SAXParseException: The processing instruction target
matching "[xX][
mM][lL]" is not allowed.
at
org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(Un
known Source)
at
org.apache.xerces.util.ErrorHandlerWrapper.fatalError(Unknown Source)
at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown
Source)
at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown
Source)
at org.apache.xerces.impl.XMLScanner.reportFatalError(Unknown
Source)
at org.apache.xerces.impl.XMLScanner.scanPIData(Unknown Source)
at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanPIData(Unkn
own Source)
at org.apache.xerces.impl.XMLScanner.scanPI(Unknown Source)
at
org.apache.xerces.impl.XMLDocumentScannerImpl$PrologDispatcher.dispat
ch(Unknown Source)
at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Un
known Source)
at org.apache.xerces.parsers.DTDConfiguration.parse(Unknown Source)
at org.apache.xerces.parsers.DTDConfiguration.parse(Unknown Source)
at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown
Source)
at org.apache.commons.digester.Digester.parse(Digester.java:1543)
at
org.apache.catalina.startup.ContextConfig.applicationConfig(ContextCo
nfig.java:282)
at
org.apache.catalina.startup.ContextConfig.start(ContextConfig.java:63
9)
at
org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfi
g.java:243)
at
org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(Lifecycl
eSupport.java:166)
at
org.apache.catalina.core.StandardContext.start(StandardContext.java:3
567)
at
org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase
.java:821)
at
org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:80
7)
at
org.apache.catalina.core.StandardHost.addChild(StandardHost.java:579)
at
org.apache.catalina.core.StandardHostDeployer.install(StandardHostDep
loyer.java:307)
at
org.apache.catalina.core.StandardHost.install(StandardHost.java:772)
at
org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.j
ava:559)
at
org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:401
)
at
org.apache.catalina.startup.HostConfig.start(HostConfig.java:718)
at
org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java
:358)
at
org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(Lifecycl
eSupport.java:166)
at
org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1196)
at
org.apache.catalina.core.StandardHost.start(StandardHost.java:738)
at
org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1188)
at
org.apache.catalina.core.StandardEngine.start(StandardEngine.java:347
)
at
org.apache.catalina.core.StandardService.start(StandardService.java:4
97)
at
org.apache.catalina.core.StandardServer.start(StandardServer.java:219
0)
at org.apache.catalina.startup.Catalina.start(Catalina.java:512)
at org.apache.catalina.startup.Catalina.execute(Catalina.java:400)
at org.apache.catalina.startup.Catalina.process(Catalina.java:180)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:203)
15 mai 2003 20:26:22 org.apache.coyote.http11.Http11Protocol start
INFO: DÚmarrage de Coyote HTTP/1.1 sur le port 8080
15 mai 2003 20:26:22 org.apache.jk.common.ChannelSocket init
INFO: JK2: ajp13 listening on /0.0.0.0:8009
15 mai 2003 20:26:22 org.apache.jk.server.JkMain start
INFO: Jk running ID=0 time=31/140 config=D:\applications\Tomcat
4.1\conf\jk2.properties
A big Thank you for whoever manages to help me out !!!
<?xml version="1.0" encoding="ISO-8859-1"?>
.> GRAVE: Parse Fatal Error at line 5 column 6: The processing instruction
Well then, what _do_ you have at line 5, column 6 of your web.xml? Is
there a duplicate XML declaration there (or elsewhere)? Have you looked
at the file with a hex editor, or anything else that would tell you
whether there are actually any other characters in the file before the
XML declaration (that your editor may not be showing you, and/or may be
creating automagically for you)?
John Bollinger
jobo...@indiana.edu
Any tip appreciated :)
Well, frankly, either that isn't it, or your java is broken. I'd bet on
the former. Is it possible that that is not the web.xml that is
actually being used? Or that it is not the one that is broken? Did you
check the file with a hex editor, as I described in my previous
response? (You don't even really need a hex editor -- you could write a
little java program that reads the bytes with an InputStream (NOT a
Reader) and displays their values.) The exception stack trace you
posted simply makes no sense if it is supposed to be based on what you
list there alone. Do you, by any chance, have comments before the XML
declaration that you haven't previously mentioned? The most likely
answer is that you don't really have what you think you have.
John Bollinger
jobo...@indiana.edu
I'll dig on but it really queer ....
thank you for your answers though :)
The question being of course, why ?
If I remove this line, my servlet works ok if I put it, well I get my
former error .....
Does this ring anyone's bell ?
If not then the XML parser may well get confused.
"charly" <kana...@yahoo.fr> wrote in message
news:ba5gca$je0$1...@news-reader13.wanadoo.fr...
Try adding a DOCTYPE line to your web.xml file. I believe it is not optional.
Here is the DOCTYPE for Servlet 2.3:
But anyway, I think I'l stop this field of research and concentrate on
the developmenet rather on setup : it is funnier :)