JSP / Java / Tomcat | <jsp:inlude>未找到类

时间:2016-04-12 08:17:05

标签: java jsp tomcat

我在运行我的网络应用程序时创建了一个Tomcat服务器。

在我的源代码中,我有这一行:

<jsp:include page="jspinclude/form.jsp"/>

当我启动服务器时,它给出了错误:

java.lang.ClassNotFoundException: org.apache.jsp.jspinclude.form_jsp
java.net.URLClassLoader.findClass(URLClassLoader.java:381)

为什么会这样?

我的项目结构看起来非常好。

如何编译这个jsp文件?/它是否已安装在服务器上?

如果需要更多信息,请发表评论! :)

2 个答案:

答案 0 :(得分:1)

也许你的jsp命名空间存在某种冲突。

尝试使用if ($this->upload->do_upload()) { $data = $this->upload->data(); echo $data['file_name']; // Here is the encrypted filename }

包含您的jsp文件

答案 1 :(得分:0)

您必须输入:

function ajax_runs3(value){
    var ajaxRequest;  // The variable that makes Ajax possible!
    try{
        ajaxRequest = new XMLHttpRequest();
    } catch (e){
        // Internet Explorer Browsers
        try{
            ajaxRequest = new ActiveXObject("Msxml2.XMLHTTP");
        } catch (e) {
            try{
                ajaxRequest = new ActiveXObject("Microsoft.XMLHTTP");
            } catch (e){
                // Something went wrong
                alert("Your browser broke!");
                return false;
            }
        }
    }
    ajaxRequest.onreadystatechange = function(){
        if(ajaxRequest.readyState == 4){
            document.myForm.time.value = ajaxRequest.responseText;
        }
    }

    var runs3= value;
    //ajaxRequest.open("POST","runs3.php"+ runs3, true);
   // ajaxRequest.send(null); 

    var url = "runs3.php";
    var params = "runs3="+value;
    ajaxRequest.open("POST", url, true);

    //Send the proper header information along with the request
    ajaxRequest.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
    ajaxRequest.setRequestHeader("Content-length", params.length);
    ajaxRequest.setRequestHeader("Connection", "close");

    ajaxRequest.onreadystatechange = function() {//Call a function when the state changes.
        if(ajaxRequest.readyState == 4 && ajaxRequest.status == 200) {
            alert(ajaxRequest.responseText);
        }
    }
    ajaxRequest.send(params);
}

阅读官方参考文件:https://docs.oracle.com/javaee/5/tutorial/doc/bnajb.html