2009년 11월 27일 금요일

struts2 관련 사이트

taglib reference

http://struts.apache.org/2.0.14/docs/tag-reference.html

 

strut2 tutorial

http://www.roseindia.net/struts/struts2/struts2uitags/index.shtml

 

2009년 11월 25일 수요일

The method getJspApplicationContext(ServletContext) is undefined for the type JspFactory

HTTP Status 500 -


type Exception report

message

description The server encountered an internal error () that prevented it from fulfilling this request.

exception

org.apache.jasper.JasperException: Unable to compile class for JSP: 

An error occurred at line: 22 in the generated java file
The method getJspApplicationContext(ServletContext) is undefined for the type JspFactory

Stacktrace:
        org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:92)
        org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:330)
        org.apache.jasper.compiler.JDTCompiler.generateClass(JDTCompiler.java:423)
        org.apache.jasper.compiler.Compiler.compile(Compiler.java:308)
        org.apache.jasper.compiler.Compiler.compile(Compiler.java:286)
        org.apache.jasper.compiler.Compiler.compile(Compiler.java:273)
        org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:566)
        org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:317)
        org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:320)
        org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266)
        javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
        netville.servlet.filter.EncodingFilter.doFilter(EncodingFilter.java:53)

note The full stack trace of the root cause is available in the Apache Tomcat/6.0.14 logs.

 

 

톰켓6.0 내부($JAKARTA_HOME$/lib)에 자체적으로 servlet-api.jar과 jsp-api.jar를 포함하고 있다.

 

 

그런데 이클립스 프로젝트의 확장 jar 중에 위에 해당하는 jar가 있거나

WEB-INF/lib 폴더에 위 jar가 포함된경우 기존 jar와 충돌이 나면서 나는 에러이다

 

해결법은 간단하게 해당 jar(servlet-api.jar과 jsp-api.jar)를 lib폴더에서 삭제하고

이클립스에서는 해당 jar를 포함을 하되 배포시에 외부로 해당 jar를 배포 못하게 하면 된다.