JSTL的新手,并试图在JSTL中小写变量。我试过这个
<c:set value="${fn:toLowerCase(confirmedStatus)}" />
并添加了taglib
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
其中confirmedStatus是枚举变量。
这是错误
Caused by: javax.servlet.jsp.JspTagException
at org.apache.taglibs.standard.tag.common.core.SetSupport.doEndTag(SetSupport.java:245)
at org.apache.jsp.WEB_002dINF.views.tiles.clientOrder_jsp._jspx_meth_c_set_0(clientOrder_jsp.java:599)
at org.apache.jsp.WEB_002dINF.views.tiles.clientOrder_jsp._jspx_meth_c_when_1(clientOrder_jsp.java:561)
at org.apache.jsp.WEB_002dINF.views.tiles.clientOrder_jsp._jspx_meth_c_choose_1(clientOrder_jsp.java:516)
at org.apache.jsp.WEB_002dINF.views.tiles.clientOrder_jsp._jspx_meth_c_when_0(clientOrder_jsp.java:486)
at org.apache.jsp.WEB_002dINF.views.tiles.clientOrder_jsp._jspx_meth_c_choose_0(clientOrder_jsp.java:452)
at org.apache.jsp.WEB_002dINF.views.tiles.clientOrder_jsp._jspx_meth_c_forEach_0(clientOrder_jsp.java:389)
at org.apache.jsp.WEB_002dINF.views.tiles.clientOrder_jsp._jspService(clientOrder_jsp.java:154)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:111)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:847)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:403)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:492)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:378)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:847)
at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:558)
at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:489)
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:119)
at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:520)
at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:233)
at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:972)
at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:417)
at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:192)
at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:906)
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:117)
at org.eclipse.jetty.server.Dispatcher.include(Dispatcher.java:178)
at org.apache.jasper.runtime.JspRuntimeLibrary.include(JspRuntimeLibrary.java:1015)
at org.apache.jasper.runtime.PageContextImpl.include(PageContextImpl.java:700)
at org.apache.tiles.jsp.context.JspTilesRequestContext.include(JspTilesRequestContext.java:103)
答案 0 :(得分:4)
您的<c:set>
缺少var
属性,否则您要设置什么?
<c:set var="myvar" value="${fn:toLowerCase(confirmedStatus)}" />