• Post Reply Bookmark Topic Watch Topic
  • New Topic

json and jsp?  RSS feed

 
asa dos
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi

iam wondering can i use json with only jsp without servlet or struct ... if yes how can i see example?
thanks
 
David Newton
Author
Rancher
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What's a "struct"?

The use of JSON is independent of any underlying technology. Why you'd *want* to use it with only JSP is a little beyond me.
 
Anirvan Majumdar
Ranch Hand
Posts: 261
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
He probably meant 'struts', but yeah, like David mentioned - JSON is a JavaScript notation which is independent of any underlying server side technology. So using ASP, JSP, Servlet, etc - won't make any difference!
 
asa dos
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
well yes i mean struts ,,,thanks Anirvan Majumdar (notice iam she not he)...
coz when i search over the internet all the jsp example for json include servlet too
so i was just wondering
David Newton dont be angry
 
David Newton
Author
Rancher
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm rarely angry :)

Most examples won't be just JSP because using just JSP is considered an older, discounted practice. Just ask Bear--he'll tell you.
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65833
134
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
asa dos wrote:coz when i search over the internet ...

Please use real words when posting to the forums. Abbreviations such as "coz" in place of "because" only serve to make your posts more difficult to read and less likely to generate useful responses.

Please read this for more information.

thanks,
bear
JavaRanch sheriff
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65833
134
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
P.S. I'm not angry either.
 
asa dos
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
why people here get angry so easily ...
any how thanks all people and try to cheer up
 
Max Rahder
Ranch Hand
Posts: 177
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I use JSP to generate JSON. I'm using Ext JS, which has "data stores" that are populated via JSON returned from an a-sync call. I use JSPs because I already have a standard MVC framework, and some of my controllers are used to fetch business objects used by "normal" JSPs, and those generating JSON. The JSON itself is created using this json tag library.
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65833
134
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
GSON is a great library for generating JSON without the overhead of JSP.
 
Anirvan Majumdar
Ranch Hand
Posts: 261
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
weeeelll - at least I can assure you that I wasn't 'angry' in the least :] And please accept my apologies for making such a grossly presumptuous mistake.
I at least hope you got your answer.
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65833
134
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
People see what they want to see. If anyone wants to see anger in these posts, well, no one is going to be able to stop them.
 
asa dos
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thanks so much people , i tried this example
Example


but i get error say JSONObject not found , note that i put the library in WEB_INF\lib
 
asa dos
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i solve it thanks
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!