I need the guideline on how to manage data transfer between JSP and action
class. I am using delegate in Action class to get an list of object from the
server and I have to process then display that list in JSP. 

Right now I am getting that list as object from server in action class, put
it in request object and write scripplets in JSP to process the list in the
request object then display it. 

I don't think it is good practice to put scripplets in JSP. I am not sure
where to put those processing part in different class or in Action class
itself or its ok in JSP itself. 

It will be great if anyone can show me with an example to write the code in
manageable way. 

General implementation what I have right now is: 

Action class 
Delegate delegateObject;
resultList = delegateObject.getResult();
request.setAttribute("result",resultList);

JSP
<%
   result = request.getAttribute("result");
   for(loop){
     //Loop to result and display using html tags.
     //e.g. <TD><%= someField %> </TD>
   }
%>

Thanks in advance
-- 
View this message in context: 
http://old.nabble.com/Managing-code-between-Action-Class-and-JSP.-tp29648186p29648186.html
Sent from the Struts - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org

Reply via email to