Hi,

try removing the .do from your action in the form and just put the action name what is in the struts-config.xml.

Thanks,

Nuwan


----- Original Message ----- From: "vbharath19" <[EMAIL PROTECTED]>
To: <user@struts.apache.org>
Sent: Tuesday, June 26, 2007 4:03 PM
Subject: Form Upload throwing null pointer. cannot retrieve the file in action class..HELP URGENT!!!



Hi,

I have a jsp from which i upload a file. this field is of Formfile type.

jsp entry:

<html:form method="post" enctype="multipart/form-data"
action="/pages/deploy-action.do" >
<td> <html:file name="deploymentForm"  property="theFile" /> </td>
<br>
<tr>
<td> <html:submit onclick="upload()" value="Upload the excel" >
</html:submit> </td>
</tr>
</html:form>

I have not used bean:define in the jsp. when i use it,it throws cannot
assign null exception.

in the struts config xml, entries are present for form - bean but not for
its property, i tried entering the property, it did not make a difference

I am using the multiform/form-data enctype and also method=post.

when i run the page and upload the file and invoke the action class i get
the following error.

java.lang.NullPointerException
       at actions.DeployAction.execute(DeployAction.java:139)
       at
org.apache.struts.action.RequestProcessor.processActionPerform(Reques
tProcessor.java:419)
       at
org.apache.struts.action.RequestProcessor.process(RequestProcessor.ja
va:224)
       at
org.apache.struts.action.ActionServlet.process(ActionServlet.java:119
6)
       at
org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:432)


--
View this message in context: http://www.nabble.com/Form-Upload-throwing-null-pointer.-cannot-retrieve-the-file-in-action-class..HELP-URGENT%21%21%21-tf3983276.html#a11308662
Sent from the Struts - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to