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

JSP views cannot set any headers #179

Open
rtwruck opened this issue Aug 1, 2022 · 0 comments
Open

JSP views cannot set any headers #179

rtwruck opened this issue Aug 1, 2022 · 0 comments

Comments

@rtwruck
Copy link

rtwruck commented Aug 1, 2022

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 ?

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

No branches or pull requests

1 participant