• Post Reply Bookmark Topic Watch Topic
  • New Topic

Executing jstl forEach on consecutive pages not working  RSS feed

 
ec hurley
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have 3 JSP pages containing 1 JSTL c:forEach statement on each page.
Each statement takes a different session array list as input.
My problem is only the first page works. The second and 3rd pages do not display the output of the c:forEach.
What can I do?
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 66207
151
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You'll need to provide us with more information. Have you verified that the scoped variables exist in the session?
 
Vivek SharmaJi
Ranch Hand
Posts: 38
Eclipse IDE Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please check if following import is on each page and your application is able to find jstl tag lib.

<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
 
ec hurley
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I solved my own problem by setting request attribute in servlet. I eliminated scriptlet code accessing session attributes.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!