${sessionScope['org.springframework.web.servlet.i18n.SessionLocaleResolver.LOCALE']}
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.
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.
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.
-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.
Wednesday, March 4, 2009
How to skip tests in Maven
We all had the moment, that we desperately needed to skip our tests in Maven. Well, there are two ways to skip test executions in Maven:
One is to the use maven.test.skip.exec parameter:
This is really hard to remember and it is even deprecated; so I suggest you the following:
One is to the use maven.test.skip.exec parameter:
mvn ... -Dmaven.test.skip.exec=true
This is really hard to remember and it is even deprecated; so I suggest you the following:
mvn ... -DskipTests
Subscribe to:
Posts (Atom)