I am running Glassfish in standalone mode (without Apache) and my application is accessible on http://mydomain.com.
For SEO purposes I would like to do a 301 redirect from mydomain.com to www.mydomain.com, so typing mydomain.com/page1.jsp in the browser would redirect the user to www.mydomain.com/page1.jsp
Any idea how to do it? I found this http://notsomany.wordpress.com/2010/06/29/glassfish-v2-1-1-site-redirect/ but as I understand it this redirection only works for a specific page.