On 26/9/04 11:10 am, "M. Onur Tokan" <[EMAIL PROTECTED]> wrote:

> Hi,
> 
> Should I use struts-el with jstl or struts built-in tag libraries ?
> What are the differences between these?

  If you have support for JSP2.0 in your servlet container (which seems the
case):

  1st - you can't use struts-el (at least that was I was told)
  2nd - you donšt need struts-el because you already have EL support (you
just need to configure your web.xml like David said) which makes the use of
struts-el "obsolete"

  So the answer is:

  - configure your web.xml correctly to enable EL
  - use struts non-el tag libraries or any non-el tag library (jstl
included)


  Regards,

Pedro Salgado

>> 
>> 
>> 
>> ----- Original Message -----
>> From: "David G. Friedman" <[EMAIL PROTECTED]>
>> To: "Struts Users Mailing List" <[EMAIL PROTECTED]>; "Satish Talim"
>> <[EMAIL PROTECTED]>
>> Sent: Sunday, September 26, 2004 10:23 AM
>> Subject: RE: Struts and EL/JSTL
>> 
>> Satish,
>> 
>> JBoss v4.0 says it (like Tomcat 5.X.X) supports JSP 2.0.  So you can use the
>> standard Struts release and simply type in the ${expression} syntax from JSP
>> v2.0 directly into a struts tag or anywhere in the JSP page itself.  Do
>> ${abc.xyz} to call the getXyz method of object abc.  Scopes should be
>> searched automatically in order as mentioned in previous posts today (or
>> yesterday) on JSP 2.0.  For IF statements, you can do ${ true ? "right" :
>> "wrong" } where this prints out the word "right" while it could be a method
>> call to retrieve data to display instead of the string "right" or the string
>> "wrong".  That makes  a Standard struts tag like:
>> 
>> <html:text property="address" />
>> 
>> work the same as:
>> 
>> <input type="text" name="address" value="${someFormBeanName.address}" />
>> 
>> One trick: In Tomcat 5.X.X, (I don't know about JBoss 4.0) if you don't
>> configure a line in your WEB-INF/web.xml, JSP 2.0 syntax won't work unless
>> you add this to the top of your JSP (Note: this trick was posted to the list
>> within the last 24 hours):
>> 
>> <%@ page isELIgnored="false" %>
>> 
>> That trick was posted today. I just tried it with "true" and "false" and was
>> amazed.  I suppose you'd use it with "true" if you had globally set JSP 2.0
>> on for your webapp but choose to selectively turn it off in particular JSPs
>> for some security reason.  I just tried it and it's freaky/cool. :)
>> 
>> For an interesting JSP 2.0 reference card, try Sun at:
>> http://java.sun.com/products/jsp/syntax/2.0/card20.pdf
>> 
>> I hope this information helps.
>> 
>> Regards,
>> David
>> 
>> -----Original Message-----
>> From: Satish Talim [mailto:[EMAIL PROTECTED]
>> Sent: Saturday, September 25, 2004 10:09 PM
>> To: [EMAIL PROTECTED]
>> Subject: Struts and EL/JSTL
>> 
>> Hello,
>> 
>> I am using JBoss 4.0 and Struts 1.2.4. I am interested in using EL/JSTL
>> along with Struts. However, I came across this comments by Karr, David (the
>> person who wrote the Struts-EL library) "Struts-el is intended to be used in
>> a JSP 1.2 container.  It is not used in a JSP 2.0 container. I feel that
>> Struts-EL will certainly NOT become part of the core Struts tag library, as
>> there's no point to it."
>> Therefore, a simple question is do we use the tag libraries as declared in
>> struts-html-el.tld or c.tld etc? If not, how do we use something like <c:out
>> value="${abc.xyz}" />
>> It's very confusing.
>> 
>> Regards,
>> 
>> Satish Talim
>> 
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>> 
>> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]


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

Reply via email to