/*
 * DownloadJpgAction.java
 *
 * Created on 2007/05/15, 17:19
 *
 * To change this template, choose Tools | Template Manager
 * and open the template in the editor.
 */

package weber_4_0_sample.org.itscool.download;

import java.io.FileInputStream;
import java.net.URL;
import org.itscool.weber.action.Action;
import org.itscool.weber.action.ActionBucket;
import org.itscool.weber.controller.Globals;

/**
 *
 * @author ios
 */
public class DownloadJpgAction extends Action{
    
    public String doExecute(ActionBucket bucket) throws Exception{
        String path = "C:\\local\\myproduct\\itscool-project\\web-fw4_0-src\\web\\logo.jpg";
        
        System.out.println(path);
        FileInputStream fi = new FileInputStream(path);
        bucket.print(fi, "logo.jpg");
        fi.close();
        
        return Globals.RET_NOFORWARD;
    }
}
