org.enableit.db.darrt.web
Class UploadAction

java.lang.Object
  |
  +--org.apache.struts.action.Action
        |
        +--org.apache.struts.actions.DispatchAction
              |
              +--org.enableit.db.darrt.web.UploadAction

public class UploadAction
extends org.apache.struts.actions.DispatchAction

General action to support uploading.

Note that the JSP page may specify a sub-directory of the web-application into which the file is to be saved. By default the file will be saved into the web-app root.

Author:
Tim Stephenson (based on struts upload example)

Field Summary
 
Fields inherited from class org.apache.struts.actions.DispatchAction
clazz, log, messages, methods, types
 
Fields inherited from class org.apache.struts.action.Action
ACTION_SERVLET_KEY, APPLICATION_KEY, DATA_SOURCE_KEY, defaultLocale, ERROR_KEY, EXCEPTION_KEY, FORM_BEANS_KEY, FORWARDS_KEY, LOCALE_KEY, MAPPING_KEY, MAPPINGS_KEY, MESSAGE_KEY, MESSAGES_KEY, MULTIPART_KEY, PLUG_INS_KEY, REQUEST_PROCESSOR_KEY, servlet, SERVLET_KEY, TRANSACTION_TOKEN_KEY
 
Constructor Summary
UploadAction()
          Default constructor.
 
Method Summary
 org.apache.struts.action.ActionForward preUpload(org.apache.struts.action.ActionMapping mapping, org.apache.struts.action.ActionForm form, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
          Present the default file upload page.
 org.apache.struts.action.ActionForward upload(org.apache.struts.action.ActionMapping mapping, org.apache.struts.action.ActionForm form, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
          Handle the file upload and forward to the confirmation page.
 
Methods inherited from class org.apache.struts.actions.DispatchAction
dispatchMethod, execute, getMethod, unspecified
 
Methods inherited from class org.apache.struts.action.Action
execute, generateToken, getDataSource, getDataSource, getLocale, getResources, getResources, getResources, getServlet, isCancelled, isTokenValid, isTokenValid, perform, perform, resetToken, saveErrors, saveMessages, saveToken, setLocale, setServlet, toHex
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

UploadAction

public UploadAction()
Default constructor.

Method Detail

preUpload

public org.apache.struts.action.ActionForward preUpload(org.apache.struts.action.ActionMapping mapping,
                                                        org.apache.struts.action.ActionForm form,
                                                        javax.servlet.http.HttpServletRequest request,
                                                        javax.servlet.http.HttpServletResponse response)
                                                 throws java.lang.Exception
Present the default file upload page.

java.lang.Exception

upload

public org.apache.struts.action.ActionForward upload(org.apache.struts.action.ActionMapping mapping,
                                                     org.apache.struts.action.ActionForm form,
                                                     javax.servlet.http.HttpServletRequest request,
                                                     javax.servlet.http.HttpServletResponse response)
                                              throws java.io.IOException,
                                                     javax.servlet.ServletException
Handle the file upload and forward to the confirmation page.

java.io.IOException
javax.servlet.ServletException


Copyright © 1999-2004 enableIT.org. All Rights Reserved.