web inf不包含带有.class文件的目录类

ut6juiuv  于 2021-06-29  发布在  Java
关注(0)|答案(0)|浏览(153)

当我在tomcat服务器上运行java web应用程序eclipse workspace.metadata.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps\provausebean2\web inf时,它不包含必须包含我在index.jsp中使用的所有BeanClass的目录类
我的项目结构
我的索引.jsp:

<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1"%>
<jsp:useBean id="classBean" scope="request" class="logic.bean.ClassBean"/>
<!DOCTYPE html>
<html>
<head>
<meta charset="ISO-8859-1">
<title>Insert title here</title>
</head>
<body>

</body>
</html>

我的同学:

package logic.bean;

public class ClassBean {

    private String myAttr;

    public void setMyAttr(String s) {
        myAttr = s;
    }

    public String getMyAttr(String s) {
        return myAttr;
    }
}

在tomcatserver上运行时,收到以下错误:

org.apache.jasper.JasperException: /index.jsp (line: [3], column: [0]) The value for the useBean class attribute [logic.bean.ClassBean] is invalid.

暂无答案!

目前还没有任何答案,快来回答吧!

相关问题