0

我正在使用 org.oracle.httpclient 包 4.1.3 和 httpcore 4.1.4。

但是当我执行我的程序时,我收到以下错误:

org.apache.jasper.JasperException: An exception occurred processing JSP page /sendsms.jsp at line 15

12: String mobNo = request.getParameter("mobile");
13: String message = request.getParameter("msg");
14: SendSMS httpsms = new SendSMS();
15: int sendsms = httpsms.SendSMS(mobNo,message);
16: 
17: if(sendsms==1){
18: %>


Stacktrace:
    org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:524)
    org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:417)
    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)


root cause 

javax.servlet.ServletException: java.lang.NoClassDefFoundError: org/apache/http/auth/AuthSchemeFactory
    org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:850)
    org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:779)
    org.apache.jsp.sendsms_jsp._jspService(sendsms_jsp.java:88)
    org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
    org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:393)
    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)


root cause 

java.lang.NoClassDefFoundError: org/apache/http/auth/AuthSchemeFactory
    com.sms.model.dao.SendSMS.SendSMS(SendSMS.java:40)
    org.apache.jsp.sendsms_jsp._jspService(sendsms_jsp.java:67)
    org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
    org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:393)
    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)

我还检查了包,并且包中存在该类。请帮我做什么。

4

1 回答 1

1

在您的 Java Web 应用程序中,应该有一个WEB-INF文件夹。如果该文件夹不包含lib文件夹,请创建一个并将您的 jars 添加到其中。

否则,Tomcat 应用程序启动器不会将您的 jars 添加到类路径中。

于 2013-09-02T12:08:50.160 回答