[
https://jira.jboss.org/jira/browse/JBSEAM-3083?page=com.atlassian.jira.pl...
]
Dan Allen reopened JBSEAM-3083:
-------------------------------
Assignee: Dan Allen (was: Pete Muir)
As it turns out, this was not fixed.
The current logic is as follows:
MailFacesContextImpl.start(getUrlBase() +
context.getExternalContext().getRequestContextPath() == null ? "" :
context.getExternalContext().getRequestContextPath());
The problem with this logic is that the urlBase is never used. That's because the
string concatenation happens first, then the ternary operation is applied. Since the first
part is never null, it always uses the context path. If the intent is the use the urlBase
verbatim, then we need an extra set of brackets.
Here is what it should be:
MailFacesContextImpl.start(getUrlBase() == null ?
context.getExternalContext().getRequestContextPath() :
getUrlBase() + context.getExternalContext().getRequestContextPath());
urlBase on <m:message> does not work
-------------------------------------
Key: JBSEAM-3083
URL:
https://jira.jboss.org/jira/browse/JBSEAM-3083
Project: Seam
Issue Type: Bug
Components: Mail
Affects Versions: 2.0.2.SP1, 2.1.0.A1
Reporter: Dan Allen
Assignee: Dan Allen
Fix For: 2.0.3.CR2, 2.1.0.BETA1
Attachments: JBSEAM-3083-branch_20-v1.txt, JBSEAM-3083-trunk-v1.txt
Original Estimate: 15 minutes
Remaining Estimate: 15 minutes
The attribute urlBase on <m:message> is broken in two fundamental ways. First, the
logic as to whether to use the urlBase doesn't make any sense at all, resulting in the
urlBase never being used. The second problem is that EL value expressions in the urlBase
are not getting resolved.
I am proposing a strategy as part of this fix. If the urlBase is used, it is taken
verbatim, without appending the current context path. The reason is, if urlBase is
overridden, it may be because it is pointing to a completely different application. If the
developer want to reuse the context path, the expression
#{facesContext.externalContext.requestContextPath} must be included in the urlBase
attribute.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira