Try not to use the Servlet API unless you have. Try something similar to this:
| @In
| private FacesContext facesContext;
| private HttpServletRequest request;
|
| public void initComponent(){
| request =
(HttpServletRequest)facesContext.getExternalContext().getRequest();
| }
Actually, you should avoid casting to HttpServletRequest if at all possible
because your application will break if/when you run it as a portlet.
ExternalContext has methods available for path information.
ExternalContext extCtx = facesContext.getExternalContext();
Stan,
Cool!! This is just I wanted, with this solution I forgot the Servlet API,
Thanks!! :P
juan.
View the original post :
http://www.jboss.com/index.html?module=bbop=viewtopicp=3970192#3970192
Reply to the post :
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=3970192