4

This is regarding strict quote escaping in tomcat mentioned in http://blogs.sourceallies.com/2009/10/strict-quote-escaping-in-tomcat/

I am using apache-tomcat-6.0.36 and I am not facing any issue related to this. So is this issue specific only to certain versions of tomcat 6+? Also does this depend on J2EE version?

Note : I haven't configured org.apache.jasper.compiler.Parser.STRICT_QUOTE_ESCAPING in $TOMCAT_HOME/conf/catalina.properties

Colin 't Hart
  • 7,372
  • 3
  • 28
  • 51
thiru_k
  • 847
  • 2
  • 12
  • 21
  • Possible duplicate of [simple error due to use of double quotes in a jsp file](http://stackoverflow.com/questions/6501265/simple-error-due-to-use-of-double-quotes-in-a-jsp-file) – Vadzim May 16 '17 at 21:27

2 Answers2

7

Tomcat8 has deprecated and removed previous property which may break installations if older instructions are to be followed. See this guide to fix issue.

Tomcat7 and earlier versions

Add this property to the end of $tomcat/conf/catalina.properties file.

org.apache.jasper.compiler.Parser.STRICT_QUOTE_ESCAPING=false

Tomcat8 and most recent versions

Add this parameter to the JspServlet in $tomcat/conf/web.xml file.

Find this servlet <servlet-class>org.apache.jasper.servlet.JspServlet</servlet-class>

Add parameter <init-param><param-name>strictQuoteEscaping</param-name><param-value>false</param-value></init-param>

Whome
  • 10,181
  • 6
  • 53
  • 65
0

The changes arose from https://issues.apache.org/bugzilla/show_bug.cgi?id=45015

That was fixed in 6.0.17 onwards. Earlier versions will be more tolerant of invalid quote sequences.

There is no dependency on the versions of the Servlet or JSP specification declared in any descriptor.

If you don't see an issue, the most likely explanation is that your application is using quotes om a specification compliant way.

Mark Thomas
  • 16,339
  • 1
  • 39
  • 60