User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the JSP section within the Web Development category of DaniWeb, a massive community of 361,542 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 1,987 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our JSP advertiser: Lunarpages JSP Web Hosting
Views: 495 | Replies: 3 | Solved
Reply
Join Date: Mar 2008
Posts: 68
Reputation: Thirusha is an unknown quantity at this point 
Rep Power: 1
Solved Threads: 5
Thirusha Thirusha is offline Offline
Junior Poster in Training

json loop in a jsp page

  #1  
Apr 9th, 2008
Hi

I have passed my json string to a jsp page, i would like to loop through this string to create a sql statement. Any ideas how i would go about looping through the json string in the jsp page?

a snipet of thejson string looks like this:
{"CREATEDBYNAME":"TEST_ADMIN","NAME":"test001","TYPEID":"1900000000"}

Any help will be appreciated.

Thanx
T
AddThis Social Bookmark Button
Reply With Quote  
Join Date: Nov 2004
Location: Netherlands
Posts: 5,576
Reputation: jwenting is a jewel in the rough jwenting is a jewel in the rough jwenting is a jewel in the rough jwenting is a jewel in the rough 
Rep Power: 18
Solved Threads: 184
Colleague
jwenting's Avatar
jwenting jwenting is offline Offline
duckman

Re: json loop in a jsp page

  #2  
Apr 9th, 2008
not. That's not what JSP are to be used for.
42 Private messages asking for help will be ignored
In the frozen land of Nador they were forced to eat Steve's iMinstrels, and there was much rejoicing.
Reply With Quote  
Join Date: Jun 2006
Location: India
Posts: 6,689
Reputation: ~s.o.s~ is a splendid one to behold ~s.o.s~ is a splendid one to behold ~s.o.s~ is a splendid one to behold ~s.o.s~ is a splendid one to behold ~s.o.s~ is a splendid one to behold ~s.o.s~ is a splendid one to behold ~s.o.s~ is a splendid one to behold 
Rep Power: 23
Solved Threads: 312
Moderator
Featured Poster
~s.o.s~'s Avatar
~s.o.s~ ~s.o.s~ is offline Offline
Rebellion Revamped

Re: json loop in a jsp page

  #3  
Apr 9th, 2008
Like it has been already mentioned, use JSP's only for presenting data and not running your database code or parsing a JSON string; use servlets instead. And as far as parsing JSON using Java is concerned, there are a lot of JSON/Java bindings out there.
"I don't accept change. I don't deserve to live."

"Working a real job is a win if you're lazy, greedy, or unmotivated. If you're average, you fit right in. And if you're above average, the basic terms of employment and premise of the arrangement is against your interests."
Reply With Quote  
Join Date: Mar 2008
Posts: 68
Reputation: Thirusha is an unknown quantity at this point 
Rep Power: 1
Solved Threads: 5
Thirusha Thirusha is offline Offline
Junior Poster in Training

Re: json loop in a jsp page

  #4  
Apr 11th, 2008
thanx for teh replies. I have moved my loop into a servlet and it is working great. I have another problem though, but it has to to with servlets(at least i think so), so i m going to put my question there.
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

DaniWeb JSP Marketplace
Thread Tools Display Modes

Other Threads in the JSP Forum

All times are GMT -4. The time now is 1:31 am.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC