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.
It saddens me when cars are such dull colours now. Mine is bright metallic blue and I absolutely adore it for standing out in contrast to that depressing backdrop of traffic.
Sparkle 2.20.0 by Razvan Serea
Sparkle is a free, open-source Windows optimization tool designed to make your PC faster, cleaner, and more private. With Sparkle, you can easily debloat Windows by removing unnecessary apps and services, disable Microsoft tracking to enhance privacy, and apply performance tweaks to boost speed. Its cleaner removes junk and temporary files, while every change is safe and fully reversible. Sparkle also features a modern, user-friendly interface with automatic updates, making system maintenance simple. Explore over 39 tweaks, from disabling telemetry and hibernation to optimizing network and game settings, all aimed at customizing and enhancing your Windows experience.
Sparkle supports Windows 10 and 11.
Sparkle 2.20.0 changelog:
Debloat Tweak has animated border
New homepage loading UI
New Tweak Modal (Markdown Supported)
Refactored GPU Detection
Added Tests with vitest
Added foobar2000 to apps
Added Localsend to apps
Updated Modal Styles
Added styles for disabled inputs
Added Animated Border to debloat-windows tweak
Bumped dependencies
Refactor System info logic for speed
Tweak info modals now support Markdown
Added Clear System info cache to settings
Redesigned Home Page Loading UI
Changed Some Icons around the app
Download: Sparkle 2.20.0 | Portable | ~100.0 MB (Open Source)
Links: Sparkle Website | Github | Screenshot
Get alerted to all of our Software updates on Twitter at @NeowinSoftware
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