2012/08/08

Tomcat JSP, java.lang.ClassNotFoundException

java.lang.ClassNotFoundException: org.apache.jsp.main_jsp
    at java.net.URLClassLoader$1.run(URLClassLoader.java:198)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:186)

org.apache.jasper.JasperException: /main.jsp(8,0) The value for the useBean class attribute xxx is invalid.

 

환경 : 기존 Resin 기반으로 개발된 Jsp 사이트를 Tomcat 기반으로 마이그레이션시 오류 발생

오류 :  Tomcat 에서 Jsp 코드내 선언된 Class 를 찾지 못함
          <jsp:useBean id="bbean" scope="request" class="xxx"  />

해결 :  Resin 에서는 WEB-INF\classes 내 클래스를 클래스 이름으로만으로도 참조가 가능하지만, Tomcat 에서는 패키지 이름까지 정확하게 지정을 해줘야 함. (Tomcat 5.5 기준)

 


댓글 없음:

댓글 쓰기

가장 많이 본 글