package com.test.customTag;
import javax.servlet.http.HttpServletRequest;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
@Controller
@RequestMapping("users")
public class userController {
@RequestMapping("input")
public String userInput(){
return "/users/input";
}
@RequestMapping("inputUp")
public String userInputUp(@RequestParam("userId") String userId, @RequestParam("userName") String userName, Model model){
// String userId = request.getParameter("userId");
// String userName = request.getParameter("userName");
model.addAttribute("userId", userId);
model.addAttribute("userName", userName);
return "/users/inputUp";
}
}
'기존카테고리 > Spring_문법' 카테고리의 다른 글
스프링 DI(Dependency Injection) 1 (0) | 2017.07.23 |
---|---|
Parameter값 받기 - 실전(Command객체) (0) | 2017.07.13 |
Parameter값 받기 - 기초(HttpServletRequest) (0) | 2017.07.13 |
Class Mapping (0) | 2017.07.13 |
Model 과 ModelAndView (0) | 2017.07.13 |