Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

need some advice for a good methodology to build my application

Status
Not open for further replies.

tyris

Programmer
Nov 2, 2000
311
FR
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,
Best regards X-),
Elise
 
well i've made the choice to create an object and to forward it to the jsp this way :


request.setAttribute("responseObj",myResp);
RequestDispatcher dispatcher = getServletContext ().getRequestDispatcher("/myWebApp/myJSP.jsp");
try { dispatcher.forward(request,response); }
catch(ServletException se) { System.out.println("servlet exception : " + se.getMessage()); }
catch(IOException io) { System.out.println("IO exception : " + io.getMessage()); }
Best regards X-),
Elise
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top