I managed to setup the Glassfish v3 jdbc realm and it works well. Unfortunately I get this odd behavior the first time I try to access a page that is secure.
Steps:
1 Establish jdbc realm
2 Have a tree of files basically
/MyApp/Css/style.css
/MyApp/js/script.js
/MyApp/CustomForm.jsp
/MyApp/Logout.jsp
/MyApp/Denied.jsp
/MyApp/Secure/page.jsp
/MyAppp/Servlet1
3 Establish as the welcome page "/MyApp/Secure/page.jsp"
When we run the app by default the Secure/page.jsp tries to get loaded, Glassfish knows its protected so instead it shows you the CustomForm.jsp so you can log in. Once you log in successfully the Secure/page.jsp is shown, here is the problem, I currently have the Secure/page.jsp linked with the Css/style.css, but the page is shown with out the css. As it cannot find the css file. Yet if i navigate to the Servlet1 and this Servlet1 forwards to the Secure/page.jsp the page is loaded with css.
Any ideas why the css isnt loaded the first time? As my mind tells me the cs/js are in the public area so it should be loaded with no issue.
[Message sent by forum member 'grburgos']
http://forums.java.net/jive/thread.jspa?messageID=477734