jsp中的页面范围 [英] Page scope- scope in jsp

查看:144
本文介绍了jsp中的页面范围的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

jsp中有以下范围:

There are following scopes in jsp:

页面范围

请求范围

会话范围


申请范围。

and application scope.

I我对页面范围感到困惑。谁能告诉我这个页面范围是什么?我没有在任何地方找到明确的定义。

I am confused about page scope. Can anybody tell me what is this page scope? I have not found its clear definition anywhere.

推荐答案

page 范围意味着,它可以被认为是代表整个JSP页面的对象,即JSP对象只能在创建它的同一页面中访问。

页面对象实际上是这个对象的直接同义词。

注意

page scope means, it can be thought of as an object that represents the entire JSP page,i.e. the JSP object can be accessed only from within the same page where it was created.
The page object is really a direct synonym for the this object.
Note:


页面之间的主要区别范围和请求范围(通常令人困惑)是,如果请求被转发到另一个JSP页面,并且请求范围属性可用,那么页面范围属性将不再可用。

The main difference between page scope and request scope(often confusing ) is that page scope attributes are no longer available if the request is forwarded to another JSP page where as request scope attributes are available.

这篇关于jsp中的页面范围的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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