What is the best way to display a string result of a static pojo method
I have a page index.jspx in a web mvc application
Code:
<!-- selects a static view for rendering without the need for an explicit controller -->
<mvc:view-controller path="/" view-name="index"/>
I have a static method on an entity class that returns a string.
In screens where I use a custom controller I use
Code:
@ModelAttribute("currentZone")
public String getCurrentZone(){
return ZoneElement.getCurrentZone();
}
and
${currentZone} in the page to display the value
What is the best way to display this same static method result in the index.jspx?
I want to avoid creating a controller just for this one little bit of data, or a custom tag for that matter, but I suppose if that's the best way, so be it. I am probably over thinking this.