How can we upload files in Struts2 application?



How can we upload files in Struts2 application?..

Answer / 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

More Struts Interview Questions

What is struts 2 framework in java?

1 Answers  


Can you give an overview of how a struts application flows?

1 Answers  


kindly can any one post for me portlet,hibernate,spring example code and configuration,and some related tutorials plz its urgent for me....thanks in advance ............

1 Answers  


Explain about the validation steps which have to be carried during validation of client-side address?

1 Answers  


1.can we transfer a request from one struts application to another struts application? 2. how many types of action servlets r there what r they

1 Answers   TCS,


What is controller in struts2?

1 Answers  


Which configuration file is used for storing jsp configuration information in struts?

1 Answers  


What is filter dispatcher in struts?

1 Answers  


What is struts? Explain

1 Answers  


Explain the difference between plain-validator and field-validator in struts?

1 Answers  


What are construction struts?

1 Answers  


Briefly tell the two kinds of form beans.

1 Answers  


Categories