• Post Reply Bookmark Topic Watch Topic
  • New Topic

problem with file upload using netui  RSS feed

 
giridhar challa
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I am running a java page flow on weblogic 9.2.
I have declared my form as <netui:form action="uploadFile" enctype="multipart/form-data" tagId="form1">


my form bean code is
private org.apache.struts.upload.FormFile theFile;

public void setTheFile(org.apache.struts.upload.FormFile theFile)
{
this.theFile = theFile;
}

public org.apache.struts.upload.FormFile getTheFile()
{
return this.theFile;
}


when i try to open my action in browser the jsp loading is fine.
when browse one file and click submit i am getting error. the error is occurred before it is reaching the corresponding action.

please find the snippet of error log.

Could some body help me out?

inside index.jsp 5
inside index.jsp 6
inside index.jsp 7
inside index.jsp 8
<May 12, 2006 1:22:21 PM EDT> <Error> <org.apache.struts.upload.CommonsMultipart
RequestHandler> <000000> <Failed to parse multipart request
org.apache.commons.fileupload.FileUploadException: Processing of multipart/form-
data request failed. EOF after reading only: '0' of: '42276' promised bytes, out
of which at least: '0' were already buffered
at org.apache.commons.fileupload.FileUploadBase.parseRequest(FileUploadB
ase.java:429)
at org.apache.struts.upload.CommonsMultipartRequestHandler.handleRequest
(CommonsMultipartRequestHandler.java:193)
at org.apache.beehive.netui.pageflow.MultipartRequestUtils.preHandleMult
ipartRequest(MultipartRequestUtils.java:208)
at org.apache.beehive.netui.pageflow.PageFlowRequestProcessor.processMul
tipart(PageFlowRequestProcessor.java:905)
at org.apache.beehive.netui.pageflow.PageFlowRequestProcessor.processAct
ionOverride(PageFlowRequestProcessor.java:360)
Truncated. see log file for complete stacktrace
>
<May 12, 2006 1:22:21 PM EDT> <Error> <org.apache.beehive.netui.pageflow.PageFlo
wRequestProcessor> <000000> <Could not parse multipart request.

Throwable: org.apache.commons.fileupload.FileUploadException: Processing of mult
ipart/form-data request failed. EOF after reading only: '0' of: '42276' promised
bytes, out of which at least: '0' were already buffered
Stack Trace:
org.apache.commons.fileupload.FileUploadException: Processing of multipart/form-
data request failed. EOF after reading only: '0' of: '42276' promised bytes, out
of which at least: '0' were already buffered
at org.apache.commons.fileupload.FileUploadBase.parseRequest(FileUploadB
ase.java:429)
at org.apache.struts.upload.CommonsMultipartRequestHandler.handleRequest
(CommonsMultipartRequestHandler.java:193)
at org.apache.beehive.netui.pageflow.MultipartRequestUtils.preHandleMult
ipartRequest(MultipartRequestUtils.java:208)
at org.apache.beehive.netui.pageflow.PageFlowRequestProcessor.processMul
tipart(PageFlowRequestProcessor.java:905)
at org.apache.beehive.netui.pageflow.PageFlowRequestProcessor.processAct
ionOverride(PageFlowRequestProcessor.java:360)
at org.apache.beehive.netui.pageflow.PageFlowRequestProcessor.processInt
ernal(PageFlowRequestProcessor.java:464)
at org.apache.beehive.netui.pageflow.PageFlowRequestProcessor.process(Pa
geFlowRequestProcessor.java:838)
at org.apache.beehive.netui.pageflow.AutoRegisterActionServlet.process(A
utoRegisterActionServlet.java:634)
at org.apache.beehive.netui.pageflow.PageFlowActionServlet.process(PageF
lowActionServlet.java:156)
at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:432)

at javax.servlet.http.HttpServlet.service(HttpServlet.java:763)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run
(StubSecurityHelper.java:225)
at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecuri
tyHelper.java:127)
at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.jav
a:273)
at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.ja
va:42)
at com.bea.p13n.servlets.PortalServletFilter.doFilter(PortalServletFilte
r.java:292)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.ja
va:42)
at weblogic.servlet.internal.WebAppServletContext$ServletInvocationActio
n.run(WebAppServletContext.java:3191)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(Authenticate
dSubject.java:321)
at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:
121)
at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppS
ervletContext.java:1979)
at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletC
ontext.java:1886)
at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.j
ava:1317)
at weblogic.work.ExecuteThread.execute(ExecuteThread.java:209)
at weblogic.work.ExecuteThread.run(ExecuteThread.java:181)
>
inside uploadFile of UploadController
contextPath value is -->/mdePortalWebProject
strLoc value is -->C:\bea92beta\user_projects\mde_workspaces\mde\mdePortalWebPro
ject\build\weboutput\
items size:0
keys size:0
strFileLocation value is :null\docs
inside uploadFile of UploadController
contextPath value is -->/mdePortalWebProject
strLoc value is -->C:\bea92beta\user_projects\mde_workspaces\mde\mdePortalWebPro
ject\build\weboutput\
items size:1
keys size:1
 
Sri Gnana
Ranch Hand
Posts: 166
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Check with the enctype.
 
giridhar challa
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Sri Gnana,

Thanks for your intrest.

I am using the form tag as

<netui:form action="uploadFile" enctype="multipart/form-data" tagId="form1">

Anything i need to modify?
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!