How to retrieve Post Parameter
Hi All,
I am new to JSF..I need to retrieve Post parameters from plain HTML pages.
Once i receive the post parameter in JSF then i need to validate one of the parameter and redirect user to diffrent pages based on the parameter value.
What is the best way doing this scenario..
The source of the parameters are from HTML pages comes from diffrent locations..
Any help would be highly appriciated..
[434 byte] By [
mraja] at [2007-11-27 4:12:40]

# 1
Try the following code snippet to access request parameters:
FacesContext facesContext = getFacesContext();
ExternalContext externalContext = facesContext.getExternalContext();
Map requestMap = externalContext.getRequestMap();
Now that you have the request map, you can retrieve any of the request parameters using:
<ObjectType> parameter = <ObjectType>requestMap.get(<ParameterName>);
where <ObjectType>
is the data type of the request parameter and <ParameterName>
is the name of the request parameter.