webtier@glassfish.java.net

Re: Problem loading Faces js libraries in Firefox

From: <forums_at_java.net>
Date: Sun, 19 Feb 2012 19:14:23 -0600 (CST)

you can use

FacesContext context = FacesContext.getCurrentInstance();

ExternalContext elc = context.getExternalContext();

HttpServletRequest req =  (HttpServletRequest)elc.getRequest();

then you get the HttpServletRequest object and you can do operate on it , you
can see jsf api to get more info about it.

but it's  not recommended to do permission on like you code style.  

checking permission offen happens in a servlet Filter  or user a security
framework like spring security.  

 please see servler  api or google to get more detail about it.

 

 

 

 


--
[Message sent by forum member 'gubaojian']
View Post: http://forums.java.net/node/883606