From about tomcat5.5, when I tried to use quotes in jsp scriptlet, I had to escape. It's a hassle to escape this one by one, so org.apache.jasper.compiler.Parser.STRICT_QUOTE_ESCAPING=false If you set it, you can use it as it is. Reference: http://d.hatena.ne.jp/guangda/20091215/1260836855
In my environment, I added a setting to "CATALINA_OPTS" in 2, but when I set it to tomcat8.5, adding this setting did not work and a 500 error occurred! Looking at the process, it was set as an argument, but it didn't work.
When I suddenly look at the difference in web.xml during the investigation up to tomcat8
<!-- strictQuoteEscaping When scriptlet expressions are used for -->
<!-- attribute values, should the rules in JSP.1.6 -->
<!-- for the escaping of quote characters be -->
<!-- strictly applied? [true] -->
<!-- The default can be changed with the -->
<!-- org.apache.jasper.compiler.Parser. -->
<!-- STRICT_QUOTE_ESCAPING system property. -->
from tomcat8.5
<!-- strictQuoteEscaping When scriptlet expressions are used for -->
<!-- attribute values, should the rules in JSP.1.6 -->
<!-- for the escaping of quote characters be -->
<!-- strictly applied? [true] -->
?? !! It turns out that the description of this part has disappeared
<!-- The default can be changed with the -->
<!-- org.apache.jasper.compiler.Parser. -->
<!-- STRICT_QUOTE_ESCAPING system property. -->
So after this comment on the web.xml side
<servlet>
<servlet-name>jsp</servlet-name>
<servlet-class>org.apache.jasper.servlet.JspServlet</servlet-class>
~Abbreviation~
<init-param>
<param-name>strictQuoteEscaping</param-name>
<param-value>false</param-value>
</init-param>
~Abbreviation~
</servlet>
When I added, the 500 error disappeared (゚ д ゚) wow ……
that's all. It seems that no one has stepped on this mine yet, so for the time being.
Recommended Posts