수다닷컴

  • 해외여행
    • 괌
    • 태국
    • 유럽
    • 일본
    • 필리핀
    • 미국
    • 중국
    • 기타여행
    • 싱가폴
  • 건강
    • 다이어트
    • 당뇨
    • 헬스
    • 건강음식
    • 건강기타
  • 컴퓨터
    • 프로그램 개발일반
    • C언어
    • 비주얼베이직
  • 결혼생활
    • 출산/육아
    • 결혼준비
    • 엄마이야기방
  • 일상생활
    • 면접
    • 취업
    • 진로선택
  • 교육
    • 교육일반
    • 아이교육
    • 토익
    • 해외연수
    • 영어
  • 취미생활
    • 음악
    • 자전거
    • 수영
    • 바이크
    • 축구
  • 기타
    • 강아지
    • 제주도여행
    • 국내여행
    • 기타일상
    • 애플
    • 휴대폰관련
  • 프로그램 개발일반
  • C언어
  • 비주얼베이직

Spring 프레임 웍 오류 질문입니다.

너만을

2023.04.01

URL에 http://localhost:8080/DxPress/json.dmi 입력했을때의 오류 입니다.

오류내용입니다.

컨트롤러 입니다.

web.xml 입니다.

?xml version=1.0 encoding=UTF-8?
web-app id=WebApp_ID version=2.4 xmlns=http://java.sun.com/xml/ns/j2ee xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance xsi:schemaLocation=http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd

display-nameDxPress/display-name

!-- Spring Context definition --
context-param
param-namecontextConfigLocation/param-name
param-valueclasspath:/config/spring/context/*.xml/param-value
/context-param

!-- encoding filter --
filter
filter-nameencodingFilter/filter-name
filter-classorg.springframework.web.filter.CharacterEncodingFilter/filter-class
init-param
param-nameencoding/param-name
param-valueUTF-8/param-value
/init-param
/filter
filter-mapping
filter-nameencodingFilter/filter-name
url-pattern/*/url-pattern
/filter-mapping

!-- Spring Context listener --
listener
listener-classorg.springframework.web.context.ContextLoaderListener/listener-class
/listener
!-- servlet
servlet-namecontext/servlet-name
servlet-classorg.springframework.web.context.ContextLoaderServlet/servlet-class
load-on-startup1/load-on-startup
/servlet --
!-- Handles all requests into the application --
servlet
servlet-namespring/servlet-name
servlet-classorg.springframework.web.servlet.DispatcherServlet/servlet-class
init-param
param-namecontextConfigLocation/param-name
param-valueclasspath:/config/spring/common/*.xml/param-value
/init-param
load-on-startup2/load-on-startup
/servlet

!-- Log4j Context definition --
context-param
param-namelog4jConfigLocation/param-name
param-valueclasspath:/config/log4j/log4j.xml/param-value
/context-param
!-- Log4j Context listener --
listener
listener-classorg.springframework.web.util.Log4jConfigListener/listener-class
/listener

servlet-mapping
servlet-namespring/servlet-name
url-pattern*.dmi/url-pattern
/servlet-mapping
servlet-mapping
servlet-namespring/servlet-name
url-pattern/DxPress/*/url-pattern
/servlet-mapping
!-- Maps all requests to the DispatcherServlet for handling --
servlet-mapping
servlet-namespring/servlet-name
url-pattern//url-pattern
/servlet-mapping

welcome-file-list
welcome-file/index.html/welcome-file
/welcome-file-list
/web-app

마지막으로 디스펫처서블릿에 파람으로 주입되는 설정 파일입니다.
파일명 :/config/spring/common/common-servlet.xml

?xml version=1.0 encoding=UTF-8?
beans xmlns=http://www.springframework.org/schema/beans
xmlns:p=http://www.springframework.org/schema/p
xmlns:context=http://www.springframework.org/schema/context
xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance
xmlns:mvc=http://www.springframework.org/schema/mvc
xmlns:tx=http://www.springframework.org/schema/tx
xmlns:jdbc=http://www.springframework.org/schema/jdbc
xsi:schemaLocation=http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
http://www.springframework.org/schema/context
http://www.springframework.org/schema/context/spring-context-3.0.xsd
http://www.springframework.org/schema/jdbc
http://www.springframework.org/schema/jdbc/spring-jdbc-3.0.xsd
http://www.springframework.org/schema/tx
http://www.springframework.org/schema/tx/spring-tx-3.0.xsd
http://www.springframework.org/schema/mvc
http://www.springframework.org/schema/mvc/spring-mvc-3.0.xsd
!-- controller init bind --
bean id=conversionService class=org.springframework.format.support.FormattingConversionServiceFactoryBean/
!-- mapping url & view --
bean it;bean id=viewNameTranslator class=org.springframework.web.servlet.view.DefaultRequestToViewNameTranslator /
!-- @MVC & binding convert --
mvc:annotation-driven conversion-service=conversionService /
!-- component scan (Controller) --
context:component-scan base-package=com.onnet21.dmi.test.controller
context:include-filter type=annotation expression=org.springframework.stereotype.Controller /
/context:component-scan
!-- component scan (Service) --
context:component-scan base-package=com.onnet21.dmi.test.service
context:include-filter type=annotation expression=org.springframework.stereotype.Service /
/context:component-scan
!-- component scan (Dao) --
context:component-scan base-package=com.onnet21.dmi.test.dao
context:include-filter type=annotation expression=org.springframework.stereotype.Repository /
/context:component-scan
bean class=org.springframework.web.servlet.view.ContentNegotiatingViewResolver
property name=viewResolvers
list
bean class=org.springframework.web.servlet.view.BeanNameViewResolver /
bean class=org.springframework.web.servlet.view.InternalResourceViewResolver
property name=prefix value=/WEB-INF/test/ /
property name=suffix value=.jsp /
/bean
/list
/property
/bean
/beans

일단 URL 을 치고 들어갔을 때 이크립스 콘솔에서 get이 뜨는걸로 봐서는 접근은 되는데 그 다음에 모델엔 뷰로 리턴하면서 오류가 나는거 같습니다.
모델엔 뷰에 json 이라는 이름을 줬고, WEB-INF/test/json.jsp 파일이 존재 합니다.
어디가 문제인지 도통 모르겠습니다.

주의!!! : 일단 저 프로젝트는 다른피씨에서 동작되던 것인데 제가 제 이클립스에 임폴트 하고 난뒤에 발생한 문제입니다. 저 프로젝트는 jdk1.5, tomcat5 바탕으로 개발된 것입니다.
저는 jdk1.6과 톰캣6를 쓰고 있었지만, 추가로 jdk1.5를 설치해서 이클립스에 기본 컴파일러로 설정하고 톰캣5도 설치했습니다. 그 결과 프로젝트 상에 오류는 다 사라졌습니다.
하지만 서블릿 스펙에서 뭐가 문제가 발생하는지
listener
listener-classorg.springframework.web.context.ContextLoaderListener/listener-class
/listener
이녀석이 됬다가 안됬다가 하는 듯 합니다.

신청하기





COMMENT

댓글을 입력해주세요. 비속어와 욕설은 삼가해주세요.

  • 푸른들

    서블릿 맵핑 설정을 다했고 저 프로젝트가 전 피씨에선 돌아가던건데 제 노트북에 import 하니깐 저런 문제가 발생하네요 이유를 몰라 아주 환장 하겠습니다 ㅠㅠ

  • SchokoHolic

    spring을 잘 모릅니다만 에러 로그만 봐서는 서블릿 이름이 문제가 있다고 보여집니다. -ㅁ-;

번호 제 목 글쓴이 날짜
2701397 세로 100% 푸터부분이 바닥에 안붙어요(세로 100% 되는 소스를 썼거든요) 꽃겨울 2025-07-13
2701369 [긴급]로드해온 swf가 갑자기 사라지는 현상..(익스10) (2) 곰돌이 2025-07-13
2701340 [c++]학교 과제 질문이요...... (3) 기쁨해 2025-07-13
2701311 구글 뉴스검색최적화 작업은 누구의 영역인가요? 많은 조언 부탁드려요! 리나 2025-07-13
2701285 아이폰이나 안드로이드 폰 인터넷으로 볼때 배꽃 2025-07-12
2701230 테마 설정하면 밑에 뜨는 글 삭제 (1) 창의적 2025-07-12
2701177 css적용이 안되요~ (6) 다니엘 2025-07-11
2701151 사이트작업시 inputbox 가 readonly 형태표시 어떻게 하시나요? (1) 찬내 2025-07-11
2701123 간단한 select 질문입니다 (3) 천사의눈물 2025-07-11
2701061 비베질문.. 똘끼 2025-07-10
2701034 메일폼 내 script 삽입가능한 방법 없을까요.. (2) 마음새 2025-07-10
2701008 분명히 버튼을 만들었는데 액션이 안걸립니다. (3) 재찬 2025-07-10
2700923 전체중앙정렬&독타입&쿼크모드 ㅜㅠ (8) 푸른들 2025-07-09
2700893 질문드리겠습니다. 도도한 2025-07-09
2700793 무비클립에 마우스 오버시 랜덤으로 효과음 나기는 어떻게 ;; (1) 바닐라 2025-07-08
2700741 웹전송? (2) 연와인 2025-07-07
2700686 카테고리 호버시 세부카테고리 보이게하는 것, css로만 가능할까요?? (3) 다힘 2025-07-07
2700658 메타태그 질문드립니다..ㅠㅠ;;; 모해 2025-07-07
2700632 외부에서 이미지 파일을 불러와야 합니다. 도와주세요. (4) 에일린 2025-07-06
2700579 (air + as3) smtp 이용해서 첨부파일 포함해서 메일 보내기 물보라 2025-07-06
<<  이전  1 2 3 4 5 6 7 8 9 10  다음  >>

수다닷컴 | 여러분과 함께하는 수다토크 커뮤니티 수다닷컴에 오신것을 환영합니다.
사업자등록번호 : 117-07-92748 상호 : 진달래여행사 대표자 : 명현재 서울시 강서구 방화동 890번지 푸르지오 107동 306호
copyright 2011 게시글 삭제 및 기타 문의 : clairacademy@naver.com