首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 网站开发 > JavaScript >

JSF怎么取得Request中的parameter

2012-10-08 
JSF如何取得Request中的parameter用户进入http://localhost:8080/test/active.jsf?usernamexxx&activecod

JSF如何取得Request中的parameter

用户进入http://localhost:8080/test/active.jsf?username=xxx&activecode=yyy页面

?

?? active.jsp :

?

<h:form id="acctiveAccount_form">   <h:inputText id="username" value="#{accountActiveBean.username}" required="true" maxlength="30"/ >   <h:inputText id="activecode" value="#{accountActiveBean.activecode}" required="true" maxlength="30"/ >   <h:inputSecret id="password" value="#{accountActiveBean.password}" required="true" maxlength="20"/ >   <h:commandButton id="submitButton" value="#{messages['button_submit']}" action="#{accountActiveBean.active}" /> </h:form> 

?

如何让username和activecode得到url中的参数"xxx","yyy"?

?

1. #{param.xxx},#{param.xxx}

?

2. 可以使用这个方法获得?
????FacesContext.getCurrentInstance().getExternalContext()
??? .getRequestParameterMap().get("...");

热点排行