수정페이지 이동(hello_world.jsp) hello_world.jsp에서 사용자 아이디에 수정페이지로 이동하도록 내용 추가 ${data.user_id} src\com\iot\controller\UserController.java 클래스 내용 추가 @Autowired private UserInfoService service; @RequestMapping(value = "/edit_user.iot", method = RequestMethod.GET) public String edit_user(@RequestParam("user_id") String user_id, ModelMap modelMap) throws Exception { UserInfo userinfo = service.selectUser(u..
JSONData 추상 클래스 생성 Factory 패턴에서 반환 가능한 형태로 만들기 위해서 추상 클래스를 사용하기때문에 아래와 같이 추상 클래스를 생성 package com.iot.json; import java.text.SimpleDateFormat; import java.util.Date; import java.util.Map; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import net.sf.json.JSONObject; public abstract class JSONData { private static SimpleDateFormat formatter = new Simple..
Spring MVC Multipart Configuration (iot-servlet.xml 내용추가) 출처 : Spring MVC File Upload Example Tutorial - Spring MVC File Upload Example Tutorial – Single and Multiple Files 스프링(Spring) 파일 업로드(File Upload) :: 갱짱.study - 이갱짱 - Tistory FileUploadController.java package com.iot.controller; import java.io.File; import java.io.FileOutputStream; import java.io.IOException; import java.io.OutputStream; ..
컨트롤러 클래스에서 입력받은 객체 전달 modelMap.addAttribute("userinfo", new UserInfo()); 내용 추가 package com.iot.controller; import java.util.List; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Controller; import org.springframework.ui.ModelMap; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.Reque..
출처 : mybatis-spring – 마이바티스 스프링 연동모듈 | 매퍼 주입DB 접속 설정(WebContent\WEB-INF\iot-datasource.xml)데이터베이스 접속 정보(JDBC) 설정 JDBC는 각 데이터베이스 마다 제공되고 있고, 연결방식도 달라 따로 검색이 필요 DB 접속정보 iot-servlet.xml에 추가 MyBatis Domain 패키지 생성MyBatis Mapper 패키지 생성MyBatis Service 패키지 생성MyBatis 설정 파일 작성(WebContent\WEB-INF\iot-mybatis.xml) user_info 예제 테이블 생성 CREATE TABLE `user_info` ( `user_id` varchar(20) NOT NULL, `password` varc..
프로젝트 생성test.jsp 결과 = web.xml 작성 iot 720 *.jsp UTF-8 /servlet/* UTF-8 index.html 스프링에서의 POST/GET 한글처리(web.xml)출처 : Spring MVC : 스프링에서의 POST/GET 한글처리 characterEncodingFilter org.springframework.web.filter.CharacterEncodingFilter encoding UTF-8 characterEncodingFilter /* 스프링에서의 MVC 설정(web.xml)출처 : Spring MVC : @MVC와 DispatcherServlet에 대해서주소 *.iot는 DispatcherServlet이 실행iot-servlet.xml 찾음 iot org.spr..
출처 : JSTL의 이해 및 실습 - 12.구루비 Dev 스터디 JSTL 라이브러리 접두어 URI 식별자 기능 c http://java.sun.com/jsp/jstl/core 변수선언 fmt http://java.sun.com/jsp/jstl/fmt 숫자,날짜,시간을 포맷팅 하는 기능과 국제화, 다국어 지원 기능을 제공 fn http://java.sun.com/jsp/jstl/functions 문자열을 처리하는 함수를 제공 sql http://java.sun.com/jsp/jstl/sql 데이터베이스의 데이터를 입력/수정/삭제/조회하는 기능을 제공 x http://java.sun.com/jsp/jstl/xml XML 문서를 처리할 때 필요한 기능을 제공 form http://www.springframew..
출처 : Get to Spring ApplicationContext from everywhere (The clean way) Spring 컨터이너안의 Bean 객체를 어디에서든 얻어오는 Tip ApplicationContextProvider 클래스 ApplicationContextProvider 클래스를 만들고, 이 클래스는 ApplicationContextAware 인터페이스를 구현합니다. package com.iot.util; import org.springframework.beans.BeansException; import org.springframework.context.ApplicationContext; import org.springframework.context.ApplicationConte..
- Total
- Today
- Yesterday
- KOBA
- android
- 튜닝쇼 2008
- oracle
- Java
- NDK
- Linux
- Delphi
- koba2010
- 송주경
- Delphi Tip
- 지스타2007
- Xcode
- ffmpeg
- ble
- 동경
- BPI-M4
- flex
- ubuntu
- SAS
- Spring
- Spring MVC
- JavaScript
- sas2009
- 일본여행
- 레이싱모델 익스트림 포토 페스티벌
- Mac
- 전예희
- MySQL
- 서울오토살롱
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | |||||
3 | 4 | 5 | 6 | 7 | 8 | 9 |
10 | 11 | 12 | 13 | 14 | 15 | 16 |
17 | 18 | 19 | 20 | 21 | 22 | 23 |
24 | 25 | 26 | 27 | 28 | 29 | 30 |
31 |