Monday, September 5, 2011

Re: redirect GWT application URL

Sorry, hit enter before completing the posting.

In the filter, redirect seems not working
request.getRequestDispatcher("http://mything.com/#blah");

Instead, I generate a page that contains the meta tag for redirecting:
PrintWriter out = httpResponse.getWriter();

out.println("<meta HTTP-EQUIV=\"REFRESH\" content=\"0; url=http://
mything.com/#blan\">");
out.close();

This seems working.

On Sep 5, 8:27 am, Qiang Ma <mumay...@gmail.com> wrote:
> Just an update...
> In the filter, redirect seems not working
> request.getRequestDispatcher(New_Url);
>
>
>
>
>
>
>
> On Mon, Sep 5, 2011 at 6:52 AM, Qiang Ma <mumay...@gmail.com> wrote:
> > Thanks Y2i and Thomas.
>
> > One of the reason is I wonder if I  can redirect a full domain name to a
> > internal state of my application. For example , I go to a domain hosting to
> > redirect
> >          http://someotherdomain.com
> > to
> >          http://mything.com/#someotherdomain
> > But the domain hosting service complains about the URL format, it has to be
> > without the hash sign.
> >          http://mything.com/someotherdomain
>
> > Thomas, is your proposal only applicable to new browsers? I wish a solution
> > applies to old browser as well.
>
> > -maq
>
> > On Mon, Sep 5, 2011 at 2:58 AM, Thomas Broyer <t.bro...@gmail.com> wrote:
>
> >> Recent browsers implement pushState/onpopstate which allows changing the
> >> URL (and not only the "hash" part) without unloading the page. You can see
> >> it at work in Google Plus, GitHub's repository browser or even Facebook.
> >> In GWT, you could use deferred binding to replace the Historian
> >> implementation used by PlaceHistoryHandler (I bet you could even replace the
> >> HistoryImpl instead, at a lower level) if the browser supports
> >> pushState/onpopstate, and use the default implementation using the URL's
> >> "hash" otherwise.
>
> >> --
> >> You received this message because you are subscribed to the Google Groups
> >> "Google Web Toolkit" group.
> >> To view this discussion on the web visit
> >>https://groups.google.com/d/msg/google-web-toolkit/-/15RjXbOQJqcJ.
>
> >> To post to this group, send email to google-web-toolkit@googlegroups.com.
> >> To unsubscribe from this group, send email to
> >> google-web-toolkit+unsubscribe@googlegroups.com.
> >> For more options, visit this group at
> >>http://groups.google.com/group/google-web-toolkit?hl=en.

--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to google-web-toolkit+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.

No comments:

Post a Comment