Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Spring Boot with Spring Security as deployable war results in redirect loop #1257

Closed
mdeinum opened this issue Jul 16, 2014 · 3 comments
Closed
Assignees
Labels
type: bug A general bug
Milestone

Comments

@mdeinum
Copy link
Contributor

mdeinum commented Jul 16, 2014

I'm migrating a JSP based application to Spring Boot, for the moment I'm tied to JSP but I'm planning to move to Thymeleaf. However in the meantime I need JSPs to work and I also need Spring Security (basic auth) to work.

When creating an executable jar and run the application, navigating to the URL nicely prompts me with a login box. Supplying credentials is resulting in a login to the application and shows me the default error page. Because JSP doesn't work in a jar file.

The jar is now packaged as a war which can be deployed on Tomcat, however when doing so navigating to the URL leads to a redirect loop to /error instead of prompting me with a login box.

An executable war seems to work but I need it to be a deployable war for now (or at least have that as an option!).

@dsyer dsyer added the bug label Jul 16, 2014
@dsyer dsyer added this to the 1.1.5 milestone Jul 16, 2014
@dsyer dsyer self-assigned this Jul 16, 2014
@dsyer
Copy link
Member

dsyer commented Jul 16, 2014

I doubt if that is anything to do with JSPs. It's not a redirect loop involving the client (browser) though, am I right? It's a stackoverflow internally with the ErrorPageFilter?

@mdeinum
Copy link
Contributor Author

mdeinum commented Jul 17, 2014

Indeed it isn't related to JSP but more likely the setup. I don't get a stackoverflow (maybe I should let it run longer for that). But when killing tomcat I get a nice stack with a repeating ErrorPageFilter.doFilter.

org.springframework.boot.context.web.ErrorPageFilter.handleErrorStatus(ErrorPageFilter.java:123)
org.springframework.boot.context.web.ErrorPageFilter.doFilter(ErrorPageFilter.java:104)
org.springframework.boot.context.web.ErrorPageFilter.doFilter(ErrorPageFilter.java:89)

Is the pattern that keeps repeating.

@dsyer
Copy link
Member

dsyer commented Jul 17, 2014

OK I see the same thing then. I'm not even sure it's security-related, but adding security is an easy way to generate an error state (401 response).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug A general bug
Projects
None yet
Development

No branches or pull requests

3 participants