So, the URLs I want are like this:
http://foo.whatever.com --> Spring MVC app
http://bar.something.com --> Wicket app
Things seem to work fine for the Spring app, but the Wicket app doesn't work right because Wicket is mapped to a directory and not an extension. So, when I go to http://bar.something.com I get my homepage fine. However, I click a link and the link automatically appends the /foo to the url so you get http://bar.something.com/foo?wicket....., which still works, though it's not correct. However, when you submit a form it goes back to the home page because the session is new because Tomcat thinks its a new session due to the way the webapp is being accessed. No matter what I do it seems that Tomcat just keeps creating a new session so Wicket takes the user back to the homepage.
Thanks for your help,
Andrew
On 4/6/06, Johan Compagner <[EMAIL PROTECTED]> wrote:
this should work:
<VirtualHost *>
ServerAdmin [EMAIL PROTECTED]
DocumentRoot "youredocrootdir"
ServerName www.yourevirtualhost.com...ProxyRequests Off
<Proxy *>
Order deny,allow
Allow from all
</Proxy>
On 4/6/06, Johan Compagner <[EMAIL PROTECTED] > wrote:that is something apache/mod_rewrite should do.
Don't know why this doesn't work we only set the complete path.
But a redirect has to be the full url. So tomcat really sends the complete url to the browser. But apache should rewrite that to use the virtual host address.
johanOn 4/6/06, Andrew Berman < [EMAIL PROTECTED]> wrote:I'm using Virtual Hosts along with mod_proxy and mod_rewrite and one thing I've noticed is that when I use a DropDownChoice along with the onSelectionChange method which simply does a setResponsePage(...), it redirects the user to the http://localhost:8080/ address instead of the http://bar.com address from which they originally came to the page. Any thoughts on how to fix this?
--AndrewOn 4/6/06, Johan Compagner < [EMAIL PROTECTED]> wrote:what you want is virtual hosting. Wicket does touch the "http://xxxx.xxx" It only generates the "/contextpath/servletpath/XXXXX"
And you can set the contextpath to "" so and map with apache to a different server so that http://localhost:8080/context/ is mapped to http://bar.com
johanOn 4/6/06, Andrew Berman <[EMAIL PROTECTED]> wrote:But that wouldn't work for all Wicket urls. The problem I have is that I have one war file with multiple applications. Right now, I'm having problems mapping urls to each of those webapps. One app uses .htm (Spring MVC) and the other is a Wicket app which is mapped based on url folder. So, I want to be able to map http://foo.com to the Spring one via the .htm extension and http://bar.com to the Wicket app via some other extension instead of a folder. Currently, I'm playing around with mod_proxy and mod_rewrite in Apache and forwarding the requests to Tomcat.
Anyone have any thoughts on how to do this?On 4/5/06, Igor Vaynberg <[EMAIL PROTECTED]> wrote:did you try doing mountBookmarkablePage("/HomePage.htm", HomePage.class) ?
-IgorOn 4/5/06, Andrew Berman < [EMAIL PROTECTED]> wrote:I was wondering if there is a way in 1.2 to map Wicket's urls to an extension instead of to a directory. For example, is it possible to do http://localhost/HomePage.htm instead of the usual http://localhost/wicket/HomePage?
Thanks,
Andrew
