Java 使用EL表达式访问JSP中的JSONObject属性

Java 使用EL表达式访问JSP中的JSONObject属性,java,json,jsp,el,Java,Json,Jsp,El,我有一个servlet,它将字符串转换为JSONObject,如下所示: JSONObject myObject = new JSONObject("{'someKey':'someValue'}"); //sending it to the JSP with RequestDispatcher request.setAttribute("jsonObject", myObject) requestDispatcher.forward(request, response); 现在在JSP中,

我有一个servlet,它将字符串转换为JSONObject,如下所示:

JSONObject myObject = new JSONObject("{'someKey':'someValue'}"); 
//sending it to the JSP with RequestDispatcher
request.setAttribute("jsonObject", myObject)
requestDispatcher.forward(request, response);
现在在JSP中,我尝试使用EL表达式
${jsonObject.someKey}
访问它,我得到以下错误:

javax.el.PropertyNotFoundException: The class 'org.json.JSONObject' does not have the property 'someKey'.
希望能有帮助

${jsonObject.get("someKey")}