jsp property methods
Is it nessasary to use jsp set and get property methods to access the attribute
of the fields in the html page.
Re: jsp property methods
No, you can use any class, javabean, servlet, etc. - you don't have to use
a javabean. For example:
<%@ page import="CalcClass" session="true" %>
<jsp:useBean id="calcClass" class="CalcClass" scope="page" />
<%=calcClass.calcInterest(%><Input name="total"><%) %>
This bean calls a class method from the class "CalcClass", which calculates
interest on an amount entered by the user. Of course, the value would have
to be parsed to an integer from a string to work. The point is that you can
use the full power of java when using jsp - that's the beauty of it! And
it will work anywhere! Since I've been programming jsp I've found it to be
so much more powerful, but much harder/longer to code than asp. I don't want
to go off on another tangent, so if you have any questions you can email
me. Hope it helped.
"christy" <firstname.lastname@example.org> wrote:
>Is it nessasary to use jsp set and get property methods to access the attribute
>of the fields in the html page.
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL