wood burning stoves 2.0*
The moose likes Struts and the fly likes jsp with logic:iterate and logic:lessThan Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Frameworks » Struts
Reply locked New topic
Author

jsp with logic:iterate and logic:lessThan

albert kao
Ranch Hand

Joined: Feb 04, 2010
Posts: 245
I am writing jsp page with Struts 1 which has the following requirements.
Option 1
Display "Owner" only once.
Display "X.jsp" after "Owner".

Option 2
Display "Owner1", "Owner2", to "Owner5"
Display "X.jsp" after "Owner1" and "Owner2"

Option 3
Display "Owner1", "Owner2", to "Owner5"
Display "X.jsp" after "Owner1" only

Option 4
Display "Owner1", "Owner2", to "Owner5"
Display "X.jsp" after "Owner1" only

The following code works for "Option" equal to 3 and 4.
How to modify it to work for all options (from 1 to 4)?
 
Consider Paul's rocket mass heater.
 
subject: jsp with logic:iterate and logic:lessThan
 
Similar Threads
Help Please?
problem laying out element of ordered list with logic iterate
Logic:iterate + Indexed property issue
Doubt about JWeb+ mock exam question
EL question from Jdiscuss