> I assume you are referring to the fileupload package at Jakarta.
> http://commons.apache.org/fileupload/apidocs/org/apache/common
> s/fileuplo
> ad/FileUploadBase.html#setSizeMax(long)
> 
> You should be able to use this in Resin also.

Yes, indeed I am using exactly that library with Resin.  The problem is
Resin throws this error:

[08:55:49.675]doStartTag(): IOException:
com.caucho.server.dispatch.BadRequestException: POST requires content-length
[08:55:49.675]  at
com.caucho.server.http.HttpRequest.initStream(HttpRequest.java:1141)
[08:55:49.675]  at
com.caucho.server.connection.AbstractHttpRequest.getStream(AbstractHttpReque
st.java:1758)
[08:55:49.675]  at
com.caucho.server.connection.AbstractHttpRequest.getInputStream(AbstractHttp
Request.java:1823)
[08:55:49.675]  at
com.caucho.server.connection.RequestWrapper.getInputStream(RequestWrapper.ja
va:234)
[08:55:49.675]  at
com.caucho.server.webapp.DispatchRequest.getInputStream(DispatchRequest.java
:391)
[08:55:49.675]  at
org.apache.commons.fileupload.servlet.ServletRequestContext.getInputStream(S
ervletRequestContext.java:93)
[08:55:49.675]  at
org.apache.commons.fileupload.FileUploadBase$FileItemIteratorImpl.<init>(Fil
eUploadBase.java:777)
[08:55:49.675]  at
org.apache.commons.fileupload.FileUploadBase.getItemIterator(FileUploadBase.
java:323)
[08:55:49.675]  at
org.apache.commons.fileupload.servlet.ServletFileUpload.getItemIterator(Serv
letFileUpload.java:148)
[08:55:49.675]  at
com.layerz.tags.upload.ForEachParameterTag.doStartTag(ForEachParameterTag.ja
va:35)
[08:55:49.675]  at
_jsp._api._transfer._lib._getFormFields__jsp._jspService(_getFormFields__jsp
.java:46)
[08:55:49.675]  at com.caucho.jsp.JavaPage.service(JavaPage.java:60)
[08:55:49.675]  at com.caucho.jsp.Page.pageservice(Page.java:570)
[08:55:49.675]  at
com.caucho.server.dispatch.PageFilterChain.doFilter(PageFilterChain.java:179
)
[08:55:49.675]  at
com.caucho.server.webapp.DispatchFilterChain.doFilter(DispatchFilterChain.ja
va:115)
[08:55:49.675]  at
com.caucho.server.cache.CacheFilterChain.doFilter(CacheFilterChain.java:188)
[08:55:49.675]  at
com.caucho.server.dispatch.ServletInvocation.service(ServletInvocation.java:
229)
[08:55:49.675]  at
com.caucho.server.webapp.RequestDispatcherImpl.include(RequestDispatcherImpl
.java:485)
[08:55:49.675]  at
com.caucho.server.webapp.RequestDispatcherImpl.include(RequestDispatcherImpl
.java:350)
[08:55:49.675]  at
com.caucho.jsp.PageContextImpl.include(PageContextImpl.java:927)
[08:55:49.675]  at
_jsp._api._transfer._personal__jsp._jspService(_personal__jsp.java:65)
[08:55:49.675]  at com.caucho.jsp.JavaPage.service(JavaPage.java:60)
[08:55:49.675]  at com.caucho.jsp.Page.pageservice(Page.java:570)
[08:55:49.675]  at
com.caucho.server.dispatch.PageFilterChain.doFilter(PageFilterChain.java:179
)
[08:55:49.675]  at
com.layerz.filters.RewriteFilter.doFilter(RewriteFilter.java:127)
[08:55:49.675]  at
com.caucho.server.dispatch.FilterFilterChain.doFilter(FilterFilterChain.java
:70)
[08:55:49.675]  at
com.caucho.server.cache.CacheFilterChain.doFilter(CacheFilterChain.java:188)
[08:55:49.675]  at
com.caucho.server.webapp.WebAppFilterChain.doFilter(WebAppFilterChain.java:1
73)
[08:55:49.675]  at
com.caucho.server.dispatch.ServletInvocation.service(ServletInvocation.java:
229)
[08:55:49.675]  at
com.caucho.server.http.HttpRequest.handleRequest(HttpRequest.java:274)
[08:55:49.675]  at
com.caucho.server.port.TcpConnection.run(TcpConnection.java:511)
[08:55:49.675]  at com.caucho.util.ThreadPool.runTasks(ThreadPool.java:520)
[08:55:49.675]  at com.caucho.util.ThreadPool.run(ThreadPool.java:442)
[08:55:49.675]  at java.lang.Thread.run(Thread.java:595)

I am dumping the content-length just prior to that exception being thrown
and it is indeed there.   That's when I d/l'ed the caucho source and
realized that its maiming the content-length because the content-length is >
2GB.  Depending on _how much_ bigger you can get two different types of
results (i.e. does the truncated content-length return a positive number
after truncation or a negative number).

At any rate it seems the new limitation is now the servlet container.  Maybe
there is a feature within that FileUpload package that would get me by this
and I am overlooking it?

Aaron Freeman



_______________________________________________
resin-interest mailing list
resin-interest@caucho.com
http://maillist.caucho.com/mailman/listinfo/resin-interest

Reply via email to