本来是datetimepicker错误后来Google了一下,应该是struts2中应该添加struts2-dojo-plugin-2.3.15.2.jar包,添加之后的代码是:
<%@ page language="java" pageEncoding="utf-8"%>
<%@ taglib uri="/struts-tags" prefix="s"%>
<%@ taglib uri="/struts-dojo-tags" prefix="sx"%>
<html>
<head>
<s:head />
<sx:head extraLocales="UTF-8" />
</head>
<body>
<h3>
添加学生信息
</h3>
<s:form action="save" method="post" theme="simple">
<table>
<tr>
<td>
学号:
</td>
<td>
<s:textfield name="xs.xh"></s:textfield>
</td>
</tr>
<tr>
<td>
姓名:
</td>
<td>
<s:textfield name="xs.xm"></s:textfield>
</td>
</tr>
<tr>
<td>
性别:
</td>
<td>
<s:radio name="xs.xb" list="#{1:'男',2:'女'}" value="1"></s:radio>
</td>
</tr>
<tr>
<td>
专业:
</td>
<td>
<s:textfield name="xs.zy" label="专业"></s:textfield>
</td>
</tr>
<tr>
<td width="70">
出生时间:
</td>
<td>
<sx:datetimepicker name="xs.cssj" id="cssj"
displayFormat="yyyy-MM-dd" language="UTF-8"></sx:datetimepicker>
</td>
</tr>
<tr>
<td>
备注:
</td>
<td>
<s:textarea name="xs.bz" label="备注"></s:textarea>
</td>
</tr>
<tr>
<td>
<s:submit value="添加"></s:submit>
</td>
<td>
<s:reset value="重置"></s:reset>
</td>
</tr>
</table>
</s:form>
<s:fielderror fieldName="xs.xh" />
<s:fielderror />
</body>
</html>
报错如下: HTTP Status 500 - An exception occurred processing JSP page /stu.jsp at line 6
谢谢你的回答,另外,感觉Java web的一些错误个人感觉好难排查,一般都是Google之后才知道原因。如上面所列的错误中,看了一下root case,是The Struts dispatcher cannot be found. This is usually caused by using Struts tags without the associated filter.请问,有什么方法快速排查这些问题呢?谢谢
1.请问你这个问题解决了没有呢
2.without filter,可能是你的web.xml没有设置.jsp文件的filter吧