I am newbie to file upload by using strut, I have an action, but did not use form bean, then I got an erro no matter how I tried, please take a look to see where is the problem:
the form in test.jsp
<form action="/actions/sales/customer/test"
enctype="multipart/form-data" method="post">
Please specify the path of the logo:<br>
<input type="file" name="filename" size="40">
the strut-config.xml for this action
<action
path="/actions/sales/customer/test"
type="com.mailamerica.wts.FileUploadAction"
input="/forms/error.jsp">
<forward name="success"
path="/index.jsp"/>
<forward name="fail"
path="/forms/login.jsp"/>
</action>
and I have a FileUploadAction.java file, but the control even don't come to the action file,I only got exception for
"Can not retrieve definition for form bean null...."
can anybody give me any hint? does form bean is a must for file upload to use struts? I use the common-fileupload.jar component and tutorial from jakarta website and did not follow the tutrial of struts of fileupload to use form bean. because I may have more control over the file if I don't use the form bean for struts.
-
Exception with file upload without using form bean (1 messages)
- Posted by: Arthur Wang
- Posted on: April 04 2005 16:59 EDT
Threaded Messages (1)
- Exception with file upload without using form bean by Rakesh Malpani on April 05 2005 15:29 EDT
-
Exception with file upload without using form bean[ Go to top ]
- Posted by: Rakesh Malpani
- Posted on: April 05 2005 15:29 EDT
- in response to Arthur Wang
Every action must have a form bean associated with it. Its mandatory by the struts spec.