文档下载 文档下载导航
设为首页 | 加入收藏
搜索 请输入内容:  
 导航当前位置: 文档下载 > 所有分类 > IT/计算机 > context-param与init-param的区别与作用
侵权投诉

context-param与init-param的区别与作用

<res-auth>Container</res-auth>

</resource-ref>

11、jsp-config

<jsp-config> 包括<taglib> 和<jsp-property-group> 两个子元素。

其中<taglib>元素在JSP 1.2时就已经存在;而<jsp-property-group>是JSP 2.0 新增的元素。 <jsp-property-group>元素主要有八个子元素,它们分别为:

1).<description>:设定的说明;

2).<display-name>:设定名称;

3).<url-pattern>:设定值所影响的范围,如:/CH2 或 /*.jsp;

4).<el-ignored>:若为true,表示不支持EL 语法;

5).<scripting-invalid>:若为true,表示不支持<% scripting %>语法;

6).<page-encoding>:设定JSP 网页的编码;

7).<include-prelude>:设置JSP 网页的抬头,扩展名为.jspf;

8).<include-coda>:设置JSP 网页的结尾,扩展名为.jspf。

一个简单的<jsp-config>元素完整配置:

<jsp-config>

<taglib>

<taglib-uri>Taglib</taglib-uri>

<taglib-location>/WEB-INF/tlds/MyTaglib.tld</taglib-location>

</taglib>

<jsp-property-group>

<description>Special property group for JSP Configuration JSP example.</description> <display-name>JSPConfiguration</display-name>

<url-pattern>/jsp/* </url-pattern>

<el-ignored>true</el-ignored>

<page-encoding>GB2312</page-encoding>

<scripting-invalid>true</scripting-invalid>

<include-prelude>/include/prelude.jspf</include-prelude>

<include-coda>/include/coda.jspf</include-coda>

</jsp-property-group>

</jsp-config>

配置web.xml来限制对某些servlet的请求

上一页第11页

你可能喜欢

热门文档

相关文档

  • web.xml中的参数context-param和init-param区别

    web.xml中的参数context-param和init-param区别_IT/计算机_专业资料。web.xml...web.xml 中的参数 context-param 和 init-param 区别 2010-03-15 09:15:39...

  • ContextLoaderListener监听器与context-prama标记的使用

    监听器与context-prama标记的使用_IT/计算机_专业...ContextLoaderListener 的作用就是启动 Web 容器时,...<context-param> <param-name>contextConfigLocation...

  • init()与service()区别

    init()与service()区别_计算机软件及应用_IT/计算机_专业资料。servlet中init(...context-param与init-pa... 13页 免费 web project和web servi... 5页 免费...

  • web.xml的解析

    的init()方法中通过this.getInitParameter("param1"...ServletContext(); context-param的值 = ...但是他们并不同 <context-param>是application范围内...

  • 企业级java1

    (不同作用域数据的比 较),访问应用程序级初始化参数(context-param 与 init-param 比较),将消息记录到 应用程序日志文件中; Servlet 通信:向浏览器发送错误消息...

  • 答案

    Detached状态和Transient状态的区别在于Detached状态的...()的作用是将数据库与缓存中的数据同步 11题:...<context-param> <param-name>contextConfigLocation...

  • Spring-MVC_v2

    -param> <param-name>contextConfigLocation</param-...视图 视图的作用是渲染模型数据,将模型里的数据以...为逻辑视图名的解析提供了不同的策略,可以在 Spring...

  • Servlet高级篇_IT/计算机_专业资料

    Servlet高级部分 说明我们今天讲的大部分是Servlet比较...init()方法 Init的作用? Init()方法 public void...servletContext 取得初始参数配置: <context-param> ...

  • Servlet

    两者的区别;画图演示,说明道理 Servlet实例 ? 实现...Init的作用? Init()方法 public void init(){ ?...context-param ServletContext对象 ? 与资源相关的...

站点地图 | 文档上传 | 侵权投诉 | 手机版
本站所有资源均来自互联网,本站只负责收集和整理,均不承担任何法律责任,如有侵权等其它行为请联系我们.
文档下载 Copyright 2013 doc.guandang.net All Rights Reserved.  -  email