2015-09-29 22:48 GMT+03:00 Mark Thomas <ma...@apache.org>:
>
> On 29/09/2015 20:37, Violeta Georgieva wrote:
> > 2015-09-28 14:26 GMT+03:00 Mark Thomas <ma...@apache.org>:
>
> <snip/>
>
> >> The proposed 8.0.27 release is:
> >> [ ] Broken - do not release
> >> [ ] Stable - go ahead and release as 8.0.27
> >
> > I have the following use case [1]. It used to be working with the
previous
> > version (8.0.26).
> >
> > Now it fails with the following [2].
>
> This looks to be caused by the changes for BZ 57316.
>
> > I didn't find in the spec whether this is allowed or not :( however the
> > exception is bad.
>
> In what way? The JSP isn't valid so you are getting an exception.
>
> More comments in-line.
>
> >
> > Regards,
> > Violeta
> >
> > [1]
> >
> > Index: org/apache/el/TestELInJsp.java
> > ===================================================================
> > --- org/apache/el/TestELInJsp.java (revision 1705912)
> > +++ org/apache/el/TestELInJsp.java (working copy)
> > @@ -318,6 +318,7 @@
> >          assertEcho(result, "20-4");
> >          assertEcho(result, "21-[{value=11}, {value=12}, {value=13},
> > {value=14}]");
> >          assertEcho(result, "22-[{value=11}, {value=12}, {value=13},
> > {value=14}]");
> > +        assertEcho(result, "23-\\\"foo\\\"");
> >      }
> >
> >      @Test
> > Index: webapp/el-misc.jsp
> > ===================================================================
> > --- webapp/el-misc.jsp (revision 1705912)
> > +++ webapp/el-misc.jsp (working copy)
> > @@ -41,4 +41,5 @@
> >      <p>20-${{1,2,3,4}.stream().max().orElse(-1)}</p>
> >      <tags:echo
> >
echo='21-${{1,2,3,4}.stream().sorted().map(u->{"value":u+10}).toList()}' />
> >
> >
 <p>22-${{1,2,3,4}.stream().sorted().map(u->{"value":u+10}).toList()}</p>
> >  </body>
> > +    <tags:echo echo="23-${\"\\\"foo\\\"\"}" />
>
> This is a good example of where things get interesting. The above line
> is parsed as follows:
>
>    <tags:echo echo="23-${
>
> is parsed using the JSP spec followed by
>
> \"\\\"foo\\\"\"
>
> which is parsed with the EL spec and then
>
> }" />
>
> is parsed with the JSP spec again.
>
> The problem is in the EL section. You are trying to define a literal so
> you do not want to escape the initial and final " characters. By
> escaping them you are making them part of the String literal which means
> you have an EL expression containing just a literal which is missing the
> mandatory quotes.
>
>
> >  </html>
> > \ No newline at end of file
> >
> > [2]
> >
> >  org.apache.catalina.core.StandardWrapperValve.invoke Servlet.service()
for
> > servlet [jsp] in context with path [/test] threw exception [/el-misc.jsp
> > (line: 44, column: 21) attribute for " is not properly terminated] with
> > root cause
> >  org.apache.jasper.JasperException: /el-misc.jsp (line: 44, column: 21)
> > attribute for " is not properly terminated
>
> Ah. When you say the exception is bad do you mean it should report
> [echo] rather than ["] in the error message above? That does seem like a
> reasonable requirement.

Yep the exception should give more information

> So far, I haven't seen anything that I think is serious enough to stop
> the 8.0.27 release.

Agree. As I wrote I didn't find anything in the spec, but I was not sure
whether I miss something or not.
Now as you also pointed that this is wrong I think that the exception
message can be changed in the next release and we can continue with voting.

Here is my +1

> Mark
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: dev-h...@tomcat.apache.org
>

Reply via email to