Package com.simpletwitter.web.controllers

Source Code of com.simpletwitter.web.controllers.LoginOrRegisterController

package com.simpletwitter.web.controllers;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.ModelAttribute;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.servlet.ModelAndView;

import com.istreepetge.models.IpCalendarEvent;
import com.simpletwitter.models.TwitterUser;

@Controller
@RequestMapping(value = "loginorregister.html")
public class LoginOrRegisterController {

  protected final Log logger = LogFactory.getLog(getClass());

  @RequestMapping(value = "/welcome.html", method = RequestMethod.GET)
  public ModelAndView handleRequest() throws Exception {
    ModelAndView mv = new ModelAndView();
    TwitterUser tuser = new TwitterUser();
    mv.addObject("TwitterUser", tuser);
    mv.setViewName("loginorregister");
    return mv;
  }
}
TOP

Related Classes of com.simpletwitter.web.controllers.LoginOrRegisterController

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.