This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes JSP and the fly likes jspx file not working with foreach Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » JSP
Bookmark "jspx file not working with foreach" Watch "jspx file not working with foreach" New topic
Author

jspx file not working with foreach

Klament J. Kruoghst
Ranch Hand

Joined: Oct 24, 2008
Posts: 35
Hi, I've been working with jspx all day and everything worked fine until I used the foreach. So I copied a simple example online to make sure it worked and it isn't. The code is OK because I runned it in another server and it worked fine, mine doesn't display the values in the iteration, it is just blank.

Here's the code:


This is what I see in the source code:


I just wanted you to notice that the values are empty, nothing is displayed inside the <LI> as it's supposed to. What should I change to make in my computer? I'm using Apache 5.5 and its runtime. (I have java 1.6 but I believe the project is running with apache's JRE)
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60794
    
  65

Why are you using the jspx JSP document format? That format is intended as an intermediary format for containers and for JSPs that are auto-generated by software by serializing a DOM. It is not intended for hand-coding. The markup requirements are just too stringent and you spend more time fighting the markup than in getting things done. And then, the final product is so wordy that the meaning of the JSP is lost in the markup.

I strongly suggest just using the JSP page format as it is intended.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Klament J. Kruoghst
Ranch Hand

Joined: Oct 24, 2008
Posts: 35
Thanks for your response.
I had to move on so i did it in JSP (and obviously works) but I still need to make it work on jspx because that's the one we're using so I'm not allowed and... well, all I want is to make it work independent of the reason, but thanks for the comment.

I'm just stumped as to why it doesn't work on my and it does on the other. Plus I'd learn more about compatibility issues.
 
 
subject: jspx file not working with foreach
 
Similar Threads
Navigation Problem
JSTL not working
Targeting only GET variables using paramValues
getElementsByTagName from nested list
Including JSPX in other JSPX