tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dmk...@earthlink.net (David M. Karr)
Subject Re: Problems getting "jspc" to completely work
Date Thu, 11 Apr 2002 22:06:49 GMT
>>>>> "Christian" == Christian Bourque <christian@aliosoft.com> writes:

    Christian> David,
    Christian> I think you shouldn't use "file://" for your entity file ! In your war
    Christian> archive, "webinc.xml" should be in the same directory as web.xml (/WEB-INF)

    Christian> Here's my web.xml:

    Christian> <!ENTITY auto-web PUBLIC "auto-web" "auto-web.ent">
    Christian> <web-app>
    Christian>   &auto-web;
    Christian>  ...
    Christian> </web-app>

Yes, I have them in the same directory.  The reason I use "file:./webinc.xml"
as opposed to just "webinc.xml" is because I get a different error otherwise:

2002-04-11 02:59:40 - Exception initializing TldLocationsCache: XML parsing error on file
/WEB-INF/web.xml: (line 6, col -1): Relative URI "webinc.xml"; can not be resolved without
a base URI.

I ran into this once quite a while ago.  I asked about this, but I never got an
answer (I believe).  I finally dug into the XML parsing code, and at that time,
and from what I saw, I came up with that workaround.

    Christian> Also don't worry about the error message reported by Tomcat (XmlMapper)
and
    Christian> here's why :

    Christian> This is not an error, rather a warning you can ignore. Namely, Tomcat has
    Christian> several predefined public id's (most specifically it has a cached instance
    Christian> of the entity with public ID "-//Sun Microsystems, Inc.//DTD Web Application
    Christian> 2.2//EN", so that it needn't load it from the system id
    Christian> "http://java.sun.com/j2ee/dtds/web-app_2_2.dtd" on every startup. This
    Christian> message only informs you that it does not know anything about the document
    Christian> with public ID "auto-web.ent", so it will load it from its system ID (that
    Christian> is, from the file you supplied).

That eases my concern about the first error, but I still don't know why the
Stop and Start operations fail, and why it fails to find "file:./webinc.xml"
(probably the underlying root cause for the "Start" failure).

I almost wish the "JspC" class could automatically augment the "web.xml" with
the new mappings, as opposed to generating a separate file to include from the
main file.  However, if I could get the external entity reference working, I'm
sure I would quickly forget about that idea :) .

-- 
===================================================================
David M. Karr          ; Java/J2EE/XML/Unix/C++
dmkarr@earthlink.net


--
To unsubscribe:   <mailto:tomcat-user-unsubscribe@jakarta.apache.org>
For additional commands: <mailto:tomcat-user-help@jakarta.apache.org>
Troubles with the list: <mailto:tomcat-user-owner@jakarta.apache.org>


Mime
View raw message