title: How to display Json object in jsp
body: <p>I'm newbie to jsp. I have a <code>JSON</code> coding </p>
  
  <pre><code>{"eventDetails":[{"startDate":1387175589253,"eventJSON":"{\"userIp\":\"***.***.***.**\",\"organizationUid\":\"4261-5404a609bd14\",\"userAgent\":\"Restlet-Framework\/2.1m3\",\"currentSessionToken\":\"9f3ee5b076-27dbead458ca\",\"endTime\":1312,\"apiKey\":\"b6bd9-30849cf17727\",\"startTime\":13853,\"sessionToken\":null,\"eventId\":\"4731d1-adb6-10faaa3ee269\",\"userUid\":null,\"userId\":1,\"context\":\"\/v2\/account\/loginas\/anonymous\",\"eventName\":\"user-loginAs\""
  </code></pre>
  
  <p>I need to display eventJSON object as a raw data :</p>
  
  <pre><code>{\"userIp\":\"204.236.177.80\",\"organizationUid\":\"4261739e-ccae-11e1-adfb-5404a609bd14\",\"userAgent\":\"Restlet-Framework\/2.1m3\",\"currentSessionToken\":\"9f3ee54a-4f5f-b076-27d8ca\",\"endTime\":1387175589312,\"apiKey\":\"b6b8-4ad5-96d9-3084927\",\"startTime\":1387175589253,\"sessionToken\":null,\"eventId\":\"478e8-4ed1-adb6-10faaa3ee269\",\"userUid\":null,\"userId\":11878,\"context\":\"\/v2\/act\/lonas\/anonymous\",\"eventName\":\"user-loginAs\"}
  </code></pre>
  
  <p>how to display eventJSON using gson and printing with <code>c:out</code>.</p>
  
  <p><strong>JSP Page</strong></p>
  
  <pre><code>&lt;tr id="datalogList-${gC.index}"&gt;
  &lt;td id = "eventName-${gC.index}"&gt;
  &lt;c:out value="${datalog.eventName}" /&gt;
  &lt;/td&gt;   
  &lt;td id = "startTime-${gC.index}"&gt;
  &lt;c:out value="${datalog.startTime}" /&gt;
  &lt;/td&gt;  
  &lt;td id = "endTime-${gC.index}"&gt;
  &lt;c:out value="${datalog.endTime}" /&gt;
  &lt;/td&gt;
  &lt;td id = "apiKey-${gC.index}"&gt;&lt;/a&gt;
  &lt;c:out value="${datalog.apiKey}" /&gt;
  &lt;/td&gt;
  &lt;/tr&gt; 
  </code></pre>
  
  <p><strong>Java</strong></p>
  
  <pre><code>  Datalogging[]  logevents = (Datalogging[]) gson.fromJson(eventValueList.toString(),Datalogging[].class);
  </code></pre>
  
  <p>Thanks for reading.</p>