Struts Tutorials

File Upload functionality in Struts 2

In order to add file upload functionality we will add an action class FileUploadAction to our webproject. Create file, which should look like: [crayon-5c6a77b97ee11559331757/] In above class file we have declared few attributes: private File userImage -> This will store actual uploaded File private String userImageContentType -> This string will contain...

Introduction to Interceptors in Struts 2

Interceptors are one of the Struts 2 components, others being ActionContext, the ValueStack and OGNL. Interceptors allow cross-cutting functionalities to be implemented before or after the actual action gets fired. Thus, provides for the pre-processing and post-processing logic on the action. Note that, the action does not wait for the...
Receive our updates to your inbox

Get more stuff like this
in your inbox

Subscribe to our mailing list and get interesting stuff and updates to your email inbox.