I have a page index.jspx in a web mvc application
I have a static method on an entity class that returns a string.Code:<!-- selects a static view for rendering without the need for an explicit controller --> <mvc:view-controller path="/" view-name="index"/>
In screens where I use a custom controller I use
What is the best way to display this same static method result in the index.jspx?Code:@ModelAttribute("currentZone") public String getCurrentZone(){ return ZoneElement.getCurrentZone(); } and ${currentZone} in the page to display the value
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.


Reply With Quote