I have a login.jsp page:
<form method="post" action="url:8081/login.xhtml">
Username : <input type="text" name="txtUsername"/>
Password : <input type="text" name="txtPassword"/>
<input type="submit" value="submit"/>
</form>
When I submit it, how can I get the txtUsername and txtPassword parameters in login.xhtml?
All request parameters are in EL available by the
#{param}map. Thus, this should do:If you need to preprocess them by Java code, better put them as managed properties or view parameters in the backing bean class associated with
login.xhtml.Managed property example:
View parameter example:
with
See also: