'에러'에 해당되는 글 3건

  1. 2020.12.15 이클립스 톰캣 관련 에러 (The Tomcat server configuration at ........) 8
  2. 2019.08.20 스프링 에러 - Request method 'POST' not supported 3
  3. 2019.05.27 Spring 에러 (The origin server did not find a current representation for the target resource or is not willing to disclose that one exists)

이클립스 톰캣 관련 에러 (The Tomcat server configuration at ........)

Back-End/Problems 2020. 12. 15. 06:30
728x90
반응형


에러 내용 : The Tomcat server configuration at ..... localhost-config is missing Check the server for errors.


- 해결방법 -


이클립스 실행후 하단에 있는 Server -> Tomcatv9.0 Server at localhost 오른쪽 마우스 클릭 -> delete -> 이클립스 재실행 -> tomcat 다시 추가



728x90
반응형
:

스프링 에러 - Request method 'POST' not supported

Back-End/Problems 2019. 8. 20. 11:29
728x90
반응형

에러 내용

 

11:20:35.291 [http-nio-8090-exec-8] WARN [org.springframework.web.servlet.mvc.support.DefaultHandlerExceptionResolver.logException:194]-

 

Resolved [org.springframework.web.HttpRequestMethodNotSupportedException: Request method 'POST' not supported]

 

 

 

스프링에서 컨트롤러로 맵핑할때 컨트롤러에 method방식을 명시해놓고, 그 방식으로 자료를 보내지 않으면 해당 에러를 발생시킨다.

 

이런 에러가 발생했을시에는 아래와 같이 post방식을 지원할 수 있도록 컨트롤러에 해당 메소드에 RequestMethod.POST 방식을 추가해주면 된다.

 

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
@RequestMapping(value = "/board/view.do", method= {RequestMethod.GET, RequestMethod.POST}) //POST방식으로도 맵핑할 수 있도록 코드를 추가하였다.
    public ModelAndView view(@RequestParam int member_bno,
            @RequestParam int curPage,
            @RequestParam String search_option,
            @RequestParam String keyword,
            HttpSession session) throws Exception{
        
        //조회수 증가 쿼리
        memberboardservice.increaseViewcnt(member_bno, session);
        
        ModelAndView mav = new ModelAndView();
        mav.setViewName("board/memberboardview");
        
        //view로 자료를 넘기기위해서 mav에 값들을 저장해서 view.jsp로 리턴시킨다.
        mav.addObject("dto", memberboardservice.read(member_bno)); //상세보기를 한번 클릭하면 조회수를 1증가시킨다.
        mav.addObject("curPage", curPage);
        mav.addObject("search_option", search_option);
        mav.addObject("keyword", keyword);
        
        return mav;     //view로 넘어가서 출력이 된다.
    }
cs

아래 책은 제가 공부할때 활용했던 책으로 추천드리는 책이니 한번씩 읽어보시는것을 추천드립니다!! ㅎㅎ

토비의 스프링 3.1 세트:스프링의 이해와 원리 + 스프링의 기술과, 에이콘출판

이 포스팅은 쿠팡 파트너스 활동의 일환으로, 이에 따른 일정액의 수수료를 제공받습니다.

 

728x90
반응형
:

Spring 에러 (The origin server did not find a current representation for the target resource or is not willing to disclose that one exists)

Back-End/Problems 2019. 5. 27. 23:09
728x90
반응형

에러내용


The origin server did not find a current representation for the target resource or is not willing to disclose that one exists.

(서버가 대상 자원을 찾지 못한다)



  

  원인 파악


  1. 실행할때 프로젝트를 누르고 서버를 돌려야됨 (학원에서는 jsp랑 자바파일로 돌림;; 집에서도 자바랑 jsp로 돌리면 실행이 안되었음)


  2. 집에서는 pom.xml 파일에 있는 mysql관련 코드를 다 없애버렸음 (mysql 드라이버를 사용할수 없다는 에러때문에)


  3. servlet-context 파일 수정


1
2
3
4
5
6
7
8
9
<beans:bean
        class="org.springframework.web.servlet.view.InternalResourceViewResolver">
        <beans:property name="prefix" value="/WEB-INF/views/" />
        <beans:property name="suffix" value=".jsp" />
    </beans:bean>
    <!-- 스프링 빈을 태그로 등록하지 않고 자동으로 검색(auto scan) --> 
    <context:component-scan base-package="com.example.spring01" /> //이쪽 코드 수정해야됨 *를 지우고 프로젝트명 다시 확인 (학원에서는 프로젝트를 다시 만든후에 하지 않았다.)
 
</beans:beans>
cs



 (추가)

 4. 빌드 에러가 발생해서 에러가 발생하였음... (빌드 에러는 파일을 업데이트할때 발생한다고 함..)

     (아래 처럼 프로젝트를 강제 업데이트 하여서 해결하였다.)






728x90
반응형
: