This is a simple example of use these article :
public FileUploadForm() {
if(FacesContext.getCurrentInstance().getExternalContext().
getRequestParameterMap().containsKey("defaultsavepath_name"))
{
this.savePathName=FacesContext.getCurrentInstance().
getExternalContext().getRequestParameterMap().
get("defaultsavepath_name").toString();
FacesContext.getCurrentInstance().getExternalContext().
getRequestParameterMap().put("defaultsavepath_name",this.savePathName);
}
else
{
Object tmpDir =
FacesContext.getCurrentInstance().
getExternalContext().getRequestParameterMap().get("dirName");
if (tmpDir != null && !tmpDir.toString().equals(""))
{
String tmpdirName = tmpDir.toString();
savePathName = savePathName + "\\" + tmpdirName;
FacesContext.getCurrentInstance().getExternalContext().
getRequestParameterMap().
put("defaultsavepath_name", this.savePathName);
}
...
}