How to forward from Array List to Jsp in Struts
ActionServlet class?
Answers were Sorted based on User's Feedback
Answer / karnakar
in actin class take session object and add that object
(array list object)that is session.setAttribute("al",a)
and forawrd response to jsp ,read arraylist object in jsp
by using session.getAttribute("al");
| Is This Answer Correct ? | 9 Yes | 4 No |
Answer / karnakar
in actin class take session object and add that object
(array list object)that is session.setAttribute("al",a)
and forawrd response to jsp ,read arraylist object in jsp
by using session.getAttribute("al");
| Is This Answer Correct ? | 5 Yes | 3 No |
Answer / amit kumar
hi
i think make a bean of list with setter and getter
and use logic:iterate in jsp
in action
itemForm.setItems(itemDAO.searchRecord(itemId));
in jsp
<logic:iterate id="itembean" property="items" name="itemForm">
Item Id:
<bean:write name="itembean" property="itemId"/>
so on....
</logic:iterate>
| Is This Answer Correct ? | 4 Yes | 2 No |
Answer / ravikiran(aptech mumbai)
inaccordance with the scope of the bean set the attribute in
the particular scope
| Is This Answer Correct ? | 4 Yes | 4 No |
Answer / venkateshwararao
In action class take request object and add ArrayList object
to request by using request.setAttribute("arraylist"al);
and forward to jsp using ActionForward
af=mapping.findForward("name");
In the jsp we have retrieve by using core tag library or
struts tag library.
| Is This Answer Correct ? | 0 Yes | 0 No |
Answer / mahesh
by putting list object in request object u can pass it in
jsp
By
Mahesh
+919970564444
| Is This Answer Correct ? | 4 Yes | 5 No |
Answer / y
hi friends,
i think
by using return mapping.findForward("");
we can forward.
| Is This Answer Correct ? | 6 Yes | 10 No |
What are the ways in which duplicate form submission can occur?
What is struts framework?
What is the purpose of @before?
How can we integrate log4j in Struts2 application?
How can we upload files in Struts2 application?
how to connect from struts to database through hibernet and where u can modify the class
Can we write our own ActionServlet for front controller of Struts Applications?
what is struts? why Struts?
Is Struts Framework part of J2EE?
How client side validation is enabled on a jsp form?
What is the purpose of global-forwards tag in struct-config.xml?
Hi frnds Ima facing problm with tomcat configuration.kindly can any one tell to me what is the mistake iam doing.i already configured tomcat as fallowing http://www.ibm.com/developerworks/opensource/library/os-eclipse-tomcat/ even though iam getting the PortNO .and changed with different no of Ports but no working kindly can any one tell me what is the mistake iam doing........?