[
https://jira.jboss.org/browse/GTNPORTAL-1348?page=com.atlassian.jira.plug...
]
Khoi Nguyen commented on GTNPORTAL-1348:
----------------------------------------
In webserver, we could configure default content-type for request to resource, so, we
should set content-type is 'text/html' in own servlet programmatically
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
Assignee: Khoi Nguyen
Fix For: 3.2.0-GA
Attachments: 2010-08-06-GTNPORTAL-1348.patch
Original Estimate: 4 hours
Remaining Estimate: 4 hours
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