Re: Mount URL to another host?
Dont try to do that in a constructor of a page, way better is throwing an exception On 10/12/08, Uwe Schäfer <[EMAIL PROTECTED]> wrote: > Zach Cox schrieb: >> I need the browser to actually redirect the user to http://othersite.com >> if >> they go to http://mysite.com/something, regardless of if they click a link >> or type it into the address bar. > > doesn´t this work there? > > class SomethingPage extends WebPage { // mounted accordingly > public SomethingPage (){ > setResponsePage(new RedirectPage("http://othersite.com";)); > }} > > cu uwe > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Mount URL to another host?
I'm sure calling setResponsePage with a new RedirectPage would work equally well. Uwe Schäfer-2 wrote: > > doesn´t this work there? > > class SomethingPage extends WebPage { // mounted accordingly > public SomethingPage (){ > setResponsePage(new RedirectPage("http://othersite.com";)); > }} > > cu uwe > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > -- View this message in context: http://www.nabble.com/Mount-URL-to-another-host--tp19921980p19940933.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Mount URL to another host?
Zach Cox schrieb: I need the browser to actually redirect the user to http://othersite.com if they go to http://mysite.com/something, regardless of if they click a link or type it into the address bar. doesn´t this work there? class SomethingPage extends WebPage { // mounted accordingly public SomethingPage (){ setResponsePage(new RedirectPage("http://othersite.com";)); }} cu uwe - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Mount URL to another host?
This seems to work: public class SomethingPage extends RedirectPage { public SomethingPage() { super("http://othersite.com";); } } MyApplication.init(): mountBookmarkablePage("something", SomethingPage.class); Thanks for all the replies! Wicket community rulz. -- View this message in context: http://www.nabble.com/Mount-URL-to-another-host--tp19921980p19922897.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Mount URL to another host?
If it's a one-off, would you suggest adding another dependency and configuration file to the mix? On Fri, Oct 10, 2008 at 1:13 PM, Martin Grigorov <[EMAIL PROTECTED]> wrote: > On Fri, 2008-10-10 at 09:51 -0700, Zach Cox wrote: >> I feel dumb for even asking this, as there's got to be an easy way, but my >> brain is blocked today... >> >> I need a URL on my site, say http://mysite.com/something to redirect to >> another site entirely, say http://othersite.com. Is there some >> IRequestTargetUrlCodingStrategy that will do this? Or am I totally on the >> wrong track by looking there? >> >> Thanks, >> Zach > > Just mount a regular page at "/something" and in the constructor of that > page do: > throw new RedirectToUrlException("http://othersite.com";); > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Mount URL to another host?
On Fri, 2008-10-10 at 09:51 -0700, Zach Cox wrote: > I feel dumb for even asking this, as there's got to be an easy way, but my > brain is blocked today... > > I need a URL on my site, say http://mysite.com/something to redirect to > another site entirely, say http://othersite.com. Is there some > IRequestTargetUrlCodingStrategy that will do this? Or am I totally on the > wrong track by looking there? > > Thanks, > Zach Just mount a regular page at "/something" and in the constructor of that page do: throw new RedirectToUrlException("http://othersite.com";); - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Mount URL to another host?
If you want it external to Wicket, you probably want to use a ServletFilter... something like: http://tuckey.org/urlrewrite/ Zach Cox wrote: > > I feel dumb for even asking this, as there's got to be an easy way, but my > brain is blocked today... > > I need a URL on my site, say http://mysite.com/something to redirect to > another site entirely, say http://othersite.com. Is there some > IRequestTargetUrlCodingStrategy that will do this? Or am I totally on the > wrong track by looking there? > > Thanks, > Zach > -- View this message in context: http://www.nabble.com/Mount-URL-to-another-host--tp19921980p19922453.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Mount URL to another host?
I would write a servlet that takes an init parameter. On Fri, Oct 10, 2008 at 1:02 PM, Zach Cox <[EMAIL PROTECTED]> wrote: > > Yes that is exactly what I need. I can definitely do the bookmarkable page > approach. I'm using Tomcat for everything, do you know if I can have Tomcat > do this, maybe something in web.xml? > > > > Jeremy Thomerson-5 wrote: >> >> I think he means when someone goes to that URL, it needs to redirect >> entirely. Not just be able to link to another site. >> >> A couple options: >> Mount a bookmarkable page at that URL and in the constructor throw a new >> RestartResponseAtInterruptPageException with a new RedirectPage as the >> parameters. >> >> Probably better would be if you have a frontend server like apache or IIS >> - >> to do it there. >> >> Hope this helps. >> >> -- >> Jeremy Thomerson >> http://www.wickettraining.com >> >> >> >> On Fri, Oct 10, 2008 at 11:54 AM, Igor Vaynberg >> <[EMAIL PROTECTED]>wrote: >> >>> externallink? >>> >>> -igor >>> >>> On Fri, Oct 10, 2008 at 9:51 AM, Zach Cox <[EMAIL PROTECTED]> wrote: >>> > >>> > I feel dumb for even asking this, as there's got to be an easy way, but >>> my >>> > brain is blocked today... >>> > >>> > I need a URL on my site, say http://mysite.com/something to redirect to >>> > another site entirely, say http://othersite.com. Is there some >>> > IRequestTargetUrlCodingStrategy that will do this? Or am I totally on >>> the >>> > wrong track by looking there? >>> > >>> > Thanks, >>> > Zach >>> > -- >>> > View this message in context: >>> http://www.nabble.com/Mount-URL-to-another-host--tp19921980p19921980.html >>> > Sent from the Wicket - User mailing list archive at Nabble.com. >>> > >>> > >>> > - >>> > To unsubscribe, e-mail: [EMAIL PROTECTED] >>> > For additional commands, e-mail: [EMAIL PROTECTED] >>> > >>> > >>> >>> - >>> To unsubscribe, e-mail: [EMAIL PROTECTED] >>> For additional commands, e-mail: [EMAIL PROTECTED] >>> >>> >> >> > > -- > View this message in context: > http://www.nabble.com/Mount-URL-to-another-host--tp19921980p19922244.html > Sent from the Wicket - User mailing list archive at Nabble.com. > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Mount URL to another host?
I need the browser to actually redirect the user to http://othersite.com if they go to http://mysite.com/something, regardless of if they click a link or type it into the address bar. igor.vaynberg wrote: > > externallink? > > -igor > > On Fri, Oct 10, 2008 at 9:51 AM, Zach Cox <[EMAIL PROTECTED]> wrote: >> >> I feel dumb for even asking this, as there's got to be an easy way, but >> my >> brain is blocked today... >> >> I need a URL on my site, say http://mysite.com/something to redirect to >> another site entirely, say http://othersite.com. Is there some >> IRequestTargetUrlCodingStrategy that will do this? Or am I totally on >> the >> wrong track by looking there? >> >> Thanks, >> Zach >> -- >> View this message in context: >> http://www.nabble.com/Mount-URL-to-another-host--tp19921980p19921980.html >> Sent from the Wicket - User mailing list archive at Nabble.com. >> >> >> - >> To unsubscribe, e-mail: [EMAIL PROTECTED] >> For additional commands, e-mail: [EMAIL PROTECTED] >> >> > > ------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > -- View this message in context: http://www.nabble.com/Mount-URL-to-another-host--tp19921980p19922170.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Mount URL to another host?
Yes that is exactly what I need. I can definitely do the bookmarkable page approach. I'm using Tomcat for everything, do you know if I can have Tomcat do this, maybe something in web.xml? Jeremy Thomerson-5 wrote: > > I think he means when someone goes to that URL, it needs to redirect > entirely. Not just be able to link to another site. > > A couple options: > Mount a bookmarkable page at that URL and in the constructor throw a new > RestartResponseAtInterruptPageException with a new RedirectPage as the > parameters. > > Probably better would be if you have a frontend server like apache or IIS > - > to do it there. > > Hope this helps. > > -- > Jeremy Thomerson > http://www.wickettraining.com > > > > On Fri, Oct 10, 2008 at 11:54 AM, Igor Vaynberg > <[EMAIL PROTECTED]>wrote: > >> externallink? >> >> -igor >> >> On Fri, Oct 10, 2008 at 9:51 AM, Zach Cox <[EMAIL PROTECTED]> wrote: >> > >> > I feel dumb for even asking this, as there's got to be an easy way, but >> my >> > brain is blocked today... >> > >> > I need a URL on my site, say http://mysite.com/something to redirect to >> > another site entirely, say http://othersite.com. Is there some >> > IRequestTargetUrlCodingStrategy that will do this? Or am I totally on >> the >> > wrong track by looking there? >> > >> > Thanks, >> > Zach >> > -- >> > View this message in context: >> http://www.nabble.com/Mount-URL-to-another-host--tp19921980p19921980.html >> > Sent from the Wicket - User mailing list archive at Nabble.com. >> > >> > >> > - >> > To unsubscribe, e-mail: [EMAIL PROTECTED] >> > For additional commands, e-mail: [EMAIL PROTECTED] >> > >> > >> >> - >> To unsubscribe, e-mail: [EMAIL PROTECTED] >> For additional commands, e-mail: [EMAIL PROTECTED] >> >> > > -- View this message in context: http://www.nabble.com/Mount-URL-to-another-host--tp19921980p19922244.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Mount URL to another host?
Can't you just write a servlet that will do it? On Fri, Oct 10, 2008 at 12:59 PM, Zach Cox <[EMAIL PROTECTED]> wrote: > > I need the browser to actually redirect the user to http://othersite.com if > they go to http://mysite.com/something, regardless of if they click a link > or type it into the address bar. > > > > igor.vaynberg wrote: >> >> externallink? >> >> -igor >> >> On Fri, Oct 10, 2008 at 9:51 AM, Zach Cox <[EMAIL PROTECTED]> wrote: >>> >>> I feel dumb for even asking this, as there's got to be an easy way, but >>> my >>> brain is blocked today... >>> >>> I need a URL on my site, say http://mysite.com/something to redirect to >>> another site entirely, say http://othersite.com. Is there some >>> IRequestTargetUrlCodingStrategy that will do this? Or am I totally on >>> the >>> wrong track by looking there? >>> >>> Thanks, >>> Zach >>> -- >>> View this message in context: >>> http://www.nabble.com/Mount-URL-to-another-host--tp19921980p19921980.html >>> Sent from the Wicket - User mailing list archive at Nabble.com. >>> >>> >>> - >>> To unsubscribe, e-mail: [EMAIL PROTECTED] >>> For additional commands, e-mail: [EMAIL PROTECTED] >>> >>> >> >> - >> To unsubscribe, e-mail: [EMAIL PROTECTED] >> For additional commands, e-mail: [EMAIL PROTECTED] >> >> >> > > -- > View this message in context: > http://www.nabble.com/Mount-URL-to-another-host--tp19921980p19922170.html > Sent from the Wicket - User mailing list archive at Nabble.com. > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Mount URL to another host?
I think he means when someone goes to that URL, it needs to redirect entirely. Not just be able to link to another site. A couple options: Mount a bookmarkable page at that URL and in the constructor throw a new RestartResponseAtInterruptPageException with a new RedirectPage as the parameters. Probably better would be if you have a frontend server like apache or IIS - to do it there. Hope this helps. -- Jeremy Thomerson http://www.wickettraining.com On Fri, Oct 10, 2008 at 11:54 AM, Igor Vaynberg <[EMAIL PROTECTED]>wrote: > externallink? > > -igor > > On Fri, Oct 10, 2008 at 9:51 AM, Zach Cox <[EMAIL PROTECTED]> wrote: > > > > I feel dumb for even asking this, as there's got to be an easy way, but > my > > brain is blocked today... > > > > I need a URL on my site, say http://mysite.com/something to redirect to > > another site entirely, say http://othersite.com. Is there some > > IRequestTargetUrlCodingStrategy that will do this? Or am I totally on > the > > wrong track by looking there? > > > > Thanks, > > Zach > > -- > > View this message in context: > http://www.nabble.com/Mount-URL-to-another-host--tp19921980p19921980.html > > Sent from the Wicket - User mailing list archive at Nabble.com. > > > > > > - > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > >
Re: Mount URL to another host?
externallink? -igor On Fri, Oct 10, 2008 at 9:51 AM, Zach Cox <[EMAIL PROTECTED]> wrote: > > I feel dumb for even asking this, as there's got to be an easy way, but my > brain is blocked today... > > I need a URL on my site, say http://mysite.com/something to redirect to > another site entirely, say http://othersite.com. Is there some > IRequestTargetUrlCodingStrategy that will do this? Or am I totally on the > wrong track by looking there? > > Thanks, > Zach > -- > View this message in context: > http://www.nabble.com/Mount-URL-to-another-host--tp19921980p19921980.html > Sent from the Wicket - User mailing list archive at Nabble.com. > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Mount URL to another host?
I feel dumb for even asking this, as there's got to be an easy way, but my brain is blocked today... I need a URL on my site, say http://mysite.com/something to redirect to another site entirely, say http://othersite.com. Is there some IRequestTargetUrlCodingStrategy that will do this? Or am I totally on the wrong track by looking there? Thanks, Zach -- View this message in context: http://www.nabble.com/Mount-URL-to-another-host--tp19921980p19921980.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]