All these ideas rely on the use of a single class/interface for declaring constants. I don't like this workaround to what SDK1.5 will solve. My constants are in the right places, the classes to which they logically belong. I suppose with 1.5 I will be importing these constants to one class which I can then make available as you suggest. I think EL should have syntax to enable it to access statics
-- Mike W > > >Alternatively, you could load this into session or application >scopes and do >this: > ><c:out value="${sessionScope.constants.myVal}"> >or ><c:out value="${applicationScope.constants.myVal}"> >----- Original Message ----- >From: "David Chelimsky" <[EMAIL PROTECTED]> >To: "Struts Users Mailing List" <[EMAIL PROTECTED]>; ><[EMAIL PROTECTED]> >Sent: Friday, August 01, 2003 8:12 AM >Subject: Re: simple - import > > >> JSTL won't handle static methods. If you add a method to your Const class >> that returns a Const instance (ideally a singleton so you don't keep >> creating these), you can keep a Const on your ActionForm bean and set it >in >> your ActionForm. Then your JSP would look like this: >> >> <c:out value="${myForm.const.myVar}"/> >> >> and you wouldn't even need the import statement. >> >> ----- Original Message ----- >> From: "Alex Shneyderman" <[EMAIL PROTECTED]> >> To: "'Struts Users Mailing List'" <[EMAIL PROTECTED]> >> Sent: Friday, August 01, 2003 6:34 AM >> Subject: RE: simple - import >> >> >> > >> > <c:set var="yourVar"><%= Const.MY_CONST %></c:set> >> > >> > > -----Original Message----- >> > > From: Mike Whittaker [mailto:[EMAIL PROTECTED] >> > > Sent: Friday, August 01, 2003 7:33 AM >> > > To: Struts List >> > > Subject: simple - import >> > > >> > > >> > > How do you get Constants (or anything none scoped ie app/sess/req) >> > into a >> > > jsp for use in EL >> > > >> > > I can do >> > > >> > > <%@ page import="com.blah.Const" %> >> > > >> > > >> > > >> > > but not >> > > >> > > > >> > > This probably demonstrates a fundamental none understanding! >> > > >> > > TIA >> > > -- >> > > Mike W >> > > >> > > >> > > --------------------------------------------------------------------- >> > > 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] >> >> >> > > >--------------------------------------------------------------------- >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]