Skip to content

JSP views cannot set any headers #179

@rtwruck

Description

@rtwruck

When fulfilling GET requests with a JSP view, you'd expect to be able to use JSP features like <%@page contentType="text/html; charset=UTF-8" %> or setting headers like 'Expires'. Unfortunately though, JspViewResolver chose to invoke RequestDispatcher.include, where

"The included servlet cannot change the response status code or set headers; any attempt to make a change is ignored."

Is there any reason for not using RequestDispatcher.forward ?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions