473,320 Members | 1,863 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

improving JSP logic

If I'm in the rwong newsgroup, please point me where to post

I'm plunging into the world of JSP development and I'm
wanting to improve on this type of [messy] logic:

<% int rowCount = 0; %>
<logic:iterate id="oi" name="myForm" property="stuff">
<% if (++rowCount % 2 == 0) { %>
<tr class=normalRow>
<% } else { %>
<tr class=altRow>
<% } %>
<td><bean:write name="oi" property="group3Name" /></td>
</tr>
</logic:iterate>

My attempts have been various incarnations (for the <tr>) of the
following, utilizing iterate's -indexId-:

<logic:notEmpty name="myForm" property="stuff">
<logic:iterate id="oi" name="myForm" property="stuff" indexId="index">
<tr class=<% (index.intValue()%2==0) ? "altRow" : "normalRow"; %>" >
<td><bean:write name="oi" property="group3Name" /></td>
</tr>
</logic:iterate>

Unfortunately, we arent using JSTL (and wont be), otherwise I
could use this fix:
http://cephas.net/blog/2004/02/25/js...ts_taglib.html

Any suggestions for improvement ?

Oct 7 '05 #1
1 1871

LinuxTester wrote:
If I'm in the rwong newsgroup, please point me where to post

I'm plunging into the world of JSP development and I'm
wanting to improve on this type of [messy] logic:


This was all server-side Java Server Pages.
You posted this in a client-side javascript group.

Try comp.lang.java groups thataway ==>

Oct 10 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Wensheng | last post by:
Hi, I wrote a small template engine called spytee. Like any template enigne, it take a text(html) template file as input, process the variable tags in the file, and display the resulted text. The...
1
by: Brian Basquille | last post by:
Hello all. Have been working on the Air Hockey game on and off for a couple of weeks now.. but have had plenty of other assignments to keep me busy along with it. But i would like some...
1
by: Robin | last post by:
For an asp.net project that is deployed to a load balanced web servers, are there any performance changes that can be made in .Net runtime or IIS 6? Also are there any additional tips for...
2
by: Irfan Akram | last post by:
Hi Guys, I am in search of some innovative ideas in improving the interface of Online Marking System. At the moment it has some good functionality, but lacks a professional interface. Is...
1
by: Larry Neylon | last post by:
Hi, I'm working on a VBScript application on IIS6 and I'm looking for some advice about the best way of replacing or improving session variable usage. The application is in a secure extranet...
11
by: perspolis | last post by:
Hi all I have a application that connects to a sql server database. I have many rows about above 100,000 records and when I want to fill my sqlDataAdaptor and show results in a grid it takes above...
10
by: Jo | last post by:
Hi there: I m wondering what can I do to improve my code, everytime I am coding I feel like it could be done better. I started on c# a good months ago and feel conformtable but sometimes I Need...
5
by: Rahul B | last post by:
Hi, We have been migrating to DB2 and it has been the trend that the application has become somewhat slow. It could be because of the application problems or it could be because i am not very...
30
by: Alf P. Steinbach | last post by:
I once suggested in that SomeOne Else(TM) should propose a string value class that accepted literals and char pointers and so on, with possible custom deleter, and in case of literal strings just...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.