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

Default value of <mvc:redirect-view-controller> context-relative attribute is not "true" [SPR-12607] #17208

Closed
spring-issuemaster opened this issue Jan 9, 2015 · 1 comment

Comments

Projects
None yet
2 participants
@spring-issuemaster
Copy link
Collaborator

commented Jan 9, 2015

Péter Kovács opened SPR-12607 and commented

In practice the context-relative attribute on an mvc:redirect-view-controller element defaults to "false" when it's not set.
For example <mvc:redirect-view-controller path="/a" redirect-url="/b" /> will create a controller that redirects from http://localhost:8080/context/a to http://localhost:8080/b.

This contradicts the description of the attribute (from spring-mvc-4.1.xsd):
Whether to interpret a given redirect URL that starts with a slash ("/") as relative to the current ServletContext, i.e. as relative to the web application root. The default is "true".


Affects: 4.1.4

Referenced from: commits 3da9d92, 0c8d07f

@spring-issuemaster

This comment has been minimized.

Copy link
Collaborator Author

commented Jan 16, 2015

Brian Clozel commented

Hi Péter Kovács

This is now fixed, and the default value is now correctly enforced as "true" (as it should have been from the start - it's already the case when using the javaconfig counterpart of this configuration).

Thanks for reporting this!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.