This week's book giveaway is in the Jython/Python forum.
We're giving away four copies of Murach's Python Programming and have Michael Urban and Joel Murach on-line!
See this thread for details.
Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Servlet redirection  RSS feed

 
Sameer rathore
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can anybody help me in returning a list or array object from a servlet to JSP page ?
 
Madhu Kaparapu
Ranch Hand
Posts: 35
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Set your array list object to request object with a unique name as shown below. And using requestdispatcher you can forward this attribute (ie arraylist object) to desired jsp page. At jsp page your access that attribute and display the information.

request.setAttribute("arraylist",yourArrayListObject);
RequestDispatcher dispatcher = getServletContext().getRequestDispatcher(<<myPage.jsp>> ;
dispatcher.forward(request, response);
 
Sameer rathore
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for the support.because of this i have finished first module of my job.Thanks again.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!