public void
    doonce(HttpServletRequest req)
            throws SendError {
    """
	Invoked once on first request so that everything is available,
	especially Spring stuff.
    """
        if(once)
            return;
        super.initOnce(req);

        if(this.uploaddir == null)
            throw new SendError(HttpStatus.SC_PRECONDITION_FAILED, "Upload disabled");
        this.uploaddirname = new File(this.uploaddir).getName();

        // Get the upload form
        File upform = null;
        upform = tdsContext.getUploadForm();
        if(upform == null) {   // Look in WEB-INF directory
            File root = tdsContext.getServletRootDirectory();
            upform = new File(root, DEFAULTUPLOADFORM);
        }
	try {
	this.uploadform = loadForm(upform);
	} catch (IOException ioe) {
            throw new SendError(HttpStatus.SC_PRECONDITION_FAILED, ioe);
	}
    }
public void
    doonce(HttpServletRequest req)
            throws SendError

    {
        if(once)
            return;
        super.initOnce(req);

        if(this.uploaddir == null)
            throw new SendError(HttpStatus.SC_PRECONDITION_FAILED, "Upload disabled");
        this.uploaddirname = new File(this.uploaddir).getName();

        // Get the upload form
        File upform = null;
        upform = tdsContext.getUploadForm();
        if(upform == null) {   // Look in WEB-INF directory
            File root = tdsContext.getServletRootDirectory();
            upform = new File(root, DEFAULTUPLOADFORM);
        }
	try {
	this.uploadform = loadForm(upform);
	} catch (IOException ioe) {
            throw new SendError(HttpStatus.SC_PRECONDITION_FAILED, ioe);
	}
    }
public void doonce ( HttpServletRequest req ) throws SendError { if ( once ) return ; super . initOnce ( req ) ; if ( this . uploaddir == null ) throw new SendError ( HttpStatus . SC_PRECONDITION_FAILED , "Upload disabled" ) ; this . uploaddirname = new File ( this . uploaddir ) . getName ( ) ; // Get the upload form File upform = null ; upform = tdsContext . getUploadForm ( ) ; if ( upform == null ) { // Look in WEB-INF directory File root = tdsContext . getServletRootDirectory ( ) ; upform = new File ( root , DEFAULTUPLOADFORM ) ; } try { this . uploadform = loadForm ( upform ) ; } catch ( IOException ioe ) { throw new SendError ( HttpStatus . SC_PRECONDITION_FAILED , ioe ) ; } }
Invoked once on first request so that everything is available,
especially Spring stuff.
Invoked once on first request so that everything is available especially Spring stuff .