Re: The requested URL was not allowed

2011-11-30 Thread Drew Spencer
Just been having this problem, I think.

I have an app at http://usavtestapp1.appspot.com/ and I only want my app 
available for my Google Apps users.

We already have our main website at our domain: 
http://utilitiessavings.co.uk - Can I host it on a subdomain or a subfolder 
of that domain? Am I getting this totally wrong? Does the app need its own 
domain, a different one to the Google Apps one?

Regards,

Drew

-- 
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/-/XsARbe0nzGYJ.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: The requested URL was not allowed

2009-06-22 Thread waf

That's cleared.
AppEngine application I was deploying the app
was configured with Authentication Options
restricted to the Google Apps domain and I tried
to use it on appspot.com. When used on the
designated domain it works fine.
--
waf
--~--~-~--~~~---~--~~
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+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---



The requested URL was not allowed

2009-06-21 Thread waf

Hi All !

I try to follow GWT Getting Started Tutorial and everthing was fine
until the
3. Personalize the application with the User Service from
GWT and Google App Engine part.

Trying to use User Service on AppEngine deployed app I get

32.82.27.183 - - [20/Jun/2009:14:09:07 -0700] "POST /stockwatcher/
login HTTP/1.1" 500 113 "http://MYAPPID.appspot.com/stockwatcher/
F2BA1EC2336108C70EFD27BB520BF7D5.cache.html" "Mozilla/5.0 (Windows; U;
Windows NT 5.1; pl; rv:1.9.0.11) Gecko/2009060215 Firefox/3.0.11,gzip
(gfe)" "MYAPPID.appspot.com"

javax.servlet.ServletContext log: Exception while dispatching incoming
RPC call
com.google.gwt.user.server.rpc.UnexpectedException: Service method
'public abstract pl.waf.stockwatcher.client.LoginInfo
pl.waf.stockwatcher.client.LoginService.login(java.lang.String)' threw
an unexpected exception: java.lang.IllegalArgumentException: The
requested URL was not allowed: http://MYAPPID.appspot.com/
at com.google.gwt.user.server.rpc.RPC.encodeResponseForFailure
(RPC.java:360)
at com.google.gwt.user.server.rpc.RPC.invokeAndEncodeResponse
(RPC.java:546)
at com.google.gwt.user.server.rpc.RemoteServiceServlet.processCall
(RemoteServiceServlet.java:166)
at com.google.gwt.user.server.rpc.RemoteServiceServlet.doPost
(RemoteServiceServlet.java:86)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:713)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:806)

I have:

1. Login Service interface

package pl.waf.stockwatcher.client;

import com.google.gwt.user.client.rpc.RemoteService;

public interface LoginService extends RemoteService
{
public LoginInfo login(String requestUri);
}

2. LoginService implementation

package pl.waf.stockwatcher.server;

import pl.waf.stockwatcher.client.LoginInfo;
import pl.waf.stockwatcher.client.LoginService;

import com.google.appengine.api.users.User;
import com.google.appengine.api.users.UserService;
import com.google.appengine.api.users.UserServiceFactory;
import com.google.gwt.user.server.rpc.RemoteServiceServlet;

public class LoginServiceImpl extends RemoteServiceServlet implements
LoginService {

@Override
public LoginInfo login(String requestUri)
{
UserService userService= UserServiceFactory.getUserService();
User user= userService.getCurrentUser();
LoginInfo loginInfo= new LoginInfo();

if(user!=null)
{
loginInfo.setLoggedIn(true);
loginInfo.setEmailAddress(user.getEmail());
loginInfo.setNickname(user.getNickname());

loginInfo.setLogoutUrl(userService.createLogoutURL(requestUri));
}
else
{
loginInfo.setLoggedIn(false);

loginInfo.setLoginUrl(userService.createLoginURL(requestUri));
}
return loginInfo;
}
}

3. and login service call

  LoginServiceAsync loginService= GWT.create(LoginService.class);
  loginService.login(GWT.getHostPageBaseURL(), new
AsyncCallback() {

@Override
public void onFailure(Throwable caught) {
handleError(caught);
}

@Override
public void onSuccess(LoginInfo result) {
loginInfo= result;
if(loginInfo.isLoggedIn())
loadStockWatcher();
else
loadLogin();
}
  });

Why is userService.createLoginURL(requestUri) failing with requested
URL not allowed?
Are there any restrictions on request URI?
Everything is working fine in the development environment.

--
Wlodek

--~--~-~--~~~---~--~~
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+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---