[
https://jira.jboss.org/browse/GTNPORTAL-1348?page=com.atlassian.jira.plug...
]
Trong Tran commented on GTNPORTAL-1348:
---------------------------------------
I can not reproduce the problem
but i can see that it's necessary to set Content-Type in ErrorLoginServlet to ensure
the response has a good content type
Login page then username or password is incorrect shown as JSP source
code.
---------------------------------------------------------------------------
Key: GTNPORTAL-1348
URL:
https://jira.jboss.org/browse/GTNPORTAL-1348
Project: GateIn Portal
Issue Type: Bug
Security Level: Public(Everyone can see)
Environment: Gatein under apache web server.
Reporter: Andrey Parfonov
When code in org.exoplatform.web.login.ErrorLoginServlet (line 69)
context.getRequestDispatcher("/login/jsp/login.jsp").include(req, resp);
replaced by
context.getRequestDispatcher("/login/jsp/login.jsp").forward(req, resp);
After that problem is gone. There is now more source code of JSP but HTML
with correct message about wrong password.
NOTE if tomcat used without apache front-end problem not appear (why is not clear)
Using include method looks as not quite correct because headers include
'Content-Type' (it is the core of problem) may not be copied from JSP.
The included servlet cannot change the response status code or headers.
Need complex testing to be sure changes include by forward does not break
anything.
As alternative solution (if forward method is not acceptable in some reason) is
possible to set Content-Type header directly in
org.exoplatform.web.login.ErrorLoginServlet
but it looks much worse IMO
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
https://jira.jboss.org/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira