tags:

views:

59

answers:

1

Hi, everyone,

I want to ask a question about the JSP and REST call. I am making a JSP page and need to mark a REST call and receive the REST call in JSON format. The JSP (.war) is running on the tomcat server. Like the following:

JSP(REST call) -> server -> JSON format(REST respond)

However, I don't know how to make the call and response. Can anyone help me? Thank you.

+2  A: 

This is an old school approach

http://relativelyignorant.net/blog/2007/08/rest-with-jsp/

I would suggest using jQuery and ajax to implement the functionality in javascript

http://api.jquery.com/jQuery.getJSON/

Aaron Saunders
@Aaron Saunders, thank you for your reply. and I must use the JSON in REST to do that :). And I still don't understand how to call the REST. Do I need to add something in the URL (e.g. http://http://example?para1=value1), like the GET method? or I have to do the setting in the tomcat server? Thank you very much.
Questions