• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Servlet HttpSession in webobjects?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Servlet HttpSession in webobjects?


  • Subject: Re: Servlet HttpSession in webobjects?
  • From: Mike Schrag <email@hidden>
  • Date: Thu, 14 Feb 2008 09:18:08 -0500

your Session.java:
public class Session extends WOSession {
private String _facebookSession;

...

public void setFacebookSession(String facebookSession) {
_facebookSession = facebookSession;
}

public String facebookSession() {
return _facebookSession;
}
}

HttpSession session = request.getSession();
Session session = (Session)session();
String sessionKey = (String) session.getAttribute("facebookSession");
String sessionKey = session.facebookSession();
String token = request.getParameter("auth_token");
String token = request.stringFormValueForKey("auth_token");

if (sessionKey != null && sessionKey.length() > 0) {
facebookRestClient = new FacebookXmlRestClient(apiKey, secretKey, sessionKey);

}
else if (token != null) {
facebookRestClient = new FacebookXmlRestClient(apiKey, secretKey);
above is the same
session.setAttribute("facebookSession", sessionKey);
session.setFacebookSession(sessionKey);

    try {
    sessionKey = facebookRestClient.auth_getSession(token);
above is the same
    session.setAttribute("facebookSession", sessionKey);
session.setFacebookSession(sessionKey);
    } catch (FacebookException e) {
    e.printStackTrace();
    }
} else {
above is the same
response.sendRedirect("http://www.facebook.com/login.php?api_key=" 
+ apiKey + "&v=1.0");
WORedirect redirect = (WORedirect)pageWithName(WORedirect.class.getName());
redirect.setUrl("http://www.facebook.com/login.php?api_key=" + apiKey + "&v=1.0");
return;
return redirect;
}
                response.getWriter().println("Hello World");
return pageWithName("HelloWorldPage");

ms
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: Servlet HttpSession in webobjects?
      • From: netBrackets <email@hidden>
References: 
 >Re: AJAX WebObjects Integration (From: Jeff Schmitz <email@hidden>)
 >Servlet HttpSession in webobjects? (From: Jeff Schmitz <email@hidden>)
 >Re: Servlet HttpSession in webobjects? (From: Lachlan Deck <email@hidden>)
 >Re: Servlet HttpSession in webobjects? (From: Jeff Schmitz <email@hidden>)
 >Re: Servlet HttpSession in webobjects? (From: Lachlan Deck <email@hidden>)
 >Re: Servlet HttpSession in webobjects? (From: Jeff Schmitz <email@hidden>)
 >Re: Servlet HttpSession in webobjects? (From: Mike Schrag <email@hidden>)
 >Re: Servlet HttpSession in webobjects? (From: Jeff Schmitz <email@hidden>)
 >Re: Servlet HttpSession in webobjects? (From: Chuck Hill <email@hidden>)
 >Re: Servlet HttpSession in webobjects? (From: Jeff Schmitz <email@hidden>)
 >Re: Servlet HttpSession in webobjects? (From: Mike Schrag <email@hidden>)
 >Re: Servlet HttpSession in webobjects? (From: Jeff Schmitz <email@hidden>)
 >Re: Servlet HttpSession in webobjects? (From: Mike Schrag <email@hidden>)
 >Re: Servlet HttpSession in webobjects? (From: "Mr. Pierre Frisch" <email@hidden>)
 >Re: Servlet HttpSession in webobjects? (From: Jeff Schmitz <email@hidden>)

  • Prev by Date: Re: mySQL 5
  • Next by Date: Re: mySQL 5
  • Previous by thread: Re: Servlet HttpSession in webobjects?
  • Next by thread: Re: Servlet HttpSession in webobjects?
  • Index(es):
    • Date
    • Thread