問題描述:
報錯信息:
嚴重: Servlet.service() for servlet [aween-item-web] in context with path [] threw exception [javax.servlet.ServletException: javax.servlet.jsp.JspException: In <formatNumber>, value attribute can not be parsed into java.lang.Number: "${item.price}"] with root cause java.lang.NumberFormatException: For input string: "${item.price}"
解決方法:
這個問題經常遇到,問題出在EL表達式被JSP忽略了
<%@ page language=”java” contentType=”text/html; charset=UTF-8” pageEncoding=”UTF-8” isELIgnored=”false” %>
將isELIgbnored設置成false即可,默認爲true