I am puzzled by the 3 different ways of instantiating a bean in a JSP page
using JRun under NT4.
I have managed to get a Hello World bean to work using a <BEAN...> tag and a
<USEBEAN...> tag but cannot get <jsp:useBean...> to work.
My code is as follows:
<jsp:useBean id="hello" class="HelloBean.HelloBean"/>
<HTML>
<HEAD><TITLE>Hello</TITLE></HEAD>
<BODY>
<H1>
<% hello.setName("Chris") %>
Hello,
<%= hello.getName() %>
</H1>
</BODY>
</HTML>
The bean code is:
package HelloBean;
public class HelloBean {
private String name = "";
public void setName(String name) {
this.name = name;
}
public String getName() {
return name;
}
}
The package is located under the JRun/jsm-default/classes directory.
What have I missed?
===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
FAQs on JSP can be found at:
http://java.sun.com/products/jsp/faq.html
http://www.esperanto.org.nz/jsp/jspfaq.html