开发者

File uploading issue in struts 2

I have an issue when uploading a file in struts 2. I used The encoding type of the jsp form as follows like multipart/form-data. When I upload a file and click submit button ,struts.xml returns action but does not reach the method in action class. This issue comes whether a file upload or not but when using encoding type as multipart/form-开发者_如何学JAVAdata in jsp form.

<form action="createTemp" id="registration" 
name="registration" validate="true" method="post" enctype="multipart/form-data">

Can you please pay your attention to this issue and provide a solution.


All I get from what you say is that the required File variables are missing on the action side i.e. you are having an interceptor issue(not necessarily fileUpload interceptor).

Here is working example on how to upload a file in struts2.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜