我有2个班级:
1.Doctor:代表医生对象
2.Test:doctor.setTText(msg),这在Doctor
中设置了一条消息医生:
public class Doctor{
public String message;
public void setText(String s){
message=s;
//somehow set it also in the JSP
}
测试
Doctor doctor = new Doctor();
public void showMsg(final String msg) {
doctor.setTText(msg);
}
我有一个基本上是空的单独的JSP文件。我想以某种方式在JSP中打印Doctor的值。我怎么能这样做?