Tomcat 7의 최신 버전 (즉, 2011 년 1 월 16 일 기준 7.0.23)을 다운로드했습니다. 내 jakarta 태그 라이브러리 구성 요소 중 JSP로 작동하지 않는 것을 발견했습니다. 실패 지점은 모든 JSP에서 동일하고 일관 적입니다. 그것은태그 라이브러리에서 Tomcat 7.0.23이 작동하지 않습니다.
org.apache.taglibs.input.Select _jspx_th_input_005fselect_005f0 = (org.apache.taglibs.input.Select)_jsp_instancemanager.newInstance("org.apache.taglibs.input.Select", this.getClass().getClassLoader());
또한 내가 작동하는지 확인하기 위해 사용자 정의 태그를 썼습니다. 그 jsp에도 동일한 문제가있었습니다.
com.ah.util.customtags.SelectTag _jspx_th_hirezon_005fform_005fselect_005f0 = (com.ah.util.customtags.SelectTag)_jsp_instancemanager.newInstance("com.ah.util.customtags.SelectTag", this.getClass().getClassLoader());
는 JSP 코드는
<%@ page extends="com.ah.servlets.BaseJSPServlet"%>
<%@ taglib uri="/WEB-INF/hirezon_form.tld" prefix="hirezon_form" %>
<html>
<body>Test tags
<%
System.setProperty("org.apache.jasper.Constants.USE_INSTANCE_MANAGER_FOR_TAGS", "true");
%>
<hirezon_form:select count="100"/>
</body>
</html>
입니다 CustomTagSupport 클래스의 코드는
package com.ah.util.customtags;
import java.io.IOException;
import javax.servlet.jsp.JspException;
import javax.servlet.jsp.tagext.TagSupport;
public class SelectTag extends TagSupport {
String count;
public String getCount() {
return count;
}
public void setCount(String count) {
this.count = count;
}
public int doStartTag() throws JspException {
// This means the JSP must evaluate the contents of any CHild tags
// in this tag;
return EVAL_BODY_INCLUDE;
}
// This method is called when the JSP encounters the end of te tag
// implemented by this class
public int doEndTag() throws JspException {
String sum = "200000";
try {
pageContext.getOut().write("The Sum of first " + count + " numbers is " + sum);
} catch (IOException e) {
throw new JspException("Fatal Error: HelloTag could'nt write to the JSP out");
}
// This return type tells the JSP page to continue processing
// the rest of the page
return EVAL_PAGE;
}
}
입니다 톰캣 7.0.23에서 알려진 버그가 있습니까? 나는 많은 연구를했고 또한 USE_INSTANCE_MANAGER_FOR_TAGS 속성을 true로 설정하려고 시도했지만 여전히 동일한 오류가 발생합니다. 어떤 제안을 주셔서 감사합니다, 감사합니다