aspose file tools*
The moose likes JSP and the fly likes Question on  using <c:set > within <c:forEach> Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSP
Bookmark "Question on  using <c:set > within <c:forEach>" Watch "Question on  using <c:set > within <c:forEach>" New topic
Author

Question on using <c:set > within <c:forEach>

Meera Pallath
Ranch Hand

Joined: Feb 13, 2008
Posts: 56
I have a sessionScope List named Employees. I am setting the value of field "related "as shown below. Within the loop
when I alert the value of "related", I get the correct value "1" back. But outside the loop the value is still "0" which is the default value.
So basically whatever value I am setting is not reflected. What am I doing wrong?

I need to to retrieve the value of "related" from a different page. When I retrieve the Employees list from sessionScope in a different page, for this particular employee
the value I am getting is "0"

Please help !

Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61226
    
  66

Please be sure to use code tags when posting code to the forums. Unformatted code is extremely hard to read and many people that might be able to help you will just move along to posts that are easier to read. Please read this for more information.

You can go back and change your post to add code tags by clicking the button on your post.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Meera Pallath
Ranch Hand

Joined: Feb 13, 2008
Posts: 56
Bear Bibeault wrote:Please be sure to use code tags when posting code to the forums. Unformatted code is extremely hard to read and many people that might be able to help you will just move along to posts that are easier to read. Please read this for more information.

You can go back and change your post to add code tags by clicking the button on your post.



Sorry about that. I updated the post as suggested
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61226
    
  66

Well, the purpose of using the code tags is that the natural indentation of your code can be seen. Is that really the way you indent your code?
Meera Pallath
Ranch Hand

Joined: Feb 13, 2008
Posts: 56
Bear Bibeault wrote:Well, the purpose of using the code tags is that the natural indentation of your code can be seen. Is that really the way you indent your code?


I tried to edit and correct the indentation. It is not coming out quite as I intended to.
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61226
    
  66

Avoid tabs.
Meera Pallath
Ranch Hand

Joined: Feb 13, 2008
Posts: 56
Bear Bibeault wrote:Avoid tabs.

OK ...
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61226
    
  66

I fixed up the formatting a bit, but with the tabs it's difficult. You should replace them with all spaces.
Meera Pallath
Ranch Hand

Joined: Feb 13, 2008
Posts: 56
Bear Bibeault wrote:I fixed up the formatting a bit, but with the tabs it's difficult. You should replace them with all spaces.


OK...Removed the tabs.
Meera Pallath
Ranch Hand

Joined: Feb 13, 2008
Posts: 56
Please help!!!
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: Question on using <c:set > within <c:forEach>