Skip to content

Document the difference in dispatch type and the effect on the security filter caused by the error page filter when deployed to a standalone container #19293

@ravi-dalal

Description

@ravi-dalal

I am using following code in my controller to display a custom error page in the application:

@GetMapping(path="/error")
public ModelAndView error (Principal principal) {
	ModelAndView model = new ModelAndView("error");
	model.addObject("userName", principal.getName());
	return model;
}

The principal is null when application is deployed as a WAR on stand-alone tomcat. When application is run with embedded tomcat, it works fine.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions