Я только начал изучать JSP, и хорошо, если есть один файл JSP.
Я создаю файл класса для тестирования JavaBeans и всегда получаю сообщение об ошибке «Невозможно скомпилировать класс для JSP» и в Интернетестатус 500.
org.apache.jasper.JasperException: Unable to compile class for JSP:
An error occurred at line: [9] in the jsp file: [/index.jsp]
person cannot be resolved to a type
---------------------------- The 'person'.class code ------------
import java.lang.*;
public class person {
private String name;
private int age;
private String sex;
public int getAge() {
return age;
}
public void setAge(int age) {
this.age = age;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getSex() {
return sex;
}
public void setSex(String sex) {
this.sex = sex;
}
------------------------- The JSP file -------------------------
<%@ page language="java" contentType="text/html; charset=utf-8" %>
<html>
<head>
<title>Java Bean Actions</title>
</head>
<body><br/>
<jsp:useBean id="person" class="person" scope="page"></jsp:useBean>
<jsp:setProperty name="person" property="*" />
1.Невозможно скомпилировать класс "персона"
2.person.class
3.Файл JSP