I have a java web application that use spring security for log in users, restriction access etc. , and it is working without problems on Glassfish 2.1, Tomcat, jetty, but on glassfish v3 doesn't work, when I try to login, and press button login, I'm getting login box from glassfish server(the box "The server xxxx requires user name and password").
Has somebody got such issue? Please let me know how I can solve this.
preguntado el 28 de septiembre de 11 a las 06:09
I don't know what is causing this (and potentially it could be one of a number of things), but I suggest that you turn the logging level up to the max and see if that gives you some clues as to what is going on. (When the logging level is DEBUG or higher, SpringSecurity generates lots of logging.)
... the request is not sent to spring security, the glassfish stopped it with his basic authentication, the question is why.
I don't know what the cause of this is, but it sounds like some aspect of Glassfish authentication / authorization needs to be turned off if you want to use SpringSecurity. (Maybe you did this in your Glassfish 2.1 installation ...)
The way that SpringSecurity works, you will definitely see logging messages if a request goes to a servlet that has the SS filter chain in place. It is possible that there is a SS misconfiguration that means that you've not got the SS filter chain in place, but I suspect that the real problem is that Glassfish is doing its bit antes de the requests get sent to the filter chain.
Try to comment the following fragment:
<login-config> <auth-method>BASIC</auth-method> </login-config>
in ".../glassfish/domains/domain1/config/default-web.xml" archivo
Did you create a JDBC Connection pool and Resource in Glassfish server?
User: root Password: java databaseName: theDatabase serverName: localhost portNumber: 3306 driverClass: com.mysql.jdbc.Driver URL: jdbc:mysql://localhost:3306/dbname