How to use bean in JSP with only <jsp:useBean>
, not MVC?
Assume you have a grade.txt
file which contains following data:
Tom 90 Jerry 70 Katy 80 John 60
It asks you to create a bean named grade.java
, a JSP page named graderesult.jsp
, and a html page named gradecheck.html
.
gradecheck.html
provides a input textbox and a button submit, once you submit the name of the student, the graderesult.jsp
will communicates with bean to show the name and the score corresponding to the person.