Is it possible to do this in JSTL / JSP - JavaBean with static properties ?

javaBean:
public class Util {
  private static String s;
  public static void setS(String s) { this.s = s; }
  public static getS() { return s; }
// some other static utilities needed to be called by other classes
}JSP Page needs to output the value of s (the static value)
Is it okay for the JavaBean used to have static values and static get and set?

By the way, the correct way to write your static setS method (without this!) is:
public static void setS(String s) { Util.s = s; }

Similar Messages

Maybe you are looking for

  • Mac Crashes in the middle of Time Capsule backup --HELP!

    Been using time capsule for several months without any issues. In fact, it has been great until recently. A week or so ago, my MacBookPro began crashing in the middle of a time capsule back up. Just suddenly the MAC curtain comes down and tells me I

  • Report Transfer price of product in FOC order

    Hi Gurus, I need to report from SAP free of charge deliveries in an specific timeframe in kEur. For this purpose Should I need to have a column in our order type ZGFD with the transfer price of product and total sum. or is there any other transation

  • More AppleTV questions

    Can I sync and/or stream to more than one AppleTV? I would be interested in having one in my basement and one in my bedroom.

  • Embedded image in SVG doesn't show up in An, but opens in browser.

    I feel stupid cause it seems nobody else has this problem:) I've exported svg file from Illustrator, some graphics and embedded .jpg image, but when i open the svg file in Edge i can see only graphics , the image layer is there but i can't see the im

  • How do I uninstall the Application Manager?

    After a difficult installation of Creative Cloud, my Windows 7 64-bit Desktop freezes after a period of time ranging from minutes to hours.  Desktop icons won't launch, and context menus won't display.  Quick Launch icons still work OK. I asked a com