jsp property methods


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 2 of 2

Thread: jsp property methods

  1. #1
    christy Guest

    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.
    thanks
    CHRISTY

  2. #2
    tagreid Guest

    Re: jsp property methods


    Christy,

    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" />
    <HTML>
    <BODY>
    Interest:
    <%=calcClass.calcInterest(%><Input name="total"><%) %>
    </BODY>
    </HTML>

    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.

    Reid
    tagreid@hotmail.com

    "christy" <mathewscm@yahoo.com> wrote:
    >
    >Is it nessasary to use jsp set and get property methods to access the attribute
    >of the fields in the html page.
    >thanks
    >CHRISTY



Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center