title: How to concatenate string literals inside of JSP expression within custom jsp tag
body: <p>I have a really strange problem, following attribute of a jsp tag</p>
  
  <pre><code> &lt;custom:tag onclick="addBid('&lt;%= container_index + "string" %&gt;');" /&gt;
  </code></pre>
  
  <p>cannot be processed by jsp compiler </p>
  
  <pre><code>20:18:00,374 ERROR [render_portlet_jsp:154] org.apache.jasper.JasperException: /WEB-INF/jsp/customers/abcd.jsp(146,107) equal symbol expected
          at org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:40)
  </code></pre>
  
  <p>Simply if there are double quotes around <code>" '&lt;%= %&gt;' "</code>, they cannot be again inside <code>" '&lt;%= " " %&gt;' "</code></p>
  
  <p>On the other hand, if it was in a html element :</p>
  
  <pre><code>&lt;input id="bid" onclick="addBid('&lt;%= container_index + "string" %&gt;');" /&gt;
  </code></pre>
  
  <p>It works fine</p>
  
  <p>Please don't tell me that I should use tag libraries for that... :-)</p>