package at.fh.swenga.controller;

import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.context.request.WebRequest;

import at.fh.swenga.model.UserModel;

@Controller
public class TowanController {

	@RequestMapping(value = {"/", "index"})
	public String showWelcome() {
		return "index";
	}
	
	@RequestMapping(value = "/login", method = RequestMethod.GET)
	public String showLogin() {
		return "login";
	}
	
	@RequestMapping(value = "/login", method = RequestMethod.POST)
	public String doLogin() {
		return "home";
	}
	
	@RequestMapping(value = "/home")
	public String showHome() {
		return "home";
	}
	
	@RequestMapping(value = "/profile")
	public String showProfile() {
		return "profile";
	}
	
	@RequestMapping(value = "/forum")
	public String showForum() {
		return "forum";
	}
	
	@RequestMapping(value = "/game")
	public String showGame() {
		return "game";
	}
	
	@RequestMapping(value = "/settings")
	public String showSettings() {
		return "settings";
	}
	
	@RequestMapping(value = "/impressum")
	public String showAbout() {
		return "impressum";
	}
	
	@RequestMapping(value = "/forgottenpwd")
	public String showForgottenPwd() {
		return "forgottenpwd";
	}
	
	@ExceptionHandler(Exception.class)
	public String handleAllException(Exception ex) {
		return "error";
	}
	
	@RequestMapping(value = "/register", method = RequestMethod.GET)
	public String showRegister(WebRequest request, Model model) {
		UserModel userModel = new UserModel();
	    model.addAttribute("user", userModel);
	    return "register";
	}
}

@@ -1527,249 +1527,6 @@
 %0A%09%7D%0A
-%09%0A%09@RequestMapping(value = %22/register%22, method = RequestMethod.GET)%0A%09public String showRegister(WebRequest request, Model model) %7B%0A%09%09UserModel userModel = new UserModel();%0A%09    model.addAttribute(%22user%22, userModel);%0A%09    return %22register%22;%0A%09%7D%0A
 %7D%0A

solve conflict