Re: [Wicket-user] Is it possible to give wicket URLs an extension?

2006-04-07 Thread Johan Compagner
thats very odd. Can't help you with that i guess.It seems that the cookie can't be read? But if that is the case then tomcat should put jsessiondid info in the urls.johan
On 4/7/06, Andrew Berman [EMAIL PROTECTED] wrote:
Johan and Nathan, that's exactly how I'm doing it. However, the problem is that I have a single web app which has two different servlets mapped to different URLs. I have the Spring MVC servlet mapped to /*.htm (which is older but will be migrated to Wicket at some point :-)) and I have the Wicket servlet mapped to /foo/*. Both apps use common services, including the same db, so I didn't want to split them out into separate web apps and use remote EJBs or JMS or something of the sort.
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,AndrewOn 4/6/06, Johan Compagner 
[EMAIL PROTECTED] wrote:
this should work:
VirtualHost *ServerAdmin [EMAIL PROTECTED]DocumentRoot 
youredocrootdirServerName www.yourevirtualhost.com
...
ProxyRequests OffProxy *Order 
deny,allowAllow from all/ProxyProxyPass / http://localhost:9090/
ProxyPassReverse / 
http://localhost:9090/
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://.xxx It only generates the /contextpath/servletpath/X
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.comjohanOn 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


















Re: [Wicket-user] Is it possible to give wicket URLs an extension?

2006-04-06 Thread Andrew Berman
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://.xxx It only generates the /contextpath/servletpath/X
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.comjohanOn 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










Re: [Wicket-user] Is it possible to give wicket URLs an extension?

2006-04-06 Thread Johan Compagner
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://.xxx It only generates the /contextpath/servletpath/X
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.comjohanOn 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












Re: [Wicket-user] Is it possible to give wicket URLs an extension?

2006-04-06 Thread Johan Compagner
this should work:
VirtualHost *ServerAdmin [EMAIL PROTECTED]DocumentRoot 
youredocrootdirServerName www.yourevirtualhost.com
...
ProxyRequests OffProxy *Order 
deny,allowAllow from all/ProxyProxyPass / http://localhost:9090/ProxyPassReverse / 
http://localhost:9090/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://.xxx It only generates the /contextpath/servletpath/X
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.comjohanOn 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














Re: [Wicket-user] Is it possible to give wicket URLs an extension?

2006-04-06 Thread Andrew Berman
Johan and Nathan, that's exactly how I'm doing it. However, the problem is that I have a single web app which has two different servlets mapped to different URLs. I have the Spring MVC servlet mapped to /*.htm (which is older but will be migrated to Wicket at some point :-)) and I have the Wicket servlet mapped to /foo/*. Both apps use common services, including the same db, so I didn't want to split them out into separate web apps and use remote EJBs or JMS or something of the sort.
So, the URLs I want are like this:http://foo.whatever.com -- Spring MVC apphttp://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,AndrewOn 4/6/06, Johan Compagner [EMAIL PROTECTED] wrote:
this should work:
VirtualHost *ServerAdmin [EMAIL PROTECTED]DocumentRoot 
youredocrootdirServerName www.yourevirtualhost.com
...
ProxyRequests OffProxy *Order 
deny,allowAllow from all/ProxyProxyPass / http://localhost:9090/
ProxyPassReverse / 
http://localhost:9090/
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://.xxx It only generates the /contextpath/servletpath/X
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.comjohanOn 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
















[Wicket-user] Is it possible to give wicket URLs an extension?

2006-04-05 Thread Andrew Berman
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


Re: [Wicket-user] Is it possible to give wicket URLs an extension?

2006-04-05 Thread Igor Vaynberg
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




Re: [Wicket-user] Is it possible to give wicket URLs an extension?

2006-04-05 Thread Andrew Berman
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






Re: [Wicket-user] Is it possible to give wicket URLs an extension?

2006-04-05 Thread Igor Vaynberg
well, you have total control over how urls are generated, but its not trivial to implementwhat you want to do is to create your own IRequestTargetUrlCodingStrategy and IRequestTargetResolverStrategy. plug them into the WebRequestCycle and you can make any kind of urls you want.
-IgorOn 4/5/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