JSP Hosting

HostingServicesSupportOrderAbout UsSoftwareHome

Even experts read the manuals. Our tech support staff has most of the books that are out on a wide variety of web topics. Here are some of their top picks. We think you'll find them useful and informative as well.

JSPs With Beans

Beans let you include more complex functions in your pages without having to clutter up your HTML with lots of code. The Beans referred to with regard to JSPs are different from either the JavaBeans used with IDEs or Enterprise JavaBeans (EJBs), but they serve the same basic purpose -- making complex functions easy to access and reuse.

Bean classes have set and get methods which let JSPs access properties. Beans can be instantiated and the properties can then be called from within the JSP. For example, if you had a bean class with a property called color, you could use the following JSP code to instantiate the bean and set the value of the property color.

<jsp:useBean name="colorBean1" class="ColorBean" />
<jsp:setProperty name="colorBean1" property="color" value="red" />

Once set, the property color can also be read from the bean using the getProperty method:

The color is: <jsp:getProperty name="colorBean1" property="color" />


JSP Examples


Note: MMA technical support staff cannot provide troubleshooting of problems with third-party CGI scripts including but not limited to: Perl scripts, C/C++ binaries, PHP or web/database integration unless these services are specifically contracted. For these services, please see our Quote Request Form.

Copyright © 1995-2012
Motivational Marketing Associates, LLC
All Rights Reserved.