主题: 在struts2中使用Action实现kindeditor的文件管理功能怎么做?
作者: sky_xl, 发布日期: 2012-08-21 17:41:25, 浏览数: 5444

有没有童鞋用struts2的action实现过file_manager_json.jsp这个文件的功能?

  对于struts2中用action实现fileuploadupload_json.jsp这个文件的功能,到是没什么问题。

但是在实现文件管理file_manager_json.jsp的功能时,虽说能够实现预期的功能,但是在浏览服务器文件时,后台报异常。报异常时,文件浏览是可以使用的。  纠结啊,有没有解决的啊。。。求分享。

2012-8-21 17:39:48 com.opensymphony.xwork2.util.logging.jdk.JdkLogger warn
警告: Error setting value
java.lang.NumberFormatException: For input string: "1345541988131"
	at java.lang.NumberFormatException.forInputString(NumberFormatException.java:48)
	at java.lang.Integer.parseInt(Integer.java:459)
	at java.lang.Integer.valueOf(Integer.java:526)
	at ognl.OgnlParserTokenManager.makeInt(OgnlParserTokenManager.java:63)
	at ognl.OgnlParserTokenManager.TokenLexicalActions(OgnlParserTokenManager.java:1624)
	at ognl.OgnlParserTokenManager.getNextToken(OgnlParserTokenManager.java:1498)
	at ognl.OgnlParser.jj_ntk(OgnlParser.java:3099)
	at ognl.OgnlParser.unaryExpression(OgnlParser.java:1079)
	at ognl.OgnlParser.multiplicativeExpression(OgnlParser.java:971)
	at ognl.OgnlParser.additiveExpression(OgnlParser.java:894)
	at ognl.OgnlParser.shiftExpression(OgnlParser.java:750)
	at ognl.OgnlParser.relationalExpression(OgnlParser.java:508)
	at ognl.OgnlParser.equalityExpression(OgnlParser.java:405)
	at ognl.OgnlParser.andExpression(OgnlParser.java:352)
	at ognl.OgnlParser.exclusiveOrExpression(OgnlParser.java:299)
	at ognl.OgnlParser.inclusiveOrExpression(OgnlParser.java:246)
	at ognl.OgnlParser.logicalAndExpression(OgnlParser.java:193)
	at ognl.OgnlParser.logicalOrExpression(OgnlParser.java:140)
	at ognl.OgnlParser.conditionalTestExpression(OgnlParser.java:101)
	at ognl.OgnlParser.assignmentExpression(OgnlParser.java:64)
	at ognl.OgnlParser.expression(OgnlParser.java:23)
	at ognl.OgnlParser.topLevelExpression(OgnlParser.java:15)
	at ognl.Ognl.parseExpression(Ognl.java:110)
	at com.opensymphony.xwork2.ognl.OgnlUtil.compile(OgnlUtil.java:225)
	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 com.opensymphony.xwork2.interceptor.ModelDrivenInterceptor.intercept(ModelDrivenInterceptor.java:100)
	at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248)
	at com.opensymphony.xwork2.interceptor.ScopedModelDrivenInterceptor.intercept(ScopedModelDrivenInterceptor.java:141)
	at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248)
	at org.apache.struts2.interceptor.debugging.DebuggingInterceptor.intercept(DebuggingInterceptor.java:267)
	at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248)
	at com.opensymphony.xwork2.interceptor.ChainingInterceptor.intercept(ChainingInterceptor.java:142)
	at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248)
	at com.opensymphony.xwork2.interceptor.PrepareInterceptor.doIntercept(PrepareInterceptor.java:166)
	at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98)
	at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248)
	at com.opensymphony.xwork2.interceptor.I18nInterceptor.intercept(I18nInterceptor.java:176)
	at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248)
	at org.apache.struts2.interceptor.ServletConfigInterceptor.intercept(ServletConfigInterceptor.java:164)
	at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248)
	at com.opensymphony.xwork2.interceptor.AliasInterceptor.intercept(AliasInterceptor.java:190)
	at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248)
	at com.opensymphony.xwork2.interceptor.ExceptionMappingInterceptor.intercept(ExceptionMappingInterceptor.java:187)
	at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248)
	at org.apache.struts2.impl.StrutsActionProxy.execute(StrutsActionProxy.java:52)
	at org.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.java:485)
	at org.apache.struts2.dispatcher.ng.ExecuteOperations.executeAction(ExecuteOperations.java:77)
	at org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter.doFilter(StrutsPrepareAndExecuteFilter.java:91)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104)
	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:261)
	at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
	at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:581)
	at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
	at java.lang.Thread.run(Thread.java:619) 
作者: sky_xl, 发布日期: 2012-08-21 17:45:39
数值转化异常,恼火呀,找不到出异常地方啊。
回复
作者: androclus, 发布日期: 2013-04-02 12:33:56
是kindeditor的链接上加了时间戳,从链接传入struts时被识别为integer,因此报错。在filemanage文件里找到时间戳改成字符串传入就行了。
回复
发表新帖 发表回复