[jboss-user] [JBoss Seam] - Re: Application URL

damianharvey do-not-reply at jboss.com
Sat Dec 8 07:46:31 EST 2007


ServletRequest request = (ServletRequest) FacesContext.getCurrentInstance()
  |         .getExternalContext().getRequest();
  | 
  | String url = new StringBuffer(request.getScheme())
  | 	.append("://").append(request.getServerName())
  | 	.append(":")
  | 	.append(request.getServerPort())
  |         .append(FacesContext.getCurrentInstance()
  |                 .getExternalContext().getRequestContextPath())
  | 	.toString();
  | 

Cheers,

Damian.

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

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



More information about the jboss-user mailing list