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
The Spring container is able to autowire relationships among collaborating beans. This means that it is possible to automatically let Spring resolve collaborators (other beans) for

Write a program on Filling Rectangles ? The drawRect() method draws an open rectangle, a box if you prefer. If you need to draw a filled rectangle, use the fillRect() method. O

GUI-Based Application Objectives:   (1)   Learning how to write a GUI-based application in Java. (2) Learning how to write an event driven application program in Java.

OOPS with Java 1. Explain any five buzz words in Java. 2. Explain exception classes and also explain common exceptions in java. 3. Explain primitive and abstract data typ

I want to get some idea about how i can make a project on "Free Lancer Teaching."

Differentiation between an Applet and an Application ?

A portal is a service or a Web site that gives broad range of services and resources like e-mail, forums, search engines, weather information, news, on-line shopping, stock quotes.

How to Drawing Images at Actual Size Once the image is loaded draw it in the paint() method by using the drawImage() method like this g.drawImage(img, x, y, io) img is a

what are cookies?

Application using Swing API