jsp中b / w pageContext和session隐式对象的主要区别是什么。 [英] What is the main difference b/w pageContext and session implicit objects in jsp.

查看:141
本文介绍了jsp中b / w pageContext和session隐式对象的主要区别是什么。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

请举例说明。

推荐答案

Hello Shruthi,



PageContext 用于存储和检索与页面相关的信息,并在同一翻译单元和同一请求中共享对象。它还用作维护所有其他隐式对象的表的便捷类。例如
Hello Shrut

PageContext is used for storing and retrieving page-related information and sharing objects within the same translation unit and same request. It is also used as a convenience class that maintains a table of all the other implicit objects. For example
try { 
    ... 
    application = pageContext.getServletContext();
    config = pageContext.getServletConfig();
    session = pageContext.getSession();
    out = pageContext.getOut(); 
    ... 
} catch (Throwable t) {
    ... 
}



另一方面,会话提供了一种方法,可以跨多个页面请求识别用户或访问网站并存储有关该用户的信息。



PageContext是为处理页面(请求)而设置的,与会话相比是短暂的。



问候,


The Session on the other hand provides a way to identify a user across more than one page request or visit to a Web site and to store information about that user.

The PageContext is provisioned for the scope of processing a page (Request) and is short lived compared to a session.

Regards,


看看这可能会对你有所帮助



http://www.xyzws.com/JSPfaq/what-is-difference -page-and-pagecontext-in-jsp-pages / 4 [ ^ ]
Have a look on this it may help you

http://www.xyzws.com/JSPfaq/what-is-difference-between-page-and-pagecontext-in-jsp-pages/4[^]


这篇关于jsp中b / w pageContext和session隐式对象的主要区别是什么。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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