Ok, note for others that are "enjoying" working with the Tomcat jsp
server:

The error below came from my server not allowing www.google.com
connection ability to my server....must add the following in the
relevant policy file for catalina:

grant codeBase "file:${catalina.home}/webapps/-" {
    permission java.net.SocketPermission "www.google.com", "connect";
};

For Debian/Sarge, I added this stanza to the
/etc/tomcat5/policy.d/04webapps.poligy file.

fun stuff.
-Cere

ceremona wrote:
> Hi,
>
> Thanks for the authsub example Sanjay et al.  I've noticed that the
> code doesn't seem to work once the "grant access" is selected.  This
> request is coming from a non-registered site, but it didn't see that
> this would matter according to the docs:
>
> I get a 500 error.
>
> output below:
>
> type Exception report
>
> message
>
> description The server encountered an internal error () that prevented
> it from fulfilling this request.
>
> exception
>
> java.lang.RuntimeException: java.security.AccessControlException:
> access denied (java.net.SocketPermission www.google.com resolve)
>       
> sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:883)
>       
> sun.net.www.protocol.http.HttpURLConnection.getHeaderField(HttpURLConnection.java:1904)
>       java.net.HttpURLConnection.getResponseCode(HttpURLConnection.java:376)
>       
> sun.net.www.protocol.https.HttpsURLConnectionImpl.getResponseCode(HttpsURLConnectionImpl.java:318)
>       com.google.gdata.client.http.AuthSubUtil.exchangeForSessionToken(Unknown
> Source)
>       com.google.gdata.client.http.AuthSubUtil.exchangeForSessionToken(Unknown
> Source)
>       sample.authsub.src.HandleTokenServlet.doGet(Unknown Source)
>       javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
>       javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
>       sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>       
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>       
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>       java.lang.reflect.Method.invoke(Method.java:585)
>       org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:243)
>       java.security.AccessController.doPrivileged(Native Method)
>       javax.security.auth.Subject.doAsPrivileged(Subject.java:517)
>       org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:272)
>       
> org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:161)
>
> note The full stack trace of the root cause is available in the Apache
> Tomcat/5.0 logs.
> 
> 
> -Cere


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google Data API" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/google-help-dataapi
-~----------~----~----~----~------~----~------~--~---

Reply via email to