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 %
%= Const.MY_CONST %
but not
c:out value=${Const.MY_CONST}/
This probably demonstrates a fundamental none understanding!
TIA
--
Mike W
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
c:set var=yourVar%= Const.MY_CONST %/c:set
Good grief is this the only way?
a/ isn't the aim to do without scriptlets/expressions?
b/ all the data exists, server side in the app, why do I have to jump
through hoops, copying CONSTANTS over to another variable???
:-(
--
Mike W
PROTECTED]
Sent: Friday, August 01, 2003 7:46 AM
Subject: RE: simple - import
c:set var=yourVar%= Const.MY_CONST %/c:set
Good grief is this the only way?
a/ isn't the aim to do without scriptlets/expressions?
b/ all the data exists, server side in the app, why do I have to jump
through
=${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
];
[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
}
- 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
7 matches
Mail list logo