[jboss-user] [JBoss Seam] - How to produce full http:// URL ?

henrik.lindberg do-not-reply at jboss.com
Sun Apr 29 11:26:42 EDT 2007


Hi, I need to manufacture a URL and show to the user as text, and naturally I don't want the first part to be hard coded but reflect where the application is deployed.
I am sure there is some embarrassingly simple way to get the "base URL" or whatever it is called - can someone help me out?

As an example - say I want the URL to what this would produce:

  | <h:outputLink value="/mysite/animage.jpg" />
  | 
I.e. the "http://localhost:8080/mysite/animage.jpg" if running locally in development and "http://somewhere.org/mysute/animage.jpg" when deployed at "somewhere.org".

Regards

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

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



More information about the jboss-user mailing list