Upload a file in struts? , JAVA Programming

In JSP page give the code as given below:

enctype="multipart/form-data" name="fileForm" scope="session">

    Please select file here that you would like to upload:

    <html:file property="file" />

   

 

In the FormBean set the code as given below:

 

public class FileForm extends ActionForm {

    private FormSelectFile file;

 

    public void setFile(FormSelectFile file){

        this.file = file;

    }

 

    public FormSelectFile getFile(){

       return file;

    }

}

 

Posted Date: 7/27/2012 5:43:29 AM | Location : United States







Related Discussions:- Upload a file in struts? , Assignment Help, Ask Question on Upload a file in struts? , Get Answer, Expert's Help, Upload a file in struts? Discussions

Write discussion on Upload a file in struts?
Your posts are moderated
Related Questions
I CANNOT FAIL THIS I NEED IT FRIDAY TASK 1 : Read The definition of the Item interface and implement TrainCar Your are being provided with 1. Item.java 2. Automobile.java 3.

can we develop paint user can draw his charcters and images in swing

Java Remote Method Invocation (RMI): It gives a way for a Java program on one machine to interact with objects residing in different JVMs. The important blocks of the RMI arc

Question A What are the difference between an interface and an abstract class? Question B Describe Exception Handling in JAVA Question C Describe the following with resp

Want to Design an all encompassing Database for a small business Project Description: I want to organize and structure an all encompassing database and Information management

Implement a program to query and update the text database for a library using a client/server model allowing multiple clients safe access to the database, and using a producer-cons

program for hinged beam

Describe the concept of Encapsulation  Encapsulation is a technique which is used for hiding properties and behaviors of an object and allowing outside access only as appropria

Relate in brief - Microsoft vs Java Microsoft hates Java, as a Java program (portable) isn't tied to any particular operating system. If Java is popular, then programs written

JMS is asynchronous in nature. Therefore not all the pieces need to be up all the time for the application to function as a whole. Even if the receiver is down the MOM will kept th