UserService.createLoginURL导致“您请求的页面无效”。错误
问题描述:
我使用UserService重定向到登录页面:UserService.createLoginURL导致“您请求的页面无效”。错误
String loginURL = userService.createLoginURL(request.getRequestURI());
throw new ModelAndViewDefiningException(new ModelAndView(new RedirectView(loginURL, false)));
这导致像网址:
(例如=我的域名)
当有人Google显示错误页面:
The page you requested is invalid.
任何想法我做错了什么? 这太令人讨厌了,我试图找到解决方案 - 没有任何运气。
这与GAE JDK 1.4.3(JAVA)
完全相同的代码在1.3.2版本的工作,一段时间后,我决定用GAE再次发挥,升级库发生......现在我有登录问题。
答
我今天遇到了这个问题,GAE 1.6.3。
登录不与URL工作,你上面给:
但是,如果你更换工作 “?https://www.google.com/accounts/ServiceLogin”与 “https://accounts.google.com/ServiceLogin?” 这样的:
不幸的是,无法修改该URL,因为它是由UserService生成的。 但我可以让我的应用程序以这种方式生成第二个网址:
我的应用程序的默认页面最初通过“jsp:forward”向控制器发送请求,该控制器检查用户是否已登录。已经改变了我的应用程序,以便控制器在第一时间处理请求(没有前一个转发)。这解决了我的问题。但我无法解释这种不正当行为背后的原因。
谢谢,前不久我放弃了GAE。需要花费更多时间来解决它的局限性,而不是实际的应用程序...... – Konrad 2012-03-05 21:18:07