[opencms-dev] OpenCMS running in Websphere Application Server 6.1
Patrick Koorevaar
p.koorevaar at casema.nl
Wed Dec 17 15:04:01 CET 2008
Hello,
I just joined the list and want to share some knowledge about my experiences with OpenCMS and the Websphere Application Server 6.1.
First of all I could not change the password of the Admin login via Account management -> User management -> "Edit User: Admin"-screen because the email validation always failed (I tried many valid e-mail addresses). Looks like the regular expression used for the validation is not okay (CmsDefaultValidationHandler.java):
public static final String EMAIL_REGEX = "^([a-zA-Z0-9_\\.\\-'])+\\@(([a-zA-Z0-9\\-])+\\.)+([a-zA-Z0-9]{2,4})+$";
Are those double slashes alright?
----------------------------------------------------------------------------------------------------------
Second I ran into some rendering problems with the templatetwo template. This seems to be caused by a bug in Websphere (Functions inside a JSTL tag are not found). I found this url describing the problem:
http://www.opencms-forum.de/opencms-forum/viewthread;jsessionid=82B7DF675F52565C8D0652A365D02346?thread=3010
So I made some changes to the jsp code.
[boxes.jsp]
<% pageContext.setAttribute("cms",org.opencms.jsp.util.CmsJspElFunctions.getVfsAccessBean(pageContext));
%>
<c:catch>
<% pageContext.setAttribute("content", org.apache.jasper.runtime.PageContextImpl.proprietaryEvaluate("${cms.readXml[param.config]}", org.opencms.jsp.util.CmsJspContentAccessBean.class, pageContext, null, false)); %>
</c:catch>
and inside the foreach:
<% pageContext.setAttribute("type", org.apache.jasper.runtime.PageContextImpl.proprietaryEvaluate("${cms.readResource[element.value['File']].typeId}", java.lang.Integer.class, pageContext, null, false)); %>
[listbox.jsp]
placed an if statement around the code after the following comment:
<%-- Entries of the list box --%>
<c:if test="${!listbox.value['Collector'].isEmptyOrWhitespaceOnly}">
----------------------------------------------------------------------------------------------------------
Third I had some trouble with the sendRedirect in the actionCloseDialog method of CmsDialog.java. I changed the following code:
if (Boolean.valueOf(getParamRedirect()).booleanValue()) {
// redirect parameter is true, redirect to given close link
getJsp().getResponse().sendRedirect(getParamCloseLink());
}
into:
if (Boolean.valueOf(getParamRedirect()).booleanValue()) {
// redirect parameter is true, redirect to given close link
getJsp().getRequest().setAttribute(SESSION_WORKPLACE_CLASS, this);
getJsp().include(FILE_DIALOG_CLOSE);
}
It works but is this a good alternative to the original sendRedirect call?
Thanks and keep up the good work!
Patrick
More information about the opencms-dev
mailing list