Hi, everyone,
I want to ask a question about the JSON and JSP. I have 2 JSP (JSP1 & JSP2) pages and 1 JSON format file.
Both of the JSP pages are pack into a .war file. The JSON file is stored in a web server(e.g. http://examp;e.com
). And I have to do the following tasks:
1) Open the JSP1 (has a link)
2) When the user clicks the link, it will call the JSON file (http://examp;e.com
)
3) Display the JSP2 and show the content of the JSON file
{ "class":
{
"number": 2,
"student":
{
"name": "Tom",
"age": 1
},
"student":
{
"name": "May",
"age": 2
}
}
}
I have the basic knowledge of the HTML and the JSP, but I don't know how to do this action. Should I use the in the JSP1, if yes, what object should I use in order to retrieve the JSON content? thank you very much.