dev@glassfish.java.net

Re: schema validation?

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

Jeanfrancois Arcand wrote:

>
>
> Kin-man Chung wrote:
>
>> I think the best time to do TLD validation is at the deployment.
>> It would perform the validation only once. Is there a technical
>> reason why this cannot be done?
>
>
> Yes, performance :-) TLD validation has a strong impact on how long it
> takes when deploying since you need to scan all jars available on the
> classpath.
>
> -- Jeanfrancois

Makes a lot of sense then for jspc to have a compiler switch to turn on
validation.

Nick

>
>>
>> -Kin-man
>>
>> On Mon, 2006-02-13 at 10:27, Jan Luehe wrote:
>>
>>> Nick,
>>>
>>> Nick Rodin wrote On 02/13/06 10:20,:
>>>
>>>> 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.
>>>
>>>
>>> I think this is a very good idea! Can you file an RFE and assign to me?
>>>
>>> Notice that "jspc" ignores sun-web.xml, which means that even if you
>>> did specify "enableTldValidation" there, it would not make any
>>> difference.
>>>
>>>
>>> Jan
>>>
>>>
>>>
>>>> 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
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>>
>>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: dev-unsubscribe_at_glassfish.dev.java.net
>>> For additional commands, e-mail: dev-help_at_glassfish.dev.java.net
>>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe_at_glassfish.dev.java.net
>> For additional commands, e-mail: dev-help_at_glassfish.dev.java.net
>>
>>