Hi Sebastiaan, thanks for your answer. Excellent point on potential problems when using clusters, firewalls and proxies (I run into those already).
I also thought on providing the URLs in a configuration file/spring config, but "feared" there might be a simple and preferred "Wicket" way to determine the URLs. Thanks alot, Oliver Sebastiaan van Erk wrote: > > What's wrong with putting this in a configuration file or just a > constant. Because in general this does not really work. > > For example, your web server may be behind a proxy or firewall, it may > be clustered (and thus you have many machines instead of just one and > they can't all have the same hostname), they may be running on a port > > 1024 because of security concerns, with the firewall redirecting traffic > on port 80 to the webserver. > > Personally I use spring and generally put the hostname/port combination > in a properties file which spring uses to inject it into the application > class. I have different properties files for dev and production which > are activated by different maven profiles. > > However if you really want to do this (which I don't advise) you can use > the HttpServletRequest to find your information using: > > getWebRequestCycle().getWebRequest().getHttpServletRequest() > > Regards, > Sebastiaan > > Oliver Lieven wrote: >> Hi, >> >> is there a way to determine the complete, absolute URL to a mounted page >> (including protocol, host, port, application, filter and destination >> page)? >> I need this to be able to send a link to a Registration-Confirmation page >> to >> a user via email. >> >> I searched the forum already, but didn't find a working solution. All I >> found were messages saying that since Wicket 1.3 all URLs are relative. >> Reading the JavaDoc I also found various urlFor() and >> getRelativePath...() >> methods, all returning relative paths. >> >> What I would need is a method with a signature similar to >> >> url = getAbsolutePath(Request request, Class pageClass, >> PageParameters >> parameters) >> >> which returns an url like >> "http://localhost:8080/myapp/app/<page-alias>?...<params>... >> >> Thanks for any hints on this, >> Oliver >> > > > -- View this message in context: http://www.nabble.com/How-to-determine-absolute-URL-of-a-mounted-page--tf4864119.html#a13920421 Sent from the Wicket - User mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]