How to call java bean from jsp

hi How to call a java bean from jsp page.. Is any other way to call javabean from jsp page apart from this sample code...<jsp:useBean id="obj" class="com.devsphere.articles.calltag.TestBean"/>thnx in advance
[249 byte] By [chithrakumara] at [2007-10-2 15:38:31]
# 1
HiU can use<% com.devsphere.articles.calltag.TestBean tb = new com.devsphere.articles.calltag.TestBean();%>and then use it.Better way is to use <jsp:useBan>HTHVJ
jain_vishal_aa at 2007-7-13 15:19:24 > top of Java-index,Java Essentials,New To Java...
# 2

If you also use servlets, you can attach beans to the request or session and use them directly in your JSP's. So if you do:

request.setAttribute("name", yourBean);

and then forward to a JSP, you can reference the bean like:

${requestScope.name}

gimbal2a at 2007-7-13 15:19:24 > top of Java-index,Java Essentials,New To Java...