tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Garret Wilson <>
Subject Re: using character entities and JSF XML
Date Sun, 19 Sep 2004 05:37:47 GMT

Eric Suen wrote:
>>I didn't know that XML required internal document types to declare the
>>root element.
> see bug:
> seems tomcat guys like this stupid feature very much, even it is very easy
> add an option to disable those kind validation in production env.  I think
> the validation is necessary in developing, but in production env, for
> performance, maybe we want to disable validation, I just dont understand
> why jsp 2.0 force us to validation the xml file even it can not do it well.

Thanks so much for this helpful link! First, the <jsp:output> element is 
really cool---no more <jsf:verbatim>!

Secondly, I think I see how this whole two-step process of translating 
character entities works---I need to define a character entity with the 
ampersand escaped.

Thirdly, if I can define a DOCTYPE for my entire JSP file and stick it 
away in a file and just reference it from all my JSPs, this would be 

* I could define all my doubly-escaped character entities that I now 
realize I need.

* I can even specify the root namespace declaration attributes as 
#FIXED, so that I never have to define them.

The little problem is that I don't understand why Tomcat is requiring 
that *every* element be defined---does XML require that, if an internal 
or external DTD is present, it must define each and every element in the 
document? I didn't think so---can't one have just an external DOCTYPE 
with only character entities defined?

If this is an XML requirement, then it's the way Tomcat should go. Now I 
need to track down the official JSF and JSP element DTDs, combine them 
in one file with my doubly-escaped character entities, and I'll be ready 
to go. (Something will probably come up, though.)

Hey, wait a minute---doesn't Tomcat already tell me if certain JSF and 
JSP tags don't have attributes that the DTD requires? Where is Tomcat 
getting *that* information---is it processing some DTD in the 
background? Will my custom DTD conflict? These questions and more will 
have to be answered after I get some sleep...


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message