[JAVA] Even if I write the setting of STRICT_QUOTE_ESCAPING in CATALINA_OPTS in tomcat8.5, it is not reflected.

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

Even if I write the setting of STRICT_QUOTE_ESCAPING in CATALINA_OPTS in tomcat8.5, it is not reflected.
Isn't it reflected even if the content is updated in Rails?
Is it mainstream not to write the closing tag of <P> tag in Javadoc?
At the time of dialogReturn event, I checked because it is not updated even if I specify a component with update
An active hash that can be treated as data even if it is not in the database
Setting method that the size does not change even if CSS is changed
Even if I want to convert the contents of a data object to JSON in Java, there is a circular reference ...
Directory is not created even if directory task is described in Rakefile
If hash [: a] [: b] [: c] = 0 in Ruby, I want you to extend it recursively even if the key does not exist.
[Rails] When the layout change of devise is not reflected
[Note] What to do if bundle install in Chapter 3 of the rails tutorial is not possible
[Firebase] The problem that the currentUser of Firebase Auth does not become null even if the app is uninstalled.
What if I write a finally clause in the try-with-resources syntax?
Even though the property file path is specified in the -cp option, it is not recognized as a classpath.
What to do if the prefix c is not bound in JSP
Memo: [Java] If a file is in the monitored directory, process it.
Get the type of an array element to determine if it is an array
Write the movement of Rakefile in the runbook
I received the data of the journey (diary application) in Java and visualized it # 001
If the parameter is an array, how to include it in Stopara's params.permit
What to do if the changes are not reflected in the jar manifest file
[Swift] What to do if the app icon is set but not reflected
Be careful about upgrade if you use | etc. in the URL of Tomcat
Retrieve the first day of week in current locale (what day of the week is it today?)
The list of installed apps is not displayed in getPackageManager (Android11 ​​/ API level 30)
When I run the source command in the Ubuntu Makefile, it says "source: command not found"
When using JPA (Hibernate), the Java application does not end even if it reaches the last line of the main method.
Feel the passage of time even in Java
When the project is not displayed in eclipse
Ebean.update () is not executed in the inherited model.
[Rails trivia] Even if you write blog_path instead of blog_path (@ blog), id is automatically completed.
The end of catastrophic programming # 03 "Comparison of integers, if" a> b ", assume that it is" a --b> 0 ""