}
private void redirectMainPage(HttpServletRequest req,
HttpServletResponse resp){
logger.info("redirectMainPage");
ICallBackParameter para=new CallBackParameterImpl(req.getSession());
Oauth oauth = new Oauth();
try {
AccessToken at = oauth.getAccessTokenByCode(req.getParameter("code"));
para.putParameter(ICallBackParameter.ACCESS_TOKEN, at);
logger.info("Access Token:"+at);
User user=storeService.find(User.class,at.getAccessToken());
if (user == null){
user = new User();
user.setAccessToken(at.getAccessToken());