Re: Accessing static methods from Struts/JSTL

2006-02-08 Thread Dave Newton
Keith Sader wrote: >> But, I didn't know what to do with more complex messages, which may be >> multiple paragraphs, with HTML, images, links, etc. And may contain >> Struts/JSTL tags too.[...] >> In that directory, we place JSP files that contain the more complex >> messages. In the Application

Re: Accessing static methods from Struts/JSTL

2006-02-08 Thread Keith Fetterman
Keith, I've done a lot of searching and reading since my last post and you are correct. But, it has left me wondering what others are doing about mixing markup language and text. Do they put the markup language in the resources file or breakup the text into chunks and leave the markup in t

Re: Accessing static methods from Struts/JSTL

2006-02-08 Thread Keith Sader
> > Ok, since this app is internationalized, I'm guessing you have your > > .en, .fr, etc. files all ready to go? If I'm reading this right, it > > looks like your app needs an internationalization effort put into it? > > Maybe I misread. > > That is correct. As we cut over to Struts, we have bee

Re: Accessing static methods from Struts/JSTL

2006-02-08 Thread Keith Fetterman
Keith Sader wrote: On 2/8/06, Keith Fetterman <[EMAIL PROTECTED]> wrote: OrderRulesBean.getSmallOrderFeeLimit() This static method is returning a property from a properties file that will be included in a message to the user. This class provides a convenient way for java classes to reference

Re: Accessing static methods from Struts/JSTL

2006-02-08 Thread Keith Fetterman
[EMAIL PROTECTED] wrote: Keith Fetterman asked: Is there is a direct way to access the static method without fetching it from request scoped variable or object? Why not use an application-scoped object (and non-static method)? I haven't thought of that. :) In my 6 years of working Serv

Re: Accessing static methods from Struts/JSTL

2006-02-08 Thread Keith Sader
On 2/8/06, Keith Fetterman <[EMAIL PROTECTED]> wrote: > > OrderRulesBean.getSmallOrderFeeLimit() > > This static method is returning a property from a properties file that > will be included in a message to the user. This class provides a > convenient way for java classes to reference a single inst

RE: Accessing static methods from Struts/JSTL

2006-02-08 Thread George.Dinwiddie
Keith Fetterman asked: > Is there is a direct way to access the static method without > fetching it > from request scoped variable or object? Why not use an application-scoped object (and non-static method)? - To unsubscribe,

Re: Accessing static methods from Struts/JSTL

2006-02-08 Thread Keith Fetterman
Keith Sader wrote: > IMO this is a design smell of the presentation layer. Maybe. And from the name of the class, I can see why you questioned that. OrderRulesBean.getSmallOrderFeeLimit() This static method is returning a property from a properties file that will be included in a message to t

Re: Accessing static methods from Struts/JSTL

2006-02-08 Thread Nicolas De Loof
You can use jakarta unstandard taglib. (http://jakarta.apache.org/taglibs/sandbox/doc/unstandard-doc/intro.html) I use it to access const from JSP. : <%@ taglib prefix="u" uri="http://jakarta.apache.org/taglibs/unstandard-1.0"; %> Base Nico. Keith Sader a écrit : IMO this i

Re: Accessing static methods from Struts/JSTL

2006-02-08 Thread Keith Sader
IMO this is a design smell of the presentation layer. My suggestion would be to refactor these items down to the 'business-layer' and then have your actions put the results of that layer into the form/display bean. Then the .jsp could just look like There may be more to this with your particula

Accessing static methods from Struts/JSTL

2006-02-07 Thread Keith Fetterman
Folks, We are converting old JSP pages to Struts and JSTL and I am running into a problem. On the old JSP pages, we have some calls to static methods in scriptlets and runtime expressions. On the new JSP pages, we have disabled scriptlets and runtime expressions. Here is an example: The o