如何在JSP中检索内容/文件? [英] How to retrieve the content/file in JSP?

查看:115
本文介绍了如何在JSP中检索内容/文件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我对JSP有疑问.我的服务器中有一个JSON文件,内容如下:

I have a question about the JSP. I have a JSON file in the server and the content is like the following:

{ "class":
    {
        "number": 2,
        "student": 
        {
        "name": "Tom",
        "age": 1
        },
        "student": 
        {
        "name": "May",
        "age": 2
        }
    }
}  

当我键入URL(例如1.1.1.1)时,它将显示如上的内容.

when I type the URL (e.g. 1.1.1.1), it will display the content like the above.

并且,在我的JSP页面中,我已调用此url以显示JSON内容.但是,我不知道使用WHAT对象/或类来调用和检索文件.

And, in my JSP page, I have call this url in order to display the JSON content. However, I don't know use WHAT object/or class to call and retrieve the file.

JSP/Java是否提供某些类?谁能帮我?谢谢.

Does the JSP/Java provide some classes do that? Can anyone help me? Thank you.

推荐答案

您可以使用 此处是该示例一样

这篇关于如何在JSP中检索内容/文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆