myfaces-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Martin Kočí (JIRA) <>
Subject [jira] Commented: (MYFACES-2688) when form is 'multipart/form-data', form component will never process update.
Date Fri, 02 Jul 2010 19:58:53 GMT


Martin Kočí commented on MYFACES-2688:

h:inputFile is planned for JSF 2.1:
I don't know exact plan for 2.1  but first milestone (without inputFile) is here:
so it seems 2.1 is on the way.

Problem with missing multipart support has many consequencies: this issue,,
JSF HTML_BASIC does'nt cover all elements from HTML 4.01, user must use third party uploads
(which are incompatible) usw. 

Solution from
based on decorated ExternalContext.getRequestParameterMap() (Neil's solution) works  without
problem - I've adated it to servlet enviroment and it works: without a servlet filter, without
any third party library and doesn't lose request parameters with multipart request even they
comes from a conversation framework.

I hope this could be in myfaces core now and it does not break compatibility - if so I can
provide a patch.


> when form is 'multipart/form-data', form component will never process update.
> -----------------------------------------------------------------------------
>                 Key: MYFACES-2688
>                 URL:
>             Project: MyFaces Core
>          Issue Type: Bug
>          Components: JSR-314
>    Affects Versions: 2.0.0
>         Environment: mac os x, tomcat.
>            Reporter: Mark Li
>   Original Estimate: 120h
>  Remaining Estimate: 120h
> because '' will not be find in request.getParametersMap, the restore phase
executor will stop execute.
> source code:
> package org.apache.myfaces.lifecycle;
> .........
> class RestoreViewExecutor implements PhaseExecutor
> ..........
>   public boolean execute(FacesContext facesContext){
> ..................
>          if (!errorPageRequest && restoreViewSupport.isPostback(facesContext)){
> ................
>           }
> ...............
>   }
> restoreViewSupport.isPostback(facesContext) will call facesContext.getExternalContext().getRequestParameterMap().get(ResponseStateManager.VIEW_STATE_PARAM)
> but  request.parameterMap is empty because of  using 'multipart/form-data'.
>  restoreViewSupport.isPostback(facesContext) will return false,
> then FacesContext.renderResponse() is called. the whole phasing process is stopped.
> suggestion:
> should wrap request.parameterMap from the first place.

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message