You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by Jeremy Boynes <jb...@apache.org> on 2013/07/06 00:10:25 UTC

Re: svn commit: r1500062 - bug55198.jsp

On Jul 5, 2013, at 9:33 AM, markt@apache.org wrote:
> +<jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="2.0">
> +<jsp:directive.tag body-content="scriptless" />
> +<jsp:text>
> +  <a href="#" onclick="window.alert(&quot;${'foo'}&quot;)">foo</a>
> +  <a href="#" onclick="window.alert(&quot;bar&quot;)">bar</a>
> +</jsp:text>
> +<jsp:doBody />
> +</jsp:root>

I believe, strictly, <jsp:text> can't have a sub-element like <a>. 
Wouldn't the test case still hold if the <jsp:text> was removed?

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


Re: svn commit: r1500062 - bug55198.jsp

Posted by Jeremy Boynes <jb...@apache.org>.
On Jul 6, 2013, at 1:00 PM, Mark Thomas <ma...@apache.org> wrote:

> On 05/07/2013 23:10, Jeremy Boynes wrote:
>> On Jul 5, 2013, at 9:33 AM, markt@apache.org wrote:
>>> +<jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="2.0">
>>> +<jsp:directive.tag body-content="scriptless" />
>>> +<jsp:text>
>>> +  <a href="#" onclick="window.alert(&quot;${'foo'}&quot;)">foo</a>
>>> +  <a href="#" onclick="window.alert(&quot;bar&quot;)">bar</a>
>>> +</jsp:text>
>>> +<jsp:doBody />
>>> +</jsp:root>
>> 
>> I believe, strictly, <jsp:text> can't have a sub-element like <a>. 
>> Wouldn't the test case still hold if the <jsp:text> was removed?
> 
> Correct. That raises the question why the tagx file didn't fail at the
> parsing stage. I need to look into this some more.

The check in JspDocumentParser#startElement() looks too specific - how about removing the check for JSP_URI.equals(uri) to trap any element?
I opened 55207 to track and attached a patch.

BTW, svn:eol-style is not set on the files added in r1500062


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


Re: svn commit: r1500062 - bug55198.jsp

Posted by Mark Thomas <ma...@apache.org>.
On 05/07/2013 23:10, Jeremy Boynes wrote:
> On Jul 5, 2013, at 9:33 AM, markt@apache.org wrote:
>> +<jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="2.0">
>> +<jsp:directive.tag body-content="scriptless" />
>> +<jsp:text>
>> +  <a href="#" onclick="window.alert(&quot;${'foo'}&quot;)">foo</a>
>> +  <a href="#" onclick="window.alert(&quot;bar&quot;)">bar</a>
>> +</jsp:text>
>> +<jsp:doBody />
>> +</jsp:root>
> 
> I believe, strictly, <jsp:text> can't have a sub-element like <a>. 
> Wouldn't the test case still hold if the <jsp:text> was removed?

Correct. That raises the question why the tagx file didn't fail at the
parsing stage. I need to look into this some more.

Mark


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