You pretty much need the RT taglibs to get at constants:

<c_rt:set var="errorKey"
          value="<%= org.apache.struts.Globals.ERROR_KEY %>"/>

<c:set var="errors" value="${requestScope[errorKey]}"/>

Quoting David Graham <[EMAIL PROTECTED]>:

> You should use the JSTL EL library because of the expression language's 
> power.  These tags replace most of the logic and bean tags from Struts.  On
> 
> my projects I only use the struts html taglib and the rest is handled with 
> jstl.  The constants in JSP issue is tricky and I haven't solved it myself.
> 
> David
> 
> 
> 
> 
> 
> 
> >From: "Hohlen, John" <[EMAIL PROTECTED]>
> >Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
> >To: "Struts-Help (E-mail)" <[EMAIL PROTECTED]>
> >Subject: JSTL Question (EL vs. RT + Struts)
> >Date: Wed, 20 Nov 2002 13:14:43 -0600
> >
> >My team is starting a new project with Struts.  In our previous Struts
> >projects, our JSPs used mostly tags from the Struts tag libraries.  For
> our
> >new project, I want my team to start using the JSTL.  For that reason, the
> >"Struts-EL" subproject is very appealing because it will force our
> >developers to learn the JSTL  -- as functionality duplicated in the Struts
> >libraries (Bean & Logic) are removed when it is available in the JSTL.
> >Obviously, we'll still be using many of the Struts tags -- especially
> those
> >tied to the Struts framework (e.g. all tags in the Struts "html" library).
> >However, we're not sure whether to use the "Request Time" (RT) version or
> >the "Expression Language" (EL) version of the JSTL library.  And we have 
> >the
> >same question for the "Struts" subproject (Struts-EL or Struts-RT)?
> >
> >Does anyone have any advice here?  Will JSTL compliant application servers
> >be required to implement a "EL" and "RT" version of the JSTL, or will they
> >only have to implement the "EL" version?
> >
> >One other issue:  We want to reference constants declared in our Java
> files
> >in our JSP.  These are often the bean or error key constants.  This helps
> >guard against a String typo in the JSP as any mistyped constant name  will
> >get caught a JSP compile time -- where a string typo will not be detected
> >until JSP execution time.  Does anyone how to reference Java variables in
> >your JSP if you're using the JSTL-EL tags?  Is this even possible?  If
> not,
> >what are the alternatives?
> >
> >Thanks,
> >
> >JOHN
> >
> >
> >
> >--
> >To unsubscribe, e-mail:   
> ><mailto:[EMAIL PROTECTED]>
> >For additional commands, e-mail: 
> ><mailto:[EMAIL PROTECTED]>
> 
> 
> _________________________________________________________________
> Protect your PC - get McAfee.com VirusScan Online 
> http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963
> 
> 
> --
> To unsubscribe, e-mail:  
> <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail:
> <mailto:[EMAIL PROTECTED]>
> 


-- 
Kris Schneider <mailto:[EMAIL PROTECTED]>
D.O.Tech       <http://www.dotech.com/>

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

Reply via email to