Logo 
Search:

Java Forum

Ask Question   UnAnswered
Home » Forum » Java       RSS Feeds

Regarding JSTL

  Asked By: Lucina    Date: Jun 05    Category: Java    Views: 530
  

I am currently working with JSTL and EL. I need to know how to pass the
session variable that is been retrieved in a JSP
page..and that variable should be passed into the JSTL tag...

The following is the sample code
----------------------------------------------------------------------------
------------------
<%

String[] headerInfo=(String[])session.getAttribute("header");

java.util.ArrayList content=(ArrayList)session.getAttribute("content");

%>

<c:forEach var="head" items="${headerInfo}">

<c:out value="${head}"/>

</c:forEach>

----------------------------------------------------------------------------
------------------

Now in that.....the headerInfo is the varaible that im retriving from the
session.

Now i have to run into that and need to print what is there in...like

For example...we use to do like this in JSP

for(int i=0;i<headerInfo.length;i++){

headerInfo[i];

}

Share: 

 

No Answers Found. Be the First, To Post Answer.

 
Didn't find what you were looking for? Find more on Regarding JSTL Or get search suggestion and latest updates.




Tagged: