인생 데이터베이스

menu-opener icon
  • 홈
  • 태그
  • 방명록
728x90

Spring/Spring Web

[Spring] index.jsp를 WEB-INF/views 안에 넣고 DispatcherServlet을 거치지 않고 띄우기. welcom-file 추가

// 원래 라면 webapp 폴더 하위에 index.jsp를 넣고 Tomcat Server의 web.xml의// welcom-file에 의하여 index.jsp를 첫 화면으로 띄울 수 있었다. index.html index.htm index.jsp // 하지만 프로젝트 내의 web.xml의 url-pattern이 /이 아닌 *.do같은 형식이라면, // Spring Legacy MVC에서 기본적으로 제공하는 HomeController에서 value="/"가// 작동하지 못하게 되며, // WEB-INF 내부에 넣을 시, Tomcat Server의 welcome-file이 찾지 못하게 되고,// 결국 index.jsp로 매핑되는 @RequestMapping이 없기 때문에 404에러가 뜬다. // 하지만 프..

2020.11.07 게시됨

Spring/Spring Web

[Spring] web.xml / servlet-context.xml의 path 분석

// 1. web.xml의 DispactherServlet에서 servlet-context.xml로 보낸다. appServlet org.springframework.web.servlet.DispatcherServlet contextConfigLocation /WEB-INF/spring/appServlet/servlet-context.xml 1 // 2. servlet-context.xml의 등록된 beans에서 Controller에서 넘어온 String 값에 // prefix:접두사, suffix:접미사 를 붙여서, // ${rootContext}/WEB-INF/views/ + 넘어온 String + .jsp 가 되어 // 페이지 이동을 할 수 있게 되는 것이다. // 기본적으로 WEB-INF에 직접 접..

2020.11.07 게시됨

123
728x90

공지사항

  • [Spring]WebSocket GitHub 공유 - 미완성

최근글

인기글

최근 작성된 댓글

250x250

태그 클라우드

  • Eclipse
  • JavaScript
  • JSP
  • JSON
  • SQL
  • websocket
  • Spring
  • rownum
  • AWS
  • jQuery
  • Ajax
  • server refused our key
  • LOG4J
  • Linux
  • NoSuchBeanDefinitionException
Copyright . 베이스캠프 all rights reserved.
Designed by 베이스캠프
닫기 아이콘
사이드 프로필 배경이미지
블로그 이미지

행복한 개발자

2024.01.04 블로그 재개편!! 문의사항은 방명록 남겨주시면 확인해서 답글 남겨드립니다~!

  • 분류 전체보기 (106)
    • Programming (33)
      • Java (8)
      • HTML, CSS (2)
      • 자바스크립트 (11)
      • Web (6)
      • Git (2)
      • 기본 지식 (2)
      • Linux (2)
    • Spring (22)
      • Spring Web (20)
      • Spring Security (0)
      • Spring Batch (0)
      • Spring JPA (0)
      • Spring Cloud (0)
      • Spring Boot (1)
    • Vue.js (5)
    • Node.js (4)
    • 알고리즘 (24)
      • 코딩테스트 (23)
      • 해시 (1)
    • SQL (11)
      • Oracle (11)
      • MySql (0)
      • MongoDB (0)
      • PostgreSQL (0)
    • 나의이야기 (1)

전체

오늘

어제

Designed by 베이스캠프

티스토리툴바