Skip to content

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

@spring-projects-issues

Description

@spring-projects-issues

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

Metadata

Metadata

Assignees

Labels

in: webIssues in web modules (web, webmvc, webflux, websocket)type: bugA general bug

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions