Back Forum Reply New

Message (with EL) from MessageSource access from mvc.Controller

Hello,

I am trying to access a message inside a controller.  However, the message contains EL referencing another message.  Does anyone know of a simple way of doing this?

This is how I am doing it now, but obviously the EL part doesn't work:Code:       org..ui.context.Theme theme = org..web.servlet.support.RequestContextUtils.getTheme( request );       java.util.Locale locale = org..web.servlet.support.RequestContextUtils.getLocale( request );       org..context.MessageSource msgsrc = theme.getMessageSource();       String videosPath = msgsrc.getMessage( quot;videosPathquot;, null, locale );
properties file:
homepath=C:/mydir/apache-tomcat-5.5.20
videosPath=${homepath}/webapps/videos/

This works great for inside a JSP page, but I need to access this path from inside an org..web.servlet.mvc.Controller
lt;spring:theme code='photosucl'/gt;   returns quot;C:/mydir/apache-tomcat-5.5.20/webapps/videos/quot;

and the code above returns quot;${homepath}/webapps/videos/quot;

anyone have any ideas??
¥
Back Forum Reply New