My blog has moved!

You will be automatically redirected to the new address. If that does not occur, visit
http://utku-utkan.appspot.com/
and update your bookmarks.

Pages

Wednesday, April 22, 2009

How to Get Spring MVC Locale via EL

For some stupid reason, today I just needed to get the current Locale which is determined by the Spring's org.springframework.web.servlet.i18n.SessionLocaleResolver class via EL. Well, as the name implies this Resolver stores the current Locale in Http Session and you can access it with the following EL expression.

${sessionScope['org.springframework.web.servlet.i18n.SessionLocaleResolver.LOCALE']}

Monday, April 6, 2009

How to Connect Catalina MBean

In order to connect Catalina MBean, first you should start Tomcat with the following JVM arguments.

-Dcom.sun.management.jmxremote
-Dcom.sun.management.jmxremote.port=4444 (could be anything)
-Dcom.sun.management.jmxremote.ssl=false
-Dcom.sun.management.jmxremote.authenticate=false


After container is started, run jconsole.exe in JDK's bin folder to open JConsole New Connection dialog. To connect, choose Remote Process, enter localhost:4444 to the field, and press Connect. If you open the MBeans tab, you will see the Catalina MBean on the left panel.