On 04/06/26 1:33, "Michael McGrady" <[EMAIL PROTECTED]> wrote:

> Looks like a test, Caroline!
> 
> At 05:20 PM 6/25/2004, Caroline Jen wrote:
>> I was told that JSTL can convert most of the Java code
>> in JSP.  I still have some problem with initializing
>> variables and if statments; for example, I do not know
>> how to write in JSTL of the following:
>> 
>> 1. int i = 0;
<c:set var='i' value='0'/>
>> 2. i++;
<c:set var='I' value='${i + 1}'/>
>> 3. String prevArticle = null;
<c:set var='prevArticle'/>
>> 4. if ( numberOfPosts - 1 == 1 ) {}
<c:if test='${numberOfPosts} - 1 == 1'>
>> 5. if ( nextTopic != 0 )
<c:if test='${nextTopic != 0}'>
>> 6. String threadID = String.valueOf( threadID_int );
<c:set var='threadID' value='${threadID_int}'/>
>> 7. if ( threadRows.size() == 0 ) {}
<c:if test='${not empty threadRows}'>
>> 8. if ( previousOffset >= 0 || nextOffset >= 0 ) {}
<c:if test='${previousOffset} >= 0 || ${nextOffset} >= 0'>
>> 9. if ( prevArticle != null ) && ( !article.equals(
>> prevArticle ) ) {}
<c:if test='${not null ${prevArticle}} && ${article != prevArticle}'>
The article != preArticle I am not quite sure.

Pedro Salgado


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to