[appengine-java] Re: Get Multipart Data from the request

2009-09-12 Thread Dhamu

This might help http://code.google.com/p/gmultipart/

On Jul 22, 6:41 pm, "Jason (Google)"  wrote:
> As indicated in the "Will it play in App Engine" page, you will not be able
> to use the "traditional" Apache Commons FileUpload API since it relies on
> java.io.File which is not a supported class. App Engine does not allow
> applications to write to the file system, so the DiskFileItem error thrown
> makes sense. You should be able to use the Streaming API or a custom
> solution like the one in this 
> thread:http://groups.google.com/group/google-appengine-java/browse_thread/th...
>
> - Jason
>
>
>
> On Tue, Jul 21, 2009 at 7:21 AM, sree  wrote:
>
> > How to get multipart data from the request in struts2 action ?
>
> > when a request with multipart data is sent to struts2 action following
> > exception is thrown
>
> > Uncaught exception from servlet
> > java.lang.NoClassDefFoundError: Could not initialize class
> > org.apache.commons.fileupload.disk.DiskFileItem
> >        at org.apache.commons.fileupload.disk.DiskFileItemFactory.createItem
> > (DiskFileItemFactory.java:196)
> >        at org.apache.commons.fileupload.FileUploadBase.parseRequest
> > (FileUploadBase.java:358)
> >        at
> > org.apache.struts2.dispatcher.multipart.JakartaMultiPartRequest.parse
> > (JakartaMultiPartRequest.java:90)
> >        at
> > org.apache.struts2.dispatcher.multipart.MultiPartRequestWrapper.
> > (MultiPartRequestWrapper.java:73)
> >        at org.apache.struts2.dispatcher.Dispatcher.wrapRequest
> > (Dispatcher.java:698)
> >        at
>
> > org.apache.struts2.dispatcher.FilterDispatcher.prepareDispatcherAndWrapRequ 
> > est
> > (FilterDispatcher.java:330)
> >        at org.apache.struts2.dispatcher.FilterDispatcher.doFilter
> > (FilterDispatcher.java:390)
> >        at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter
> > (ServletHandler.java:1084)
> >        at com.google.apphosting.runtime.jetty.SaveSessionFilter.doFilter
> > (SaveSessionFilter.java:35)
> >        at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter
> > (ServletHandler.java:1084)
> >        at
> > com.google.apphosting.utils.servlet.TransactionCleanupFilter.doFilter
> > (TransactionCleanupFilter.java:43)
> >        at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter
> > (ServletHandler.java:1084)
> >        at org.mortbay.jetty.servlet.ServletHandler.handle
> > (ServletHandler.java:360)
> >        at org.mortbay.jetty.security.SecurityHandler.handle
> > (SecurityHandler.java:216)
> >        at org.mortbay.jetty.servlet.SessionHandler.handle
> > (SessionHandler.java:181)
> >        at org.mortbay.jetty.handler.ContextHandler.handle
> > (ContextHandler.java:712)
> >        at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:
> > 405)
> >        at com.google.apphosting.runtime.jetty.AppVersionHandlerMap.handle
> > (AppVersionHandlerMap.java:237)
> >        at org.mortbay.jetty.handler.HandlerWrapper.handle
> > (HandlerWrapper.java:139)
> >        at org.mortbay.jetty.Server.handle(Server.java:313)
> >        at
> > org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:
> > 506)
> >        at org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete
> > (HttpConnection.java:830)
> >        at
> > com.google.apphosting.runtime.jetty.RpcRequestParser.parseAvailable
> > (RpcRequestParser.java:76)
> >        at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:381)
> >        at
>
> > com.google.apphosting.runtime.jetty.JettyServletEngineAdapter.serviceReques 
> > t
> > (JettyServletEngineAdapter.java:139)
> >        at com.google.apphosting.runtime.JavaRuntime.handleRequest
> > (JavaRuntime.java:235)
> >        at com.google.apphosting.base.RuntimePb$EvaluationRuntime
> > $6.handleBlockingRequest(RuntimePb.java:4823)
> >        at com.google.apphosting.base.RuntimePb$EvaluationRuntime
> > $6.handleBlockingRequest(RuntimePb.java:4821)
> >        at com.google.net.rpc.impl.BlockingApplicationHandler.handleRequest
> > (BlockingApplicationHandler.java:24)
> >        at com.google.net.rpc.impl.RpcUtil.runRpcInApplication(RpcUtil.java:
> > 359)
> >        at com.google.net.rpc.impl.Server$2.run(Server.java:820)
> >        at com.google.tracing.LocalTraceSpanRunnable.run
> > (LocalTraceSpanRunnable.java:56)
> >        at com.google.tracing.LocalTraceSpanBuilder.internalContinueSpan
> > (LocalTraceSpanBuilder.java:516)
> >        at com.google.net.rpc.impl.Server.startRpc(Server.java:775)
> >        at com.google.net.rpc.impl.Server.processRequest(Server.java:348)
> >        at com.google.net.rpc.impl.ServerConnection.messageReceived
> > (ServerConnection.java:436)
> >        at com.google.net.rpc.impl.RpcConnection.parseMessages
> > (RpcConnection.java:319)
> >        at com.google.net.rpc.impl.RpcConnection.dataReceived
> > (RpcConnection.java:290)
> >        at com.google.net.async.Connection.handleReadEvent(Connection.java:
> > 428)
> >        at com.google.net.async.EventDispat

[appengine-java] Re: Get Multipart Data from the request

2009-09-13 Thread Philippe Marschall



On Jul 22, 7:41 pm, "Jason (Google)"  wrote:
> As indicated in the "Will it play in App Engine" page, you will not be able
> to use the "traditional" Apache Commons FileUpload API since it relies on
> java.io.File which is not a supported class. App Engine does not allow
> applications to write to the file system, so the DiskFileItem error thrown
> makes sense. You should be able to use the Streaming API or a custom
> solution like the one in this 
> thread:http://groups.google.com/group/google-appengine-java/browse_thread/th...

Streaming API works fine here.

Cheers
Philippe
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Google App Engine for Java" group.
To post to this group, send email to google-appengine-java@googlegroups.com
To unsubscribe from this group, send email to 
google-appengine-java+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en
-~--~~~~--~~--~--~---



[appengine-java] Re: Get Multipart Data from the request

2009-09-14 Thread Larry Cable

+1

On Sep 13, 6:18 am, Philippe Marschall 
wrote:
> On Jul 22, 7:41 pm, "Jason (Google)"  wrote:
>
> > As indicated in the "Will it play in App Engine" page, you will not be able
> > to use the "traditional" Apache Commons FileUpload API since it relies on
> > java.io.File which is not a supported class. App Engine does not allow
> > applications to write to the file system, so the DiskFileItem error thrown
> > makes sense. You should be able to use the Streaming API or a custom
> > solution like the one in this 
> > thread:http://groups.google.com/group/google-appengine-java/browse_thread/th...
>
> Streaming API works fine here.
>
> Cheers
> Philippe
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Google App Engine for Java" group.
To post to this group, send email to google-appengine-java@googlegroups.com
To unsubscribe from this group, send email to 
google-appengine-java+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en
-~--~~~~--~~--~--~---