You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by suhas <su...@techmas.hcltech.com> on 2000/07/03 13:36:46 UTC

Question in struts

Hi ,

 I Was going through  "Forward into the Past! (or a brief history of Struts)" link at http://husted.com/about/struts/overview.htm

" In a database application, the business-logic beans might connect to and query the database and return the result set back to the action's servlet ... to be stored in a form bean ... and then displayed by the JSP. Neither the action's servlet nor the JSP need to know (or care) where the result set comes from. "

I'm writing following code in my OrderAction class . Delegation class actually returns me the value object . Then In Jsp page I was iterating over that valueObject ( is that what u talking as a form bean ???)  which I stored in the request scope ...  Can anyone tell me is this correct way or I'm missing something in this ??????

OrderView view[] = null ;
 try {

  OrderBusinessDelegation delegation = new OrderBusinessDelegation();
  view =  delegation.viewOrders(orderStatus);

 }catch(Exception  e) {
 }

 if( view != null) {
  request.setAttribute("view" , view);
 }

Suhas