JSP EL表达式忽略方法
2015-10-20 12:23
465 查看
JSP EL表达式忽略方法:
web.xml中,和jsp中;jsp中的等级要高一些;
web.xml:
jsp:
web.xml中,和jsp中;jsp中的等级要高一些;
web.xml:
<?xml version="1.0" encoding="UTF-8"?> <web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd" id="WebApp_ID" version="3.0"> <display-name>TestBootWeb</display-name> <jsp-config> <jsp-property-group> <url-pattern>*.jsp</url-pattern> <el-ignored>false</el-ignored> </jsp-property-group> </jsp-config> <welcome-file-list> <welcome-file>index.jsp</welcome-file> </welcome-file-list> </web-app>
jsp:
<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%> <%@ page isELIgnored="true"%> <% String path = request.getContextPath(); String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort() + path + "/"; pageContext.setAttribute("pca", "pageContextAttribute"); %> <!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title>008index</title> </head> <body> EL result is : <p>${pageScope.pca }</p> </body> </html>
相关文章推荐
- JSP中param标签用法实例分析
- JSP实现的简单分页示例
- 【jstl&el】jstl和EL的区别和使用
- js 模块化历程
- js 模块化历程
- 百度分享js代码
- JSON格式字符串解析方法
- js调试工具查看dom元素上绑定的事件列表
- Extjs之DateField控件的鼠标点击选取事件监控
- js 获取元素内部文本
- js刷新验证码(.net)
- 说说JSON和JSONP,也许你会豁然开朗
- javascript事件有哪些?javascript的监听事件
- js调试系列
- C++、Java、JavaScript中的正则表达式
- Placeholdem文本域占位符符号标识JavaScript插件
- javascript阻止事件冒泡的兼容写法及其相关示例
- Knockoutjs快速入门
- JS判断元素文本值是否为空
- json-c库使用总结