First javabean

zhaozj2021-02-16  65

After configuring the environment (see: http://blog.9cbs.net/kingapex1/Archive/2004/07/15/42050.aspx)

Built as follows to store JavaBean's Class: D: / jsgtest / web-inf / class / count

Count is Class to PackPage Package

Built in the count directory man.java:

Package count;

Public class man {

PRIVATE STRING NAME;

Public Man () {this.name = "kingapex";} public void setname (string aname) {this.name = aname;

Public string getname () {return this.name;

}

Compiling man.java

At D: / JSGTEST / Jian AMAN.JSP:

<% out.println (Abean.getname ());%>

Test path:

http: // localhost: 8080 / myjsp / aman.jsp

转载请注明原文地址:https://www.9cbs.com/read-16038.html

New Post(0)