我的EL表达式在jsp中写的${username} ,
然而不给力的是在页面上显示的也是${username},
这就很烦,但是经过在各大社区的询问之下终于找到了问题的所在之处,
在jsp中添加
<%@ page isELIgnored="false" %>
之前的各种尝试:
maven中导包:
<!-- https://mvnrepository.com/artifact/taglibs/standard -->
<dependency>
<groupId>taglibs</groupId>
<artifactId>standard</artifactId>
<version>1.1.2</version>
</dependency>
<!-- https://mvnrepository.com/artifact/javax.servlet/jstl -->
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>jstl</artifactId>
<version>1.2</version>
</dependency>
这招行不通;
页面中的各种尝试可结果还是行不通;
从图中可以看出C已经成功导入;
各种想象,绞尽脑汁还是灭有想出来,
最后在大佬的精心指点下才发现EL表达式被默认关闭了
这个是个比较坑的举动,可以在web.xml中配置
详情请查看链接跳转:
点击打开链接 https://www.cnblogs.com/mlloc-clove/p/3550498.html
<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>
在jsp中配置也行如下:
<%@ page isELIgnored="false" %>