I am implementing facebook connect for my web application using facebook-java-api. I am actually following a tutorial from this site
I have written a servlet to implement step 4 which is given in t开发者_如何学Che tutorial, but I am not able to resolve 2 errors thats
HttpUtil
logger.debug
I have imported all the packages to the project build path but I am not able to resolve those errors,
The site itself mentions that the implementation of HttpUtil ought to be obvious to the reader. Going by the comments posted on the site, HttpUtil ought to do the following (pseudocode):
method getCookieValue(String cookieValue) 1. Obtain the cookies from the request. 2. Return null, if no cookies were found. 3. Iterate through all the cookies, and return the value of the cookie matching the argument cookieValue.
logger.debug is fairly easy to figure out if you've used log4j. But since you haven't, here's a very simple usecase. You'll need to create a logger object and invoke the debug method on it as:
private static final Logger logger = Logger.getLogger(yourClassName.class.getName()); //this is a class member declaration
...
void someMethod()
{
logger.debug("debug message");
}
精彩评论