I have a question on how I should display a JSON object in a JSP page. I have a simple example where it is properly getting the JSON object from the servlet called data and it is simply putting data.name in a <h1> html tag and the data.email in <b> tag.
Is there a better way of displaying this instead of creating a variable which concatenates the JSON object with the html? I am used to formatting the JSP page using JSTL which I find much cleaner. Thanks in advance.
Or every other browser, because they all behave the same, at least the mainstream ones. Firefox does exactly the same: background updates, restart to install them.
Haters gotta hate, I guess.
The widgets update is merely putting lipstick on a pig. If they actually give a damn about making reliable widgets, they should bring back the 100% offline widgets functionality from Windows 7, just like every other platform offers today. Until then, it's just lipstick after lipstick on the same ads junkyard pig.
The rest feature updates, those are good and welcome improvements.
Question
saiz66
Hi all,
I have a question on how I should display a JSON object in a JSP page. I have a simple example where it is properly getting the JSON object from the servlet called data and it is simply putting data.name in a <h1> html tag and the data.email in <b> tag.
Is there a better way of displaying this instead of creating a variable which concatenates the JSON object with the html? I am used to formatting the JSP page using JSTL which I find much cleaner. Thanks in advance.
<div id="data">
<c:forEach var="current" items="${requestScope.exceptionList}">
<div class='data-top'>
${current.defectNumber} <a
href='DisplayUpdateServlet.do?defect=${current.defectNumber } '
class='edit'><img src='css/image/edit.png' border='0'></a>
</div>
<div class='data-bottom'>
<div class='data-bottom-heading'>Activity</div>
<br />
<div class='data-bottom-body'>${current.activity }</div>
<br />
<div class='data-bottom-heading'>Exception</div>
<br />
<div class='exception'>${current.exception }</div>
</div>
<br />
</c:forEach>
</div>
</div>
[/CODE]
Link to comment
https://www.neowin.net/forum/topic/1074857-jquery-ajax-insert-json-object-into-jsp-page/Share on other sites
2 answers to this question
Recommended Posts