Re: Converting Java Code in JSP to JSTL

2004-06-29 Thread Caroline Jen
Thank you for helping me to learn different ways to construct a web link while passing a number of parameters along with it. Those hyperlinks forward a request and parameters to another servlet action. In this servlet action, do I receive those parameters in an usualy way? String sort = request.

RE: Converting Java Code in JSP to JSTL

2004-06-29 Thread Ricardo Cortes
Caroline, Have you tried the following?: -Original Message- From: Caroline Jen [mailto:[EMAIL PROTECTED] Sent: Tuesday, June 29, 2004 1:12 AM To: Struts Users Mailing List Subject: Re: Converting Java Code in JSP to JSTL I pass an object ThreadBean from an action

Re: Converting Java Code in JSP to JSTL

2004-06-28 Thread Caroline Jen
I pass an object ThreadBean from an action servlet in a request scope: request.setAttribute( "ThreadBean", threadBean ); In my JSP, there is no problem and everything works well if I use scripting element: <% ThreadBean threadBean = ( ThreadBean )request.getAttribute( "ThreadBean" ); %> I then

Re: Converting Java Code in JSP to JSTL

2004-06-28 Thread jthompson
You could use: Click Me Threads:  Thanks for all the supports and help that I have received so far on this topic. I have another question about the converstion of Java code: Click Me <%else {%> Threads:  <%}%> 1. what is the JSTL equivalent of the <

Re: Converting Java Code in JSP to JSTL

2004-06-28 Thread Ron Grabowski
> 1. what is the JSTL equivalent of the <%else {%> ... > <%}%> tag? The c:choose, c:when, and c:otherwise tags: http://tinyurl.com/2kqlz > 2. how to write a tag to replace the > tag while passing a number of > parameters? You could do this: Click Me Depending on how you

Re: Converting Java Code in JSP to JSTL

2004-06-28 Thread Caroline Jen
Thanks for all the supports and help that I have received so far on this topic. I have another question about the converstion of Java code: Click Me <%else {%> Threads:  <%}%> 1. what is the JSTL equivalent of the <%else {%> ... <%}%> tag? 2. how to write a tag to replace the t

Re: Converting Java Code in JSP to JSTL

2004-06-28 Thread Bill Siggelkow
You cannot call static methods with JSTL 1.0. The simplest option is to create a JavaBean that you place in some application scope that wraps the static method call with a normal JavaBean getter instance method. That being said, if you truly are formatting stuff then use the JSTL formatting tag

RE: Converting Java Code in JSP to JSTL

2004-06-28 Thread Ricardo Cortes
Have you looked at the format library for these kinds of situations? Example: -Original Message- From: Eric Schneider [mailto:[EMAIL PROTECTED] Sent: Monday, June 28, 2004 5:34 PM To: Struts Users Mailing List Subject: Re: Converting Java Code in JSP to JSTL Can you use the

Re: Converting Java Code in JSP to JSTL

2004-06-28 Thread Eric Schneider
Can you use the JSTL tags to call static API? Something like this: Is this possible? Thanks, Eric On Jun 26, 2004, at 5:48 AM, Pedro Salgado wrote: 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

Re: Converting Java Code in JSP to JSTL

2004-06-28 Thread Axel Groß
> >9. if ( prevArticle != null ) && ( !article.equals( > >prevArticle ) ) {} > > think, this is slightly different; the EL expression will be false for prevArticle=="" (java syntax) in EL you don't have to take care that prevArticle is not null to prevent a runtimeException. So if it aligns wi

Re: Converting Java Code in JSP to JSTL

2004-06-26 Thread Mark Lowe
The article != preArticle I am not quite sure. At least in terms of how the el works (not nesting el). Cant see the point in porting this to JSTL unless there's nothing else to do. I'd sooner copy and past the java in the jsp page into an action like bill was saying. On 26 Jun 2004, at 11:48,

Re: Converting Java Code in JSP to JSTL

2004-06-26 Thread Pedro Salgado
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

Re: Converting Java Code in JSP to JSTL

2004-06-25 Thread Bill Siggelkow
Caroline Jen wrote: I was told that JSTL can convert most of the Java code in JSP. Whoever told you that should be shot! It's not that JSTL is deficient, its just sort of like saying "I have heard that a honeydew melon can be used instead of a canteloupe." Theyr'e both round fruits, but they tast

[OT -- for Martin: bounce backs from Brian Husted] Fwd: Undeliverable: Re: Converting Java Code in JSP to JSTL

2004-06-25 Thread Michael McGrady
These are the bounce backs we are getting, Martin, if you did not get the emails. Envelope-to: [EMAIL PROTECTED] Subject: Undeliverable: Re: Converting Java Code in JSP to JSTL Date: Fri, 25 Jun 2004 20:33:48 -0400 X-MS-Has-Attach: yes X-MS-TNEF-Correlator: Thread-Topic: Converting Java Code in

Re: Converting Java Code in JSP to JSTL

2004-06-25 Thread Michael McGrady
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; 2. i++; 3.

Converting Java Code in JSP to JSTL

2004-06-25 Thread Caroline Jen
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; 2. i++; 3. String prevArticle = null; 4. if ( numberOfPosts - 1 == 1 ) {} 5. if (