急,求救一个struts2上传问题

时间:2022-08-28 19:57:48
我现在上传的时候,在内网不报错,在外网的时候,就报如下的错,请知道的各位兄弟姐妹,帮帮忙忙,谢谢!
2011-03-21 17:33:20 com.opensymphony.xwork2.util.logging.commons.CommonsLogger.e
rror(CommonsLogger.java:27)
ERROR:  Unable to parse request
org.apache.commons.fileupload.FileUploadException: Read timed out
        at org.apache.commons.fileupload.FileUploadBase.parseRequest(FileUploadB
ase.java:381)
        at org.apache.struts2.dispatcher.multipart.JakartaMultiPartRequest.parse
(JakartaMultiPartRequest.java:93)
        at org.apache.struts2.dispatcher.multipart.MultiPartRequestWrapper.<init
>(MultiPartRequestWrapper.java:75)
        at org.apache.struts2.dispatcher.Dispatcher.wrapRequest(Dispatcher.java:
663)
        at org.apache.struts2.dispatcher.FilterDispatcher.prepareDispatcherAndWr
apRequest(FilterDispatcher.java:327)
        at org.apache.struts2.dispatcher.FilterDispatcher.doFilter(FilterDispatc
her.java:367)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl
icationFilterChain.java:235)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF
ilterChain.java:206)
        at com.ultrapower.accredit.common.P3PURLFilter.doFilter(P3PURLFilter.jav
a:87)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl
icationFilterChain.java:235)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF
ilterChain.java:206)
        at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperV
alve.java:233)
        at org.apache.catalina.core.StandardContextValve.invoke(StandardContextV
alve.java:191)
        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.j
ava:128)
        at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.j
ava:102)
        at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineVal
ve.java:109)
        at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.jav
a:286)
        at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java
:845)
        at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.proce
ss(Http11Protocol.java:583)
        at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:44
7)
        at java.lang.Thread.run(Thread.java:619)
Caused by: java.net.SocketTimeoutException: Read timed out
        at java.net.SocketInputStream.socketRead0(Native Method)
        at java.net.SocketInputStream.read(SocketInputStream.java:129)
        at org.apache.coyote.http11.InternalInputBuffer.fill(InternalInputBuffer
.java:746)
        at org.apache.coyote.http11.InternalInputBuffer$InputStreamInputBuffer.d
oRead(InternalInputBuffer.java:776)
        at org.apache.coyote.http11.filters.IdentityInputFilter.doRead(IdentityI
nputFilter.java:116)
        at org.apache.coyote.http11.InternalInputBuffer.doRead(InternalInputBuff
er.java:705)
        at org.apache.coyote.Request.doRead(Request.java:428)
        at org.apache.catalina.connector.InputBuffer.realReadBytes(InputBuffer.j
ava:304)
        at org.apache.tomcat.util.buf.ByteChunk.substract(ByteChunk.java:405)
        at org.apache.catalina.connector.InputBuffer.read(InputBuffer.java:327)
        at org.apache.catalina.connector.CoyoteInputStream.read(CoyoteInputStrea
m.java:193)
        at org.apache.commons.fileupload.MultipartStream$ItemInputStream.makeAva
ilable(MultipartStream.java:977)
        at org.apache.commons.fileupload.MultipartStream$ItemInputStream.read(Mu
ltipartStream.java:887)
        at java.io.InputStream.read(InputStream.java:85)
        at org.apache.commons.fileupload.util.Streams.copy(Streams.java:94)
        at org.apache.commons.fileupload.util.Streams.copy(Streams.java:64)
        at org.apache.commons.fileupload.MultipartStream.readBodyData(MultipartS
tream.java:593)
        at org.apache.commons.fileupload.MultipartStream.discardBodyData(Multipa
rtStream.java:619)
        at org.apache.commons.fileupload.MultipartStream.skipPreamble(MultipartS
tream.java:638)
        at org.apache.commons.fileupload.FileUploadBase$FileItemIteratorImpl.fin
dNextItem(FileUploadBase.java:961)
        at org.apache.commons.fileupload.FileUploadBase$FileItemIteratorImpl.<in
it>(FileUploadBase.java:942)
        at org.apache.commons.fileupload.FileUploadBase.getItemIterator(FileUplo
adBase.java:331)
        at org.apache.commons.fileupload.FileUploadBase.parseRequest(FileUploadB
ase.java:349)
        ... 20 more
Caused by:
java.net.SocketTimeoutException: Read timed out
        at java.net.SocketInputStream.socketRead0(Native Method)
        at java.net.SocketInputStream.read(SocketInputStream.java:129)
        at org.apache.coyote.http11.InternalInputBuffer.fill(InternalInputBuffer
.java:746)
        at org.apache.coyote.http11.InternalInputBuffer$InputStreamInputBuffer.d
oRead(InternalInputBuffer.java:776)
        at org.apache.coyote.http11.filters.IdentityInputFilter.doRead(IdentityI
nputFilter.java:116)
        at org.apache.coyote.http11.InternalInputBuffer.doRead(InternalInputBuff
er.java:705)
        at org.apache.coyote.Request.doRead(Request.java:428)
        at org.apache.catalina.connector.InputBuffer.realReadBytes(InputBuffer.j
ava:304)
        at org.apache.tomcat.util.buf.ByteChunk.substract(ByteChunk.java:405)
        at org.apache.catalina.connector.InputBuffer.read(InputBuffer.java:327)
        at org.apache.catalina.connector.CoyoteInputStream.read(CoyoteInputStrea
m.java:193)
        at org.apache.commons.fileupload.MultipartStream$ItemInputStream.makeAva
ilable(MultipartStream.java:977)
        at org.apache.commons.fileupload.MultipartStream$ItemInputStream.read(Mu
ltipartStream.java:887)
        at java.io.InputStream.read(InputStream.java:85)
        at org.apache.commons.fileupload.util.Streams.copy(Streams.java:94)
        at org.apache.commons.fileupload.util.Streams.copy(Streams.java:64)
        at org.apache.commons.fileupload.MultipartStream.readBodyData(MultipartS
tream.java:593)
        at org.apache.commons.fileupload.MultipartStream.discardBodyData(Multipa
rtStream.java:619)
        at org.apache.commons.fileupload.MultipartStream.skipPreamble(MultipartS
tream.java:638)
        at org.apache.commons.fileupload.FileUploadBase$FileItemIteratorImpl.fin
dNextItem(FileUploadBase.java:961)
        at org.apache.commons.fileupload.FileUploadBase$FileItemIteratorImpl.<in
it>(FileUploadBase.java:942)
        at org.apache.commons.fileupload.FileUploadBase.getItemIterator(FileUplo
adBase.java:331)
        at org.apache.commons.fileupload.FileUploadBase.parseRequest(FileUploadB
ase.java:349)
        at org.apache.struts2.dispatcher.multipart.JakartaMultiPartRequest.parse
(JakartaMultiPartRequest.java:93)
        at org.apache.struts2.dispatcher.multipart.MultiPartRequestWrapper.<init
>(MultiPartRequestWrapper.java:75)
        at org.apache.struts2.dispatcher.Dispatcher.wrapRequest(Dispatcher.java:
663)
        at org.apache.struts2.dispatcher.FilterDispatcher.prepareDispatcherAndWr
apRequest(FilterDispatcher.java:327)
        at org.apache.struts2.dispatcher.FilterDispatcher.doFilter(FilterDispatc
her.java:367)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl
icationFilterChain.java:235)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF
ilterChain.java:206)
        at com.ultrapower.accredit.common.P3PURLFilter.doFilter(P3PURLFilter.jav
a:87)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl
icationFilterChain.java:235)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF
ilterChain.java:206)
        at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperV
alve.java:233)
        at org.apache.catalina.core.StandardContextValve.invoke(StandardContextV
alve.java:191)
        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.j
ava:128)
        at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.j
ava:102)
        at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineVal
ve.java:109)
        at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.jav
a:286)
        at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java
:845)
        at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.proce
ss(Http11Protocol.java:583)
        at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:44
7)
        at java.lang.Thread.run(Thread.java:619)
2011-03-21 17:33:21 com.opensymphony.xwork2.util.logging.commons.CommonsLogger.e
rror(CommonsLogger.java:23)
ERROR:  Read timed out
2011-03-21 17:33:21 com.opensymphony.xwork2.util.logging.commons.CommonsLogger.w
arn(CommonsLogger.java:49)
WARN :  Could not find action or result
No result defined for action com.ultrapower.gcdata.webapp.fact.action.FileImpAct
ion and result input
        at com.opensymphony.xwork2.DefaultActionInvocation.executeResult(Default
ActionInvocation.java:363)
        at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionI
nvocation.java:265)
        at com.opensymphony.xwork2.validator.ValidationInterceptor.doIntercept(V

2 个解决方案

#1


没遇到过。。你的意思你内网可以上传?

#2


这个有可能是你在内网上传的时候文件会保存到一个文件夹里, 但是在外网的时候就可能是找不到这个文件夹,就会报错,我以前就是遇到过这种错误,我不知道你的是不是这样的, 你检查一下看看,希望对你有好处……

#1


没遇到过。。你的意思你内网可以上传?

#2


这个有可能是你在内网上传的时候文件会保存到一个文件夹里, 但是在外网的时候就可能是找不到这个文件夹,就会报错,我以前就是遇到过这种错误,我不知道你的是不是这样的, 你检查一下看看,希望对你有好处……