(在文件上传下载中遇到的问题)在jsp
中无法识别(获取)${}
中的内容的解决方法
方法一:修改 web.xml
头部
<!DOCTYPE web-app PUBLIC
"-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
"http://java.sun.com/dtd/web-app_2_3.dtd" >
<web-app>
...
</web-app>
修改:
<web-app xmlns="http://xmlns.jcp.org/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee
http://xmlns.jcp.org/xml/ns/javaee/web-app_3_1.xsd"
version="3.1">
...
</web-app>
方法二:在jsp
文件的头部 page
参数中添加 isELIgnored="false"
<%@page isELIgnored="false" %>