本帖最后由 不冬眠的蚂蚁 于 2014-3-25 15:54 编辑
import java.sql.Date;
。。。。。。。。。。。。。。
private Date releaseDate ;
。。。。。。。。。。。
public Date getReleaseDate() {
return releaseDate;
}
public void setReleaseDate(Date releaseDate) {
this.releaseDate = releaseDate;
}
,,,,,,,,,,,,,,,jsp页面
<% java.sql.Date date = new java.sql.Date(new java.util.Date().getTime()); %>
,,,,
<p><br> 发布日期:<input type="text" readonly="readonly" name="releaseDate" value="<%= date %>"></p>
---------------------
可是出错了
Mar 18, 2014 11:22:09 AM org.apache.catalina.core.AprLifecycleListener init
信息: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: C:\Program Files\Java\jdk1.7.0\bin;E:\java\apache-tomcat-6.0.29\bin
Mar 18, 2014 11:22:09 AM org.apache.coyote.http11.Http11Protocol init
信息: Initializing Coyote HTTP/1.1 on http-8080
Mar 18, 2014 11:22:09 AM org.apache.catalina.startup.Catalina load
信息: Initialization processed in 548 ms
Mar 18, 2014 11:22:09 AM org.apache.catalina.core.StandardService start
信息: Starting service Catalina
Mar 18, 2014 11:22:09 AM org.apache.catalina.core.StandardEngine start
信息: Starting Servlet Engine: Apache Tomcat/6.0.29
Mar 18, 2014 11:22:09 AM org.apache.catalina.startup.HostConfig deployDescriptor
信息: Deploying configuration descriptor host-manager.xml
Mar 18, 2014 11:22:09 AM org.apache.catalina.startup.HostConfig deployDescriptor
信息: Deploying configuration descriptor manager.xml
Mar 18, 2014 11:22:09 AM org.apache.catalina.startup.HostConfig deployDirectory
信息: Deploying web application directory docs
Mar 18, 2014 11:22:09 AM org.apache.catalina.startup.HostConfig deployDirectory
信息: Deploying web application directory examples
Mar 18, 2014 11:22:09 AM org.apache.catalina.core.ApplicationContext log
信息: ContextListener: contextInitialized()
Mar 18, 2014 11:22:09 AM org.apache.catalina.core.ApplicationContext log
Mar 18, 2014 11:22:11 AM org.apache.coyote.http11.Http11Protocol start
信息: Starting Coyote HTTP/1.1 on http-8080
Mar 18, 2014 11:22:11 AM org.apache.jk.common.ChannelSocket init
信息: JK: ajp13 listening on /0.0.0.0:8009
Mar 18, 2014 11:22:11 AM org.apache.jk.server.JkMain start
信息: Jk running ID=0 time=0/28 config=null
Mar 18, 2014 11:22:11 AM org.apache.catalina.startup.Catalina start
信息: Server startup in 2465 ms
log4j:WARN No appenders could be found for logger (org.hibernate.cfg.Environment).
log4j:WARN Please initialize the log4j system properly.
Hibernate: select user0_.id as id1_, user0_.username as username1_, user0_.password as password1_ from user user0_ where user0_.username=?
Hibernate: select news0_.id as id2_, news0_.title as title2_, news0_.content as content2_, news0_.releaseDate as releaseD4_2_, news0_.userID as userID2_, news0_.newsTypeID as newsTypeID2_ from news news0_ limit ?
Hibernate: select user0_.id as id1_, user0_.username as username1_, user0_.password as password1_ from user user0_ where user0_.id=?
Hibernate: select newstype0_.id as id3_, newstype0_.typeName as typeName3_ from newsType newstype0_ where newstype0_.id=?
Hibernate: select news0_.id as id2_, news0_.title as title2_, news0_.content as content2_, news0_.releaseDate as releaseD4_2_, news0_.userID as userID2_, news0_.newsTypeID as newsTypeID2_ from news news0_
Hibernate: select news0_.id as id2_, news0_.title as title2_, news0_.content as content2_, news0_.releaseDate as releaseD4_2_, news0_.userID as userID2_, news0_.newsTypeID as newsTypeID2_ from news news0_ where news0_.id=?
Hibernate: select user0_.id as id1_, user0_.username as username1_, user0_.password as password1_ from user user0_ where user0_.id=?
Hibernate: select newstype0_.id as id3_, newstype0_.typeName as typeName3_ from newsType newstype0_ where newstype0_.id=?
Hibernate: select user0_.id as id1_, user0_.username as username1_, user0_.password as password1_ from user user0_
Hibernate: select newstype0_.id as id3_, newstype0_.typeName as typeName3_ from newsType newstype0_
Mar 18, 2014 11:22:44 AM com.opensymphony.xwork2.util.logging.jdk.JdkLogger warn
警告: Error setting expression 'releaseDate' with value '[Ljava.lang.String;@10d941c'
ognl.MethodFailedException: Method "setReleaseDate" failed for object com.data.action.NewsAction@147a6a4 [java.lang.NoSuchMethodException: com.data.action.NewsAction.setReleaseDate([Ljava.lang.String;)]
at ognl.OgnlRuntime.callAppropriateMethod(OgnlRuntime.java:1285)
at ognl.OgnlRuntime.setMethodValue(OgnlRuntime.java:1474)
at ognl.ObjectPropertyAccessor.setPossibleProperty(ObjectPropertyAccessor.java:85)
at ognl.ObjectPropertyAccessor.setProperty(ObjectPropertyAccessor.java:162)
at com.opensymphony.xwork2.ognl.accessor.ObjectAccessor.setProperty(ObjectAccessor.java:27)
at ognl.OgnlRuntime.setProperty(OgnlRuntime.java:2245)
at com.opensymphony.xwork2.ognl.accessor.CompoundRootAccessor.setProperty(CompoundRootAccessor.java:77)
at ognl.OgnlRuntime.setProperty(OgnlRuntime.java:2245)
at ognl.ASTProperty.setValueBody(ASTProperty.java:127)
at ognl.SimpleNode.evaluateSetValueBody(SimpleNode.java:220)
at ognl.SimpleNode.setValue(SimpleNode.java:301)
at ognl.Ognl.setValue(Ognl.java:737)
at com.opensymphony.xwork2.ognl.OgnlUtil.setValue(OgnlUtil.java:209)
at com.opensymphony.xwork2.ognl.OgnlValueStack.trySetValue(OgnlValueStack.java:173)
at com.opensymphony.xwork2.ognl.OgnlValueStack.setValue(OgnlValueStack.java:160)
at com.opensymphony.xwork2.ognl.OgnlValueStack.setValue(OgnlValueStack.java:151)
at com.opensymphony.xwork2.interceptor.ParametersInterceptor.setParameters(ParametersInterceptor.java:288)
at com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept(ParametersInterceptor.java:199)
at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98)
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248)
at com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept(ParametersInterceptor.java:207)
at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98)
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248)
at com.opensymphony.xwork2.interceptor.StaticParametersInterceptor.intercept(StaticParametersInterceptor.java:190)
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248)
at org.apache.struts2.interceptor.MultiselectInterceptor.intercept(MultiselectInterceptor.java:75)
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248)
at org.apache.struts2.interceptor.CheckboxInterceptor.intercept(CheckboxInterceptor.java:94)
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248)
at org.apache.struts2.interceptor.FileUploadInterceptor.intercept(FileUploadInterceptor.java:243)
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248)
at org.apache.struts2.interceptor.ServletConfigInterceptor.intercept(ServletConfigInterceptor.java:164)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:857)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
at java.lang.Thread.run(Thread.java:722)
Caused by: java.lang.NoSuchMethodException: com.data.action.NewsAction.setReleaseDate([Ljava.lang.String;)
at ognl.OgnlRuntime.callAppropriateMethod(OgnlRuntime.java:1226)
... 64 more
/-- Encapsulated exception ------------\
java.lang.NoSuchMethodException: com.data.action.NewsAction.setReleaseDate([Ljava.lang.String;)
at ognl.OgnlRuntime.callAppropriateMethod(OgnlRuntime.java:1226)
at ognl.OgnlRuntime.setMethodValue(OgnlRuntime.java:1474)
at ognl.ObjectPropertyAccessor.setPossibleProperty(ObjectPropertyAccessor.java:85)
at ognl.ObjectPropertyAccessor.setProperty(ObjectPropertyAccessor.java:162)
at com.opensymphony.xwork2.ognl.accessor.ObjectAccessor.setProperty(ObjectAccessor.java:27)
毕业设计卡主了 。。。。求大神帮帮看看呢
|