[jboss-user] [JBoss Seam] - Re: How to get request object, for example the servletPath

stan.silvert@jboss.com do-not-reply at jboss.com
Thu Sep 7 11:34:41 EDT 2006


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();
extCtx.getRequestContextPath();
extCtx.getRequestServletPath();
extCtx.getRequestPathInfo();

etc.

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3970129#3970129

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3970129



More information about the jboss-user mailing list