使用Struts2时jsp的EL表达式不能解释

来源:互联网 发布:淘宝子账号认证步骤 编辑:程序博客网 时间:2024/05/14 10:50

使用Struts时,要保证两方面:

1.web.xml中:

<?xml version="1.0" encoding="UTF-8"?>
<web-app version="2.5"
    xmlns="http://java.sun.com/xml/ns/javaee"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
    http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">

2.设置JSP不要忽略EL表达式:

<%@page isELIgnored="false" %>

原创粉丝点击