Re: How to determine absolute URL of a mounted page?

2007-11-25 Thread Johan Compagner
Can we then make something where we ask some setting first for the host part? If not found we generate from the current request, which i think for many many production environments will not really work because who doesnt virtualhost or puts apache in front of it? On 11/25/07, Al Maw [EMAIL

Re: How to determine absolute URL of a mounted page?

2007-11-25 Thread Johan Compagner
If you virtual host in apache on a server (local ip 10.0.0.1) so www.mydomain.com/ is virtual hosted by a tomcat server on a local network (10.0.0.2) 10.0.0.2:8080/myapp1context and you do a request to apach it will rewrite the url and give it to tomcat Then the request url is really

Re: How to determine absolute URL of a mounted page?

2007-11-25 Thread John Patterson
On 25 Nov 2007, at 13:01, Johan Compagner wrote: If you virtual host in apache on a server (local ip 10.0.0.1) it will rewrite the url and give it to tomcat Then the request url is really http://10.0.0.2:8080/myapp1context/XX I use Apache as a proxy and have got past this issue by using

Re: How to determine absolute URL of a mounted page?

2007-11-25 Thread Johan Compagner
also the port? On Nov 25, 2007 8:47 PM, John Patterson [EMAIL PROTECTED] wrote: On 25 Nov 2007, at 13:01, Johan Compagner wrote: If you virtual host in apache on a server (local ip 10.0.0.1) it will rewrite the url and give it to tomcat Then the request url is really

Re: How to determine absolute URL of a mounted page?

2007-11-25 Thread John Patterson
On 25 Nov 2007, at 15:26, Johan Compagner wrote: also the port? Yes the port is also contained in the host header so it works fine - as if the proxy was not there at all. I know that Jetty always respects the host header.

Re: How to determine absolute URL of a mounted page?

2007-11-25 Thread Sebastiaan van Erk
Ryan Sonnek wrote: I'm trying to accomplish the same thing and think that wicket should provide such an API. all of the issues mentioned are well known issues and other web frameworks still provide an API and just acknowledge the limitations. This is pretty important for me as I can't

Re: How to determine absolute URL of a mounted page?

2007-11-25 Thread Ryan Sonnek
Personally I'd rather put it in a config file and know it's right rather than have it break if someone decides to virtual host/firewall/proxy the webapp and forgets to tweak the settings just right, (e.g., forgets the ProxyPreserveHost directive). That's why you have automated tests to make

Re: How to determine absolute URL of a mounted page?

2007-11-24 Thread Ryan Sonnek
I'm trying to accomplish the same thing and think that wicket should provide such an API. all of the issues mentioned are well known issues and other web frameworks still provide an API and just acknowledge the limitations. This is pretty important for me as I can't necessarily hardcode the url

Re: How to determine absolute URL of a mounted page?

2007-11-24 Thread Jonathan Locke
yeah, wicket should be able to find the base url of your application. i've had to do this in a couple of projects by hand. /unfortunately/ i don't think there's any container-independent way of doing this until a first request has come in for processing. before that point in time, it seems

Re: How to determine absolute URL of a mounted page?

2007-11-24 Thread Al Maw
Oliver Lieven wrote: 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. Ah, yes, I've been meaning

Re: How to determine absolute URL of a mounted page?

2007-11-23 Thread Sebastiaan van Erk
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

Re: How to determine absolute URL of a mounted page?

2007-11-23 Thread Oliver Lieven
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