adspace


How can we upload files in Struts2 application?

Answer Posted / Vidit Dixit

In Struts2, you can upload files using the FileUpload interceptor. First, configure the interceptor in struts.xml and add it to your action's stack. Then, in your action class, use the private Stream stream; and private Multipart streams; variables to handle file uploads.

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the difference between filters and interceptors ?

1309


How is declarative handling of exceptions done in struts ?

1003


What is action chaining ?

1162


What are the contents on web.xml in struts application ?

1063


What do you know about validation plugin ?

1027