package pt.ist.renderers.plugin;
import java.util.Collection;
import java.util.Enumeration;
import java.util.Hashtable;
import java.util.Map;
import javax.servlet.ServletContext;
import javax.servlet.http.HttpServletRequest;
import org.apache.struts.action.ActionForm;
import org.apache.struts.upload.FormFile;
import pt.ist.renderers.components.state.LifeCycleConstants;
import pt.ist.renderers.plugin.upload.RenderersRequestWrapper;
import pt.ist.renderers.plugin.upload.StrutsFile;
import pt.ist.renderers.servlets.commons.UploadedFile;
import pt.ist.renderers.servlets.filters.RequestWrapperFilter.FenixHttpServletRequestWrapper;
/**
* The standard renderers request processor. This processor is responsible for
* handling any viewstate present in the request. It will parse the request,
* retrieve all viewstates, and start the necessary lifecycle associated with
* them before continuing with the standard struts processing.
*
*
* If any exception is thrown during the processing of a viewstate it will be
* handled by struts like if the exceptions occured in the destiny action. This
* default behaviour can be overriden by making the destiny action implement the
* {@link pt.ist.renderers.plugin.ExceptionHandler} interface.
*
*
* The processor ensures that the current request and context are available
* through {@link #getCurrentRequest()} and {@link #getCurrentContext()}
* respectively during the entire request lifetime. The processor also process
* multipart requests to allow any renderer to retrieve on uploaded file with
* {@link #getUploadedFile(String)}.
*
*
* This processor extends the tiles processor to easily integrate in an
* application that uses the tiles plugin.
*
* @author cfgi
*/
public class RenderersRequestProcessorImpl {
public static Class implementationClass = RenderersRequestProcessor.class;
static ThreadLocal currentRequest = new ThreadLocal();
static ThreadLocal currentContext = new ThreadLocal();
static ThreadLocal