0

在我发现的控制台中加载jsp时出现问题:

原因:javax.servlet.ServletException:java.lang.NoClassDefFoundError:无法初始化类 org.apache.struts2.dojo.components.DateTimePicker

原因:java.lang.NoClassDefFoundError:无法初始化类 org.apache.struts2.dojo.components.DateTimePicker

我的jsp似乎:

<% @ Page language = "java"%> 
<% @ taglib prefix = "s" uri = "/ struts-tags"%> 
<% @ taglib prefix = "sx" uri = "/ struts-dojo-tags"% >

<html>
 <head>
  <title> <s:text name="app.title"/> </ title>
  <sx:head/>
 </head>
 <body> 
  .... 
  <sx: datetimepicker name = "formation.date" label = "format (yyyy-MM-dd)" 
       DisplayFormat = "yyyy-MM-dd" /> 
  .... 
 </body> 

我把 struts2-dojo-plugin-2.1.6.jar 放在 WEB-INF/lib 谢谢你的帮助

4

1 回答 1

0

You have given space between sx: and datetimepicker . Remove the space and try once again

Also You have given format as

DisplayFormat = "yyyy-MM-dd"

change it to

displayFormat = "yyyy-MM-dd"
于 2014-01-21T06:50:23.993 回答