My rule is:  don't use the S2 tags unless I have to.  Typically, if I
need something from the value stack, I use an s:set tag to bring it down
into the page scope, and then use JSTL and EL.  Or on some pages I can
use JSF tags and get rid of the problem completely.  Having said that,
the S2 iterator and if/else tags have a far superior syntax to the JSTL
equivalents.  I like many things in S2, but the S2 tag libs and OGNL
aren't among them.  The use of the OGNL library would be tolerable if the
S2 tag syntax were set to some single standard instead of using a little
of at least 3 standards.  (And I haven't even tried JSP 2.1 syntax yet). 
As it stands, this is a TERRIBLE shortcoming in S2.
- Ray Clough

  ----- Original Message -----
  From: "Kevin Lawrence"
  To: "Struts Users Mailing List"
  Subject: Re: Using JSTL Expression Language with Struts 2 tags
  Date: Thu, 6 Sep 2007 13:37:39 -0700


  I am not Zoran but....

  I tried for a few weeks to use OGNL but everytime I tried to type an
  OGNL
  expression it took me 3 or 4 attempts to make it do what I wanted. In
  every
  case, I was able to get the EL right first time.

  In the end I settled on the following rules for myself:

  - in a struts tag, use OGNL
  - else use EL

  If I had known that I could use EL in a struts tag, I would have...
  but -
  given the start of this thread - I am glad I did not.

  I use the struts tags exclusively because they are easier to use with
  than
  the JSTL tags.
  I would use EL exclusively (if I could) for the same reason.

  --
  Kevin

  http://www.junitfactory.com
  You send us code. We send you tests. For free.


  On 9/6/07, Adam Hardy wrote:
  >
  > Zoran,
  >
  > what do you want to script in the tags? I would be interested in a
  small
  > example, only because I often find my use of JSTL is restricted to
  > situations
  > where I am not using taglibs. Which leads me to ask, if you rely on
  JSTL
  > anyway,
  > surely you use the Standard taglib tags?
  >
  >
  > Adam
  >
  > Zoran Avtarovski on 06/09/07 05:20, wrote:
  > > That just sounds ridiculous. Because of the possibility of end
  users
  > > injecting malicious OGNL we won't be able to use JSP expression
  > language.
  > >
  >



- Ray Clough
[EMAIL PROTECTED]

Reply via email to