dev@glassfish.java.net

Re: schema validation?

From: Nick Rodin <Nick.Rodin_at_Sun.COM>
Date: Mon, 13 Feb 2006 10:20:14 -0800

Jan,

No wonder then that the verifier isn't catching this type of error.
No doubt the enableTldValidation property was set to FALSE for
performance reasons.

Is this property the only way to turn on schema validation? Would
it be possible to pass a command-line argument to jspc? It seems
to me this would be useful if you wanted to be able to verify archives
statically while avoiding the performance hit at runtime.

I must confess I have purely selfish motlve for this request. I don't want
to have to add the enableTldValidation property to sun-web.xml for
hundreds of CTS jsp, jstl, and jsf test archives, in many cases creating
a sun-web.xml file where it wouldn't otherwise be necessary. I'd much
rather you create a compiler switch that the verifier could invoke
which would override whatever value was stored in sun-web.xml.

Nick

>OK, I was able to reproduce the "no error".
>
>>From the RI code, there seem to be several problems:
>
>- The "enableTldValidation" property in sun-web.xml is not
> propagated to the JSP compiler (JSP compiler hard-codes the value
> to FALSE).
>
>- The JSP compiler is not aware of the 2.0 and 2.1 schemas
> for TLDs.
>
>Can you file a bug and assign to me?
>
>Thanks,
>
>Jan
>
>
>
>
>>Sherry
>>On 2/10/2006 11:59 AM, Jan Luehe wrote:
>>
>>
>>
>>>Hi Sherry,
>>>
>>>Sherry Shen wrote On 02/10/06 11:47,:
>>>
>>>
>>>
>>>
>>>>Hi Jan,
>>>>
>>>>I have tried with
>>>>/home/sherrys/public_html/tests/tomcat/as9pe37/jstl12/map.war
>>>>on AS9PE 2-10-2006 nightly, but did not see error.
>>>>Where can I see error anout <jsp-version>?
>>>>
>>>>Did I miss anything?
>>>>sherrys_at_brahma% more sun-web.xml
>>>><?xml version="1.0" encoding="UTF-8"?>
>>>>
>>>><!DOCTYPE sun-web-app PUBLIC '-//Sun Microsystems, Inc.//DTD Sun ONE Application Server 8.0 Servlet
>>>>2.4//EN' 'http://
>>>>www.sun.com/software/sunone/appserver/dtds/sun-web-app_2_4-0.dtd'>
>>>>
>>>><sun-web-app>
>>>> <jsp-config>
>>>> <property name="enableTldValidation" value="true" />
>>>> </jsp-config>
>>>></sun-web-app>
>>>>
>>>>
>>>>
>>>>
>>>can you change to:
>>>
>>> <sun-web-app>
>>> <property name="enableTldValidation" value="true" />
>>></sun-web-app>
>>>
>>>
>>>
>>>
>>>
>>>>sherrys_at_brahma%
>>>>
>>>>Where can I find the usage of enableTldValidation?
>>>>
>>>>Does this build have your fix for JSP-156?
>>>>
>>>>
>>>>
>>>>
>>>My fix for JSP-156 is going to be in the next build (b37).
>>>
>>>
>>>Jan
>>>
>>>
>>>
>>>
>>>
>>>
>>>>Thanks!
>>>>
>>>>Sherry
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>
>>>
>>>
>>>
>
>
>