Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Netbeans 7 uses JSP EL 2.1 which uses the # character now. </p> <p>For me (Netbeans IDE 7.0 RC1) it compiles fine and works although the line is flagged with an error. If glassfish will not execute the jsp then the following link shows how to disable JSP EL in a JSP 2.1 container (bottom of the following link).</p> <p><a href="http://struts.apache.org/2.0.14/docs/ognl.html" rel="noreferrer">http://struts.apache.org/2.0.14/docs/ognl.html</a></p> <p>Probably the easiest solution at this time is to add the class of the map: </p> <pre><code>#@java.util.LinkedHashMap@{ "foo" : "foo value", "bar" : "bar value" } </code></pre> <p>Found in this thread: <a href="http://struts.1045723.n5.nabble.com/s2-JSF-JSP-EL-vs-OGNL-EL-td3528303.html" rel="noreferrer">http://struts.1045723.n5.nabble.com/s2-JSF-JSP-EL-vs-OGNL-EL-td3528303.html</a></p> <p>For information on the JSP EL 2.1 See: <a href="http://jcp.org/aboutJava/communityprocess/final/jsr245/index.html" rel="noreferrer">http://jcp.org/aboutJava/communityprocess/final/jsr245/index.html</a> </p> <hr> <p>You are probably just showcasing the issue but just to be sure, if you supply a list rather than a map then the value returned to the server will be the same as the displayed value. So the following produces the same select box and does not produce an error:</p> <pre><code>&lt;s:select list="{'7.5%','15.0%'}" &lt;!-- does not show error --&gt; headerValue="Please Select" emptyOption="false"&gt; &lt;/s:select&gt; </code></pre> <p>I spent a little time seeing if I could change the JSP EL version in Netbeans 7 without success, also tried to find a way to disable JSP EL error checking without success. So if you must use OGNL maps in your JSP either disable JSP EL (which isn't an attractive option for some) or explicitly declare the map as shown.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload