struts2下载DOC时出错提示:java.lang.ClassCastException: java.io.ByteArrayInputStream
如题:项目用S2SH框时,在ACTION里读取DOC文件,struts.xml配置文件代码如下:
ACTION的代码如下:description The server encountered an internal error () that prevented it from fulfilling this request.exception java.lang.ClassCastException: java.io.ByteArrayInputStreamcom.opensymphony.xwork2.DefaultActionInvocation.invokeAction(DefaultActionInvocation.java:451)com.opensymphony.xwork2.DefaultActionInvocation.invokeActionOnly(DefaultActionInvocation.java:280)com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:243)com.opensymphony.xwork2.interceptor.DefaultWorkflowInterceptor.doIntercept(DefaultWorkflowInterceptor.java:165)com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:87)com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)com.opensymphony.xwork2.validator.ValidationInterceptor.doIntercept(ValidationInterceptor.java:252)org.apache.struts2.interceptor.validation.AnnotationValidationInterceptor.doIntercept(AnnotationValidationInterceptor…………………………
我自己也郁闷一天了,这个功能就是做不出来,而下载为txt文件时就没有问题,请帮忙解决一下,急啊!!!!!
=================================================================================
谢谢各位,问题已经解决了,换了其他的方法来解决项目需要了:)
1 楼 a.mu 2010-09-25 谢谢各位,问题已经解决了,换了其他的方法来解决项目需要了:)
我的异常网推荐解决方案:The server encountered an internal error () that prevented it from fulfilling this request.,http://www.myexception.cn/java-web/317.html