users@glassfish.java.net

Authentication errors with default web module and apache proxy

From: <glassfish_at_javadesktop.org>
Date: Sat, 06 Sep 2008 09:29:26 PDT

I have an application that required authentication for the path /secure. When I deploy the application normally and request the path http://localhost:8080/website/secure/index.xhtml the server loads my login form and authenticates me correctly. I then can logout and log back in repeatedly without error. However, If I make this application the default web module and make a request to http://localhost:8080/secure/index.xhtml the server again will log me in, but once I log out the server will never authenticate me successfully without either clearing all cookies or starting a new browser session.

Does anyone know why this would occur?

Also, we are proxying all requests behind an apache instance that is virtualhosting a few static sites and this jee server instance. The main problem I am trying to resolve is that when the links are generated to images in JSF it appends the context path of the application. By setting this web application as the default web module on the virtual server the images load properly since the paths are generated in the JSF output correctly. However, they will not load if I proxy the address http://mysite.com/ to http://mysite.com:8080/website/ since the images and resources are internally linked with the context path as in /website/images/image.jpg. Does anyone know how to address this issue when proxying behind apache? It seems that marking the application as the default web module should work, but then I get the issue of only being able to log in once.
[Message sent by forum member 'chadws' (chadws)]

http://forums.java.net/jive/thread.jspa?messageID=297633