什么是JSP上下文? [英] What is a JSP Context?

查看:241
本文介绍了什么是JSP上下文?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想知道这个java对象究竟是什么,它的主要目的是什么。我已经看过java文档,但是这更混淆了我的意思。()

I was wondering what exactly this java object is and what its main purpose is. I have looked java documentation, but that confuses me more :(.

它有任何关系范围,如会话,请求,应用程序?

Does it have any relation scopes such as session, request, application?

推荐答案

JspContext



The JspContext

JspContext是令人困惑的,因为它似乎没有做任何事情,ServletContext不能做,你是对的,你可以在没有JspContext的情况下生存,这些隐含的变量在你的处理中。

The JspContext is confusing, because it doesn't seem to do anything that the ServletContext can't do. You're right, it doesn't. You can live without the JspContext. The implicit variables are there at your disposal.

主要的好处在于JSP技术不一定绑定到Java是的,你听说JSP是正确的跨平台兼容。

The primary benefit lies in the fact that the JSP technology is not necessarily bound to Java. Yes. You heard that correctly, JSPs are positioned to be cross-platform compatible.

引用 API :

JspContext作为PageContext类的基类,并提取不特定于servlet的所有信息。这允许在请求/响应Servlet的上下文之外使用简单标签扩展。

此抽象允许JSP收集有关其环境的信息(请求,会话和应用范围)以平台中立的方式。

This abstraction allows a JSP to gather information about its environment (request, session and application scope) in a platform-neutral manner.

这篇关于什么是JSP上下文?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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