processing json objects in jsp

Posted by user98534 on Stack Overflow See other posts from Stack Overflow or by user98534
Published on 2009-05-06T13:45:07Z Indexed on 2012/09/30 9:37 UTC
Read the original article Hit count: 243

Filed under:
|
|
|
|

i have a JSON object sent from the browser to the jsp page. how do i receive that object and process it in jsp. do i need any specific parsers? i have used the following piece of code. but it wouldnt work. essentially i should read the contents of the object and print them in the jsp.

<%@page language="java" import="jso.JSONObject"%>

<%
JSONObject inp=request.getParameter("param1");
%>

<% for(int i=0;i<inp.size();i++)
{%>
    <%=inp.getString(i)%>
<%
}
%>

© Stack Overflow or respective owner

Related posts about JSON

Related posts about jsp