Tomcat Server下發布網頁錯誤及解決方法
1﹑tomcat5.5 中 JasperException: Failed to load or instantiate TagExtraInfo class:org.Apache.struts.taglib.html.MessagesTei
JasperException: FailedtoloadorinstantiateTagExtraInfo class: com.acme.tag.IterateTEI(
注意這里有可能是別的相近的提示。)
原因是 web-inf/lib/下出現了jsp-api.jar和,serverlet-api.jar,把它們刪除,然後重新啟動 web應用即可。
2﹑
HTTP Status 500 -
type
Exception report
message
description
The server encountered an internal error () that prevented it from fulfilling this request.
exception
javax.servlet.ServletException: org.w3c.dom.Node.getTextContent()Ljava/lang/String;
org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:825)
org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:758)
org.apache.jsp.login_jsp._jspService(login_jsp.java:318)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:324)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
javax.adore.ServletCofing.doFilter(ServletCofing.java:53)
root cause
java.lang.NoSuchMethodError: org.w3c.dom.Node.getTextContent()Ljava/lang/String;
com.pcc.afs.dao.sql.SQL.getSql(SQL.java:110)
com.pcc.afs.dao.sql.SQL.getSelect(SQL.java:62)
com.pcc.afs.dao.AllowIP.initialize(AllowIP.java:41)
com.pcc.afs.dao.AllowIP.<init>(AllowIP.java:19)
org.apache.jsp.login_jsp._jspService(login_jsp.java:128)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:324)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
javax.adore.ServletCofing.doFilter(ServletCofing.java:53)
note
The full stack trace of the root cause is available in the Apache Tomcat/5.0.28 logs.
這個錯誤﹐從網上搜索時﹐一般說是JDK版本問題﹐但我更新JDK(由1.5.0~1.5.0.06)還是報以上錯誤﹐后來我又更新了一下TOMCAT(由tomcat5.0.28更為5.5.9)問題解決。
在測試AJAX時也遇到過要更新TOMCAT的問題﹐所以個人覺得如果JDK用1.5﹐TOMCAT也應用5.5.X以上版本最為保險。