jsp 学习所遇问题汇总
问题一、<jsp:setProperty> 使用所遇问题
严重: Servlet.service() for servlet [jsp] in context with path [/Itcast] threw exception [/ch4/useBeanParam.jsp (line: 12, column: 3) According to TLD, tag jsp:setProperty must be empty, but is not] with root cause org.apache.jasper.JasperException: /ch4/useBeanParam.jsp (line: 12, column: 3) According to TLD, tag jsp:setProperty must be empty, but is not
解决方案:由于之前的代码 <jsp:setProperty name="clock" property="hours" param="hh"> 出错,正确的应为<jsp:setProperty name="clock" property="hours" param="hh"/> 少了斜杠(由于习惯了IDE自带的完成功能导致)。
问题二、