获取http变量JSF [英] Get http variable JSF

查看:50
本文介绍了获取http变量JSF的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我对JSF和GET http请求有疑问.

I have a question about JSF and GET http request.

如何在由JSF管理的bean中获取GET变量?

How can I get a GET variable in bean managed by JSF ?

我尝试使用它,但是地图上什么都没有.

I tried to use it but nothing is in the map.

FacesContext.getCurrentInstance().getExternalContext().getRequestMap();

FacesContext.getCurrentInstance().getExternalContext().getRequestMap();

感谢您的回答.

推荐答案

也许这会对您有所帮助,

May be this will help you,

Map requestMap = FacesContext.getCurrentInstance().getExternalContext().getRequestParameterMap();
String para1 = (String) requestMap.get("para1");

这篇关于获取http变量JSF的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆