Wednesday, August 11, 2010

Expression Language, Conditional Operator , WebLogic Tomcat incompatibility problem

Web logic server requires extra whitespaces in this situation:

<td>${fn:escapeXml(r.queryString==null?'null':r.queryString)}</td>


Apache Tomcat/6.0.28 - works fine
WebLogic Server 10.3.3.0 fails with


weblogic.servlet.jsp.CompilationException: Failed to compile JSP /RequestUrl.jspx
RequestUrl.jspx:44:50: Syntax error in expression. Encountered ":r". Expected one of ...


WLS requires extra space after :

<td>${fn:escapeXml(r.queryString==null?'null': r.queryString)}</td>

//TODO: check grammar in specs .... please
//JSP.2.3.8 Conditional Operator - A ? B : C
//and find out who is right or wrong.

2 comments:

  1. Thanks for this information and was very helpful. I wasted several hours finding this issue.

    ReplyDelete
  2. I just run into this issue.
    Thanks for the explanation.

    PS: Did you found out who is right/wrong?

    ReplyDelete