ninja icon indicating copy to clipboard operation
ninja copied to clipboard

Cannot get form field parameters from multipart/form-data

Open eagwasim opened this issue 10 years ago • 6 comments
trafficstars

I have tried every way listed to get form field parameters in a form containing file uploads but i can only get the files. how can i retrieve the regular form parameters ??

eagwasim avatar Jul 26 '15 00:07 eagwasim

In the exact same way you get the file data. You have to read the normal parameter values from the InputStream just like you do for the file upload itself.

Hope this helps, Jens

On 26 Jul 2015 01:27, eagwasim [email protected] wrote:

I have tried every way listed to get form field parameters in a form containing file uploads but i can only get the files. how can i retrieve the regular form parameters ??

— Reply to this email directly or view it on GitHub.

jfendler avatar Jul 26 '15 09:07 jfendler

You can get regular param values as @jfendler described, documented here.

There was a pull request PR #368, closed now, which would make possible accessing regular params of a multipart request by @Param annotation or by context.getParameter() methods.

There should be another PR soon solving this issue. @momiji when you can provide a PR?

bazi avatar Jul 27 '15 05:07 bazi

Ok, Ill Try that. Thanks a bunch.

eagwasim avatar Jul 27 '15 08:07 eagwasim

PR is ready to merge, everything is implemented, tested and documented, at least as much as I can do with my pour english. See #383.

momiji avatar Jul 27 '15 10:07 momiji

Hello,

As the subject implies, I've been on this for a while. Is there a solution or do I have to create my own controller for serving static files?

Thanks On Jul 27, 2015 11:09 AM, "momiji" [email protected] wrote:

PR is ready to merge, everything is implemented, tested and documented, at least as much as I can do with my pour english. See #383 https://github.com/ninjaframework/ninja/pull/383.

— Reply to this email directly or view it on GitHub https://github.com/ninjaframework/ninja/issues/388#issuecomment-125154778 .

eagwasim avatar Aug 02 '15 02:08 eagwasim

Hello, I'm getting this exception when i try to run my ninja application in production.

Please i need assistance.

java.lang.NoClassDefFoundError: Could not initialize class ninja.utils.NinjaPropertiesImpl at ninja.servlet.NinjaServletListener.getInjector(NinjaServletListener.java:103) at com.google.inject.servlet.GuiceServletContextListener.contextInitialized(GuiceServletContextListener.java:47) at ninja.servlet.NinjaServletListener.contextInitialized(NinjaServletListener.java:62) at org.mortbay.jetty.handler.ContextHandler.startContext(ContextHandler.java:548) at org.mortbay.jetty.servlet.Context.startContext(Context.java:136) at org.mortbay.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1250) at org.mortbay.jetty.handler.ContextHandler.doStart(ContextHandler.java:517) at org.mortbay.jetty.webapp.WebAppContext.doStart(WebAppContext.java:467) at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50) at com.google.apphosting.runtime.jetty.AppVersionHandlerMap.createHandler(AppVersionHandlerMap.java:206) at com.google.apphosting.runtime.jetty.AppVersionHandlerMap.getHandler(AppVersionHandlerMap.java:179) at com.google.apphosting.runtime.jetty.JettyServletEngineAdapter.serviceRequest(JettyServletEngineAdapter.java:135) at com.google.apphosting.runtime.JavaRuntime$RequestRunnable.run(JavaRuntime.java:457) at com.google.tracing.TraceContext$TraceContextRunnable.runInContext(TraceContext.java:437) at com.google.tracing.TraceContext$TraceContextRunnable$1.run(TraceContext.java:444) at com.google.tracing.CurrentContext.runInContext(CurrentContext.java:230) at com.google.tracing.TraceContext$AbstractTraceContextCallback.runInInheritedContextNoUnref(TraceContext.java:308) at com.google.tracing.TraceContext$AbstractTraceContextCallback.runInInheritedContext(TraceContext.java:300) at com.google.tracing.TraceContext$TraceContextRunnable.run(TraceContext.java:441) at com.google.apphosting.runtime.ThreadGroupPool$PoolEntry.run(ThreadGroupPool.java:235) at java.lang.Thread.run(Thread.java:745)

On 8/2/15, Agwasim Emmanuel [email protected] wrote:

Hello,

As the subject implies, I've been on this for a while. Is there a solution or do I have to create my own controller for serving static files?

Thanks On Jul 27, 2015 11:09 AM, "momiji" [email protected] wrote:

PR is ready to merge, everything is implemented, tested and documented, at least as much as I can do with my pour english. See #383 https://github.com/ninjaframework/ninja/pull/383.

— Reply to this email directly or view it on GitHub https://github.com/ninjaframework/ninja/issues/388#issuecomment-125154778 .

eagwasim avatar Oct 03 '15 15:10 eagwasim