DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

+ Reply to Thread
Results 1 to 2 of 2
  1. #1
    tyris Guest

    need some advice for a good methodology to build my application


    hi all,

    I'm making my first web app under websphere + visual age.
    my web app is really simple : i have currencies and i must update the
    currency change rate each month. so i have 2 specific functions in my
    servlet :

    - search function: search for the good currency in the database
    - apply function : apply the changes and refresh the web page with the new
    values.

    I've done almost all work except something.
    here is my question : i don't know what is the best way to do, maybe you

    could help me :

    when I've executed the search function, how should i load the results of

    my search in the web page ?
    should i use variables in the jsp, call the search function in my servlet

    , put the values found in the variables of the jsp and then call the jsp

    to be refreshed from the servlet with the variables ? or is there a
    "cleaner" method to do ?

    I'm sorry for my coarse English,
    regards,
    Elise


  2. #2
    hualu Guest

    Re: need some advice for a good methodology to build my application


    Elise,
    a standard way (MVC) to solve your problem is that:
    put your currency value in a javaBean (Model). The JavaBean can be stored
    in HTTP Session. Your JSP (View) can use the javaBean to display the new
    currency value.

    Hua LU



    "tyris" <kea@mailcity.com> wrote:
    >
    >hi all,
    >
    >I'm making my first web app under websphere + visual age.
    >my web app is really simple : i have currencies and i must update the
    >currency change rate each month. so i have 2 specific functions in my
    >servlet :
    >
    >- search function: search for the good currency in the database
    >- apply function : apply the changes and refresh the web page with the new
    >values.
    >
    >I've done almost all work except something.
    >here is my question : i don't know what is the best way to do, maybe you
    >
    >could help me :
    >
    >when I've executed the search function, how should i load the results of
    >
    >my search in the web page ?
    >should i use variables in the jsp, call the search function in my servlet
    >
    >, put the values found in the variables of the jsp and then call the jsp
    >
    >to be refreshed from the servlet with the variables ? or is there a
    >"cleaner" method to do ?
    >
    >I'm sorry for my coarse English,
    >regards,
    >Elise
    >



Bookmarks

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


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


Sponsored Links