Re: Redirect to relative URL

2013-02-23 Thread Martin Grigorov
Hi,

For Wicket the url is either internal or external.
Since you want to escape from the application scope then you need an
external url.

You can also use "../../../../../../../../../", i.e. something that will go
up than the context(+filter) path where your app runs.


On Sat, Feb 23, 2013 at 12:50 PM, Sebastian Gaul wrote:

> This is exactely what I tried. The problem is, that RedirectRequestTarget
> handles the URL as context-specific (but it is domain-specific). Using
> external links (as mentioned on the website) is not an option, because the
> redirect is based on internal settings rather than user interaction.
>
> Any other idea?
>
> 2013/2/22 Bernard 
>
> > You will find solutions under these subjects:
> >
> > redirect to an external non-Wicket page
> > redirect to an external URL
> >
> > e.g.
> >
> >
> https://cwiki.apache.org/WICKET/how-to-redirect-to-an-external-non-wicket-page.html
> >
> > Regards,
> >
> > Bernard
> >
> > On Fri, 22 Feb 2013 17:06:09 +0100, you wrote:
> >
> > >Hello,
> > >
> > >I have a server-relative URL like /target/index (starting with a slash)
> > and
> > >I'm looking for a way to redirect to http://mydomain.com
> */target/index*.
> > >
> > >In Wicket (unfortunately still 1.4) I tried the following:
> > >
> > >RequestCycle.get().setRequestTarget(
> > >new RedirectRequestTarget("/target/index")
> > >);
> > >
> > >Unfortunately Wicket thinks that the root slash refers to the Wicket
> > >application rather than the server's root. Therefore the redirect ends
> up
> > >here:
> > >
> > >http://mydomain.com/*wicketapp*/target/index
> > >*
> > >*
> > >I don't want Wicket to change my URL, so the Servlet should redirect to
> > >http://mydomain.com/target/index.  Any ideas how to achieve that?
> >
> >
> > -
> > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> > For additional commands, e-mail: users-h...@wicket.apache.org
> >
> >
>



-- 
Martin Grigorov
jWeekend
Training, Consulting, Development
http://jWeekend.com 


Re: Redirect to relative URL

2013-02-23 Thread Sebastian Gaul
This is exactely what I tried. The problem is, that RedirectRequestTarget
handles the URL as context-specific (but it is domain-specific). Using
external links (as mentioned on the website) is not an option, because the
redirect is based on internal settings rather than user interaction.

Any other idea?

2013/2/22 Bernard 

> You will find solutions under these subjects:
>
> redirect to an external non-Wicket page
> redirect to an external URL
>
> e.g.
>
> https://cwiki.apache.org/WICKET/how-to-redirect-to-an-external-non-wicket-page.html
>
> Regards,
>
> Bernard
>
> On Fri, 22 Feb 2013 17:06:09 +0100, you wrote:
>
> >Hello,
> >
> >I have a server-relative URL like /target/index (starting with a slash)
> and
> >I'm looking for a way to redirect to http://mydomain.com*/target/index*.
> >
> >In Wicket (unfortunately still 1.4) I tried the following:
> >
> >RequestCycle.get().setRequestTarget(
> >new RedirectRequestTarget("/target/index")
> >);
> >
> >Unfortunately Wicket thinks that the root slash refers to the Wicket
> >application rather than the server's root. Therefore the redirect ends up
> >here:
> >
> >http://mydomain.com/*wicketapp*/target/index
> >*
> >*
> >I don't want Wicket to change my URL, so the Servlet should redirect to
> >http://mydomain.com/target/index.  Any ideas how to achieve that?
>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


Re: Redirect to relative URL

2013-02-22 Thread Bernard
You will find solutions under these subjects:

redirect to an external non-Wicket page
redirect to an external URL

e.g.
https://cwiki.apache.org/WICKET/how-to-redirect-to-an-external-non-wicket-page.html

Regards,

Bernard

On Fri, 22 Feb 2013 17:06:09 +0100, you wrote:

>Hello,
>
>I have a server-relative URL like /target/index (starting with a slash) and
>I'm looking for a way to redirect to http://mydomain.com*/target/index*.
>
>In Wicket (unfortunately still 1.4) I tried the following:
>
>RequestCycle.get().setRequestTarget(
>new RedirectRequestTarget("/target/index")
>);
>
>Unfortunately Wicket thinks that the root slash refers to the Wicket
>application rather than the server's root. Therefore the redirect ends up
>here:
>
>http://mydomain.com/*wicketapp*/target/index
>*
>*
>I don't want Wicket to change my URL, so the Servlet should redirect to
>http://mydomain.com/target/index.  Any ideas how to achieve that?


-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Redirect to relative URL

2013-02-22 Thread Sebastian Gaul
Hello,

I have a server-relative URL like /target/index (starting with a slash) and
I'm looking for a way to redirect to http://mydomain.com*/target/index*.

In Wicket (unfortunately still 1.4) I tried the following:

RequestCycle.get().setRequestTarget(
new RedirectRequestTarget("/target/index")
);

Unfortunately Wicket thinks that the root slash refers to the Wicket
application rather than the server's root. Therefore the redirect ends up
here:

http://mydomain.com/*wicketapp*/target/index
*
*
I don't want Wicket to change my URL, so the Servlet should redirect to
http://mydomain.com/target/index.  Any ideas how to achieve that?