tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Szegedi, Attila" <szeg...@scriptum.hu>
Subject RE: Entity in web.xml
Date Fri, 22 Mar 2002 11:16:25 GMT
The first message,
XmlMapper: Can't find resource for entity: jspdecl -->
/var/tomcat4/webapps/ROOT/WEB-INF/jspdecl.xml "null"
is irrelevant. It only tells you Tomcat has no cached entity for the
specified public identifier. You know, Tomcat actually caches entities for
some well known public identifiers ("-//Sun Microsystems, Inc.//DTD Web
Application 2.2//EN" for example, so it doesn't have to fetch it from
"http://java.sun.com/j2ee/dtds/web-app_2_2.dtd" phisically every time).

I guess it chokes on absolute path. I use relative paths only, so I guess
the XML parser can locate the entity file relative to the XML file. Try
either using a relative path, or using absolute path prefixed with "file://"

If this doesn't work, I have no further ideas.
Cheers,
  Attila.


> -----Original Message-----
> From: Benoit Mahe [mailto:bmahe@activia.net]
> Sent: Friday, March 22, 2002 11:24 AM
> To: Szegedi, Attila
> Cc: tomcat-dev@jakarta.apache.org
> Subject: RE: Entity in web.xml
>
>
> Well, it still doesn't works :(
>
> Now I got:
>
> XmlMapper: Can't find resource for entity: jspdecl -->
> /var/tomcat4/webapps/ROOT/WEB-INF/jspdecl.xml "null"
> PARSE error at line 0 column 0
> org.xml.sax.SAXParseException: File
> "/var/tomcat4/webapps/ROOT/WEB-INF/jspdecl.xml" not found.
>
> Thank you for your help.
>
> Regards, Benoit.
>
> On Fri, 2002-03-22 at 10:57, Szegedi, Attila wrote:
> > Try declaring your ENTITY using a public identifier:
> >
> > <!ENTITY jspdecl PUBLIC "jspdecl"
> > "/var/tomcat4/webapps/ROOT/WEB-INF/jspdecl.xml">
> >
> > This works for me altough I've only used Tomcat 3.x
> versions this far.
> > Cheers,
> >   Attila.
> >
> > > -----Original Message-----
> > > From: Benoit Mahe [mailto:bmahe@activia.net]
> > > Sent: Friday, March 22, 2002 10:49 AM
> > > To: Szegedi, Attila;
> > > Cc: Benoit Mahe
> > > Subject: Entity in web.xml
> > >
> > >
> > > Hello, I'm trying to use entity in web.xml for tomcat 4.0.3, but
> > > it doesn't work:
> > >
> > > Here is my web.xml:
> > >
> > > <!DOCTYPE web-app
> > >     PUBLIC "-//Sun Microsystems, Inc.//DTD Web
> Application 2.2//EN"
> > >     "http://java.sun.com/j2ee/dtds/web-app_2_2.dtd"
> > > [
> > > <!ENTITY jspdecl SYSTEM
> > > "/var/tomcat4/webapps/ROOT/WEB-INF/jspdecl.xml">
> > > ]>
> > >
> > > <web-app>
> > >
> > >  <!-- ... -->
> > >
> > >  &jspdecl;
> > >
> > > </web-app>
> > >
> > > But when tomcat starts, I got an exception:
> > >
> > > 2002-03-22 09:39:42 ContextConfig[] Parse error in
> application web.xml
> > > java.lang.NullPointerException
> > > 	at java.util.Hashtable.get(Hashtable.java:320)
> > > 	at
> > > org.apache.catalina.util.xml.XmlMapper.resolveEntity(XmlMapper
> > > .java:441)
> > > 	at
> > > org.apache.xerces.readers.DefaultEntityHandler.startReadingFro
> > > mExternalEntity(DefaultEntityHandler.java)
> > > 	at
> > > org.apache.xerces.readers.DefaultEntityHandler.startReadingFro
> > > mEntity(DefaultEntityHandler.java)
> > > ...
> > >
> > > Are you using entities in web.xml with tomcat 4.0.3?
> > >
> > > Regards,
> > >
> > > Benoit Mahe.
> > >
> > >
> > >
> >
> >
> --
> -- Benoit Mahe                            --
> -- ActiVia Networks                       --
> -- Constellation Manager, Project Leader  --
> --
>
>
>


--
To unsubscribe, e-mail:   <mailto:tomcat-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:tomcat-dev-help@jakarta.apache.org>


Mime
View raw message