Jsp code
Using a JavaBean
Using a JavaBean
<% beans.Test1 messager = new beans.Test1("message from"); %>
The message is: <%= messager.msg() %>
Test1.java
package beans;
public class Test1
{
String msg;
public Test1(String message)
{
msg = message;
}
public String msg() {
return msg;
}
}