thisUrl refers to the URL that GWT is requesting, not the URL hosting the GWT page. For instance, if your GWT page is index.html, you will want to redirect to that, not the URL at which you have defined your RPC handler.
-- Ikai Lan Developer Programs Engineer, Google App Engine Blogger: http://googleappengine.blogspot.com Reddit: http://www.reddit.com/r/appengine Twitter: http://twitter.com/app_engine On Sat, Dec 11, 2010 at 2:58 PM, david <davg...@gmail.com> wrote: > Hi, > > I have a very newbie question. > > I have an entire gwt home page, it has a sign in button (rpc). > > This is the service implementation (just like the example): > > UserService userService = UserServiceFactory.getUserService(); > HttpServletRequest request = this.getThreadLocalRequest(); > String message = ""; > String thisURL = request.getRequestURI(); > > Principal principal = request.getUserPrincipal(); > if(principal == null){ > message = "<p>Please <a href=\"" + > userService.createLoginURL(thisURL) + "\">sign in</a>.</p>"; > } > else{ > message = "Hola " + principal.getName() + ". Puedes <a href= > \"" + > userService.createLogoutURL(thisURL)+ "\">sign > out</a>.</p>"; > } > return message; > > I let the doGet method empty. > > Then, when I sign in/sign out it redirects me to a blank page (to > myApp/myServlet), but i want to back to the page i was (my gwt home > page or wherever I was) > > -- > You received this message because you are subscribed to the Google Groups > "Google App Engine" group. > To post to this group, send email to google-appeng...@googlegroups.com. > To unsubscribe from this group, send email to > google-appengine+unsubscr...@googlegroups.com<google-appengine%2bunsubscr...@googlegroups.com> > . > For more options, visit this group at > http://groups.google.com/group/google-appengine?hl=en. > > -- You received this message because you are subscribed to the Google Groups "Google App Engine" group. To post to this group, send email to google-appeng...@googlegroups.com. To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en.