JBoss Portal SVN: r12582 - branches/Enterprise_Portal_Platform_4_3/core/src/resources/portal-core-war/WEB-INF/jsp/error.
by portal-commits@lists.jboss.org
Author: thomas.heute(a)jboss.com
Date: 2009-01-21 06:34:58 -0500 (Wed, 21 Jan 2009)
New Revision: 12582
Modified:
branches/Enterprise_Portal_Platform_4_3/core/src/resources/portal-core-war/WEB-INF/jsp/error/page.jsp
branches/Enterprise_Portal_Platform_4_3/core/src/resources/portal-core-war/WEB-INF/jsp/error/portal.jsp
Log:
Transform output using HTML entities
Modified: branches/Enterprise_Portal_Platform_4_3/core/src/resources/portal-core-war/WEB-INF/jsp/error/page.jsp
===================================================================
--- branches/Enterprise_Portal_Platform_4_3/core/src/resources/portal-core-war/WEB-INF/jsp/error/page.jsp 2009-01-21 11:34:21 UTC (rev 12581)
+++ branches/Enterprise_Portal_Platform_4_3/core/src/resources/portal-core-war/WEB-INF/jsp/error/page.jsp 2009-01-21 11:34:58 UTC (rev 12582)
@@ -1,20 +1,20 @@
<%@ page import="java.lang.Throwable" %>
<%@ page import="org.jboss.portal.common.util.Exceptions" %>
+<%@ page import="org.jboss.portal.common.text.EntityEncoder" %>
+
<h2 class="portlet-msg-error"><%= request.getAttribute("org.jboss.portal.control.ERROR_TYPE") %>
</h2>
-<div class="portlet-font">Cause: <%= request.getAttribute("org.jboss.portal.control.CAUSE") %>
+<div class="portlet-font">Cause: <%= EntityEncoder.FULL.encode(request.getAttribute("org.jboss.portal.control.CAUSE").toString()) %>
</div>
<%
if (request.getAttribute("org.jboss.portal.control.MESSAGE") != null)
{
%>
-<div class="portlet-font">Message: <%= request.getAttribute("org.jboss.portal.control.MESSAGE") %>
+<div class="portlet-font">Message: <%= EntityEncoder.FULL.encode(request.getAttribute("org.jboss.portal.control.MESSAGE").toString()) %>
</div>
<%
}
%>
-<div class="portlet-font">
- StackTrace: <%= Exceptions.toHTML((Throwable)request.getAttribute("org.jboss.portal.control.CAUSE")) %>
-</div>
\ No newline at end of file
+<div class="portlet-font">See log for stacktrace</div>
\ No newline at end of file
Modified: branches/Enterprise_Portal_Platform_4_3/core/src/resources/portal-core-war/WEB-INF/jsp/error/portal.jsp
===================================================================
--- branches/Enterprise_Portal_Platform_4_3/core/src/resources/portal-core-war/WEB-INF/jsp/error/portal.jsp 2009-01-21 11:34:21 UTC (rev 12581)
+++ branches/Enterprise_Portal_Platform_4_3/core/src/resources/portal-core-war/WEB-INF/jsp/error/portal.jsp 2009-01-21 11:34:58 UTC (rev 12582)
@@ -1,20 +1,19 @@
<%@ page import="java.lang.Throwable" %>
<%@ page import="org.jboss.portal.common.util.Exceptions" %>
+<%@ page import="org.jboss.portal.common.text.EntityEncoder" %>
<h2 class="portlet-msg-error"><%= request.getAttribute("org.jboss.portal.control.ERROR_TYPE") %>
</h2>
-<div class="portlet-font">Cause: <%= request.getAttribute("org.jboss.portal.control.CAUSE") %>
+<div class="portlet-font">Cause: <%= EntityEncoder.FULL.encode(request.getAttribute("org.jboss.portal.control.CAUSE").toString()) %>
</div>
<%
if (request.getAttribute("org.jboss.portal.control.MESSAGE") != null)
{
%>
-<div class="portlet-font">Message: <%= request.getAttribute("org.jboss.portal.control.MESSAGE") %>
+<div class="portlet-font">Message: <%= EntityEncoder.FULL.encode(request.getAttribute("org.jboss.portal.control.MESSAGE").toString()) %>
</div>
<%
}
%>
-<div class="portlet-font">
- StackTrace: <%= Exceptions.toHTML((Throwable)request.getAttribute("org.jboss.portal.control.CAUSE")) %>
-</div>
\ No newline at end of file
+<div class="portlet-font">See log for stacktrace</div></div>
\ No newline at end of file
17 years, 3 months
JBoss Portal SVN: r12581 - modules/common/trunk/common/src/main/java/org/jboss/portal/common/util.
by portal-commits@lists.jboss.org
Author: thomas.heute(a)jboss.com
Date: 2009-01-21 06:34:21 -0500 (Wed, 21 Jan 2009)
New Revision: 12581
Modified:
modules/common/trunk/common/src/main/java/org/jboss/portal/common/util/Exceptions.java
Log:
Transform output using HTML entities
Modified: modules/common/trunk/common/src/main/java/org/jboss/portal/common/util/Exceptions.java
===================================================================
--- modules/common/trunk/common/src/main/java/org/jboss/portal/common/util/Exceptions.java 2009-01-21 00:29:06 UTC (rev 12580)
+++ modules/common/trunk/common/src/main/java/org/jboss/portal/common/util/Exceptions.java 2009-01-21 11:34:21 UTC (rev 12581)
@@ -21,6 +21,8 @@
* 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
******************************************************************************/
package org.jboss.portal.common.util;
+
+import org.jboss.portal.common.text.EntityEncoder;
/**
* @author <a href="mailto:julien@jboss.org">Julien Viet</a>
@@ -64,7 +66,7 @@
buffer.append("<div><pre style=\"text-align:left;\"><code>");
while (throwable != null)
{
- buffer.append(throwable.toString()).append('\n');
+ buffer.append(EntityEncoder.FULL.encode(throwable.toString())).append('\n');
StackTraceElement[] elts = throwable.getStackTrace();
for (int j = 0; j < elts.length; j++)
{
17 years, 3 months
JBoss Portal SVN: r12580 - in branches/JBoss_Portal_Branch_2_7: core/src/resources/portal-server-war and 2 other directories.
by portal-commits@lists.jboss.org
Author: chris.laprun(a)jboss.com
Date: 2009-01-20 19:29:06 -0500 (Tue, 20 Jan 2009)
New Revision: 12580
Removed:
branches/JBoss_Portal_Branch_2_7/server/src/main/org/jboss/portal/server/ParameterSanitizer.java
Modified:
branches/JBoss_Portal_Branch_2_7/build/build-thirdparty.xml
branches/JBoss_Portal_Branch_2_7/core/src/resources/portal-server-war/login.jsp
branches/JBoss_Portal_Branch_2_7/theme/src/main/org/jboss/portal/theme/servlet/DynaAjaxServlet.java
Log:
- JBPORTAL-2275: Replaced ParameterSanitizer by ParameterValidation.
- Use common SNAPSHOT to get latest ParameterValidation version.
Modified: branches/JBoss_Portal_Branch_2_7/build/build-thirdparty.xml
===================================================================
--- branches/JBoss_Portal_Branch_2_7/build/build-thirdparty.xml 2009-01-20 22:52:06 UTC (rev 12579)
+++ branches/JBoss_Portal_Branch_2_7/build/build-thirdparty.xml 2009-01-21 00:29:06 UTC (rev 12580)
@@ -1,4 +1,27 @@
<?xml version="1.0"?>
+<!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ ~ JBoss, a division of Red Hat ~
+ ~ Copyright 2009, Red Hat Middleware, LLC, and individual
+ ~ contributors as indicated by the @authors tag. See the
+ ~ copyright.txt in the distribution for a full listing of
+ ~ individual contributors.
+ ~
+ ~ This is free software; you can redistribute it and/or modify it
+ ~ under the terms of the GNU Lesser General Public License as
+ ~ published by the Free Software Foundation; either version 2.1 of
+ ~ the License, or (at your option) any later version.
+ ~
+ ~ This software is distributed in the hope that it will be useful,
+ ~ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ ~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ ~ Lesser General Public License for more details.
+ ~
+ ~ You should have received a copy of the GNU Lesser General Public
+ ~ License along with this software; if not, write to the Free
+ ~ Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ ~ 02110-1301 USA, or see the FSF site: http://www.fsf.org. ~
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
+
<project name="main.build" default="synchronize" basedir=".">
<!-- Property File definitions -->
@@ -41,7 +64,7 @@
are pushed to the http://repository.jboss.com site.
-->
- <componentref name="jboss-portal/modules/common" version="1.2.3"/>
+ <componentref name="jboss-portal/modules/common" version="trunk-SNAPSHOT"/>
<componentref name="jboss-portal/modules/web" version="1.2.3"/>
<componentref name="jboss-portal/modules/test" version="1.0.4"/>
<componentref name="jboss-portal/modules/portlet" version="2.0.5"/>
Modified: branches/JBoss_Portal_Branch_2_7/core/src/resources/portal-server-war/login.jsp
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core/src/resources/portal-server-war/login.jsp 2009-01-20 22:52:06 UTC (rev 12579)
+++ branches/JBoss_Portal_Branch_2_7/core/src/resources/portal-server-war/login.jsp 2009-01-21 00:29:06 UTC (rev 12580)
@@ -1,36 +1,35 @@
<%--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~ JBoss, a division of Red Hat ~
- ~ Copyright 2006, Red Hat Middleware, LLC, and individual ~
- ~ contributors as indicated by the @authors tag. See the ~
- ~ copyright.txt in the distribution for a full listing of ~
- ~ individual contributors. ~
- ~ ~
- ~ This is free software; you can redistribute it and/or modify it ~
- ~ under the terms of the GNU Lesser General Public License as ~
- ~ published by the Free Software Foundation; either version 2.1 of ~
- ~ the License, or (at your option) any later version. ~
- ~ ~
- ~ This software is distributed in the hope that it will be useful, ~
- ~ but WITHOUT ANY WARRANTY; without even the implied warranty of ~
- ~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ~
- ~ Lesser General Public License for more details. ~
- ~ ~
- ~ You should have received a copy of the GNU Lesser General Public ~
- ~ License along with this software; if not, write to the Free ~
- ~ Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA ~
+ ~ Copyright 2009, Red Hat Middleware, LLC, and individual
+ ~ contributors as indicated by the @authors tag. See the
+ ~ copyright.txt in the distribution for a full listing of
+ ~ individual contributors.
+ ~
+ ~ This is free software; you can redistribute it and/or modify it
+ ~ under the terms of the GNU Lesser General Public License as
+ ~ published by the Free Software Foundation; either version 2.1 of
+ ~ the License, or (at your option) any later version.
+ ~
+ ~ This software is distributed in the hope that it will be useful,
+ ~ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ ~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ ~ Lesser General Public License for more details.
+ ~
+ ~ You should have received a copy of the GNU Lesser General Public
+ ~ License along with this software; if not, write to the Free
+ ~ Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
~ 02110-1301 USA, or see the FSF site: http://www.fsf.org. ~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~--%>
<%@ page pageEncoding="utf-8" %>
+<%@page import="org.jboss.portal.common.util.ParameterValidation" %>
<%@page import="org.jboss.portal.identity.UserStatus" %>
-<%@page import="org.jboss.portal.server.ParameterSanitizer" %>
<%@page import="java.util.ResourceBundle" %>
<%
ResourceBundle rb = ResourceBundle.getBundle("Resource", request.getLocale());
- // todo: use ParameterValidation.sanitize after 2.7.1
String loginheight = request.getParameter("loginheight");
boolean paramPresent = loginheight != null;
- loginheight = ParameterSanitizer.sanitizeFromPattern(loginheight, ParameterSanitizer.CSS_DISTANCE, "300px");
+ loginheight = ParameterValidation.sanitizeFromPattern(loginheight, ParameterValidation.CSS_DISTANCE, "300px");
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
Deleted: branches/JBoss_Portal_Branch_2_7/server/src/main/org/jboss/portal/server/ParameterSanitizer.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/server/src/main/org/jboss/portal/server/ParameterSanitizer.java 2009-01-20 22:52:06 UTC (rev 12579)
+++ branches/JBoss_Portal_Branch_2_7/server/src/main/org/jboss/portal/server/ParameterSanitizer.java 2009-01-21 00:29:06 UTC (rev 12580)
@@ -1,71 +0,0 @@
-/*
-* JBoss, a division of Red Hat
-* Copyright 2008, Red Hat Middleware, LLC, and individual contributors as indicated
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* This is free software; you can redistribute it and/or modify it
-* under the terms of the GNU Lesser General Public License as
-* published by the Free Software Foundation; either version 2.1 of
-* the License, or (at your option) any later version.
-*
-* This software is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-* Lesser General Public License for more details.
-*
-* You should have received a copy of the GNU Lesser General Public
-* License along with this software; if not, write to the Free
-* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-*/
-
-package org.jboss.portal.server;
-
-import org.jboss.portal.common.util.ParameterValidation;
-
-import java.util.Arrays;
-import java.util.List;
-import java.util.regex.Pattern;
-
-/**
- * TODO
- *
- * @author <a href="mailto:chris.laprun@jboss.com">Chris Laprun</a>
- * @version $Revision$
- * @deprecated Should use {@link org.jboss.portal.common.util.ParameterValidation#sanitize*} instead starting with
- * 2.7.2
- */
-public class ParameterSanitizer
-{
- public final static Pattern CSS_DISTANCE = Pattern.compile("\\d+\\W*(em|ex|px|in|cm|mm|pt|pc|%)?");
-
- public static String sanitizeFromPattern(String value, Pattern regex, String defaultValue)
- {
- ParameterValidation.throwIllegalArgExceptionIfNull(regex, "expected value format");
-
- if (value == null || !regex.matcher(value).matches())
- {
- return defaultValue;
- }
- else
- {
- return value;
- }
- }
-
- public static String sanitizeFromValues(String value, String[] possibleValues, String defaultValue)
- {
- ParameterValidation.throwIllegalArgExceptionIfNullOrEmpty(possibleValues, "possible values");
-
- List<String> values = Arrays.asList(possibleValues);
- if (!values.contains(value))
- {
- return defaultValue;
- }
- else
- {
- return value;
- }
- }
-}
Modified: branches/JBoss_Portal_Branch_2_7/theme/src/main/org/jboss/portal/theme/servlet/DynaAjaxServlet.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/theme/src/main/org/jboss/portal/theme/servlet/DynaAjaxServlet.java 2009-01-20 22:52:06 UTC (rev 12579)
+++ branches/JBoss_Portal_Branch_2_7/theme/src/main/org/jboss/portal/theme/servlet/DynaAjaxServlet.java 2009-01-21 00:29:06 UTC (rev 12580)
@@ -1,6 +1,6 @@
/******************************************************************************
* JBoss, a division of Red Hat *
- * Copyright 2006, Red Hat Middleware, LLC, and individual *
+ * Copyright 2009, Red Hat Middleware, LLC, and individual *
* contributors as indicated by the @authors tag. See the *
* copyright.txt in the distribution for a full listing of *
* individual contributors. *
@@ -23,7 +23,7 @@
package org.jboss.portal.theme.servlet;
-import org.jboss.portal.server.ParameterSanitizer;
+import org.jboss.portal.common.util.ParameterValidation;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
@@ -52,7 +52,7 @@
public void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException
{
String actionValue = req.getParameter(ACTION);
- String response = ParameterSanitizer.sanitizeFromValues(actionValue, POSSIBLE_ACTION_VALUES, DEFAULT_RESPONSE);
+ String response = ParameterValidation.sanitizeFromValues(actionValue, POSSIBLE_ACTION_VALUES, DEFAULT_RESPONSE);
sendResp(resp, response);
}
17 years, 3 months
JBoss Portal SVN: r12579 - branches/JBoss_Portal_Branch_2_7/theme/src/main/org/jboss/portal/theme/impl/render/dynamic.
by portal-commits@lists.jboss.org
Author: chris.laprun(a)jboss.com
Date: 2009-01-20 17:52:06 -0500 (Tue, 20 Jan 2009)
New Revision: 12579
Modified:
branches/JBoss_Portal_Branch_2_7/theme/src/main/org/jboss/portal/theme/impl/render/dynamic/DynaRegionRenderer.java
Log:
- Include local dragdrop.js and effects.js instead of retrieving them over the network. Fixes issues with repeater portlet not working properly.
Modified: branches/JBoss_Portal_Branch_2_7/theme/src/main/org/jboss/portal/theme/impl/render/dynamic/DynaRegionRenderer.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/theme/src/main/org/jboss/portal/theme/impl/render/dynamic/DynaRegionRenderer.java 2009-01-20 22:48:48 UTC (rev 12578)
+++ branches/JBoss_Portal_Branch_2_7/theme/src/main/org/jboss/portal/theme/impl/render/dynamic/DynaRegionRenderer.java 2009-01-20 22:52:06 UTC (rev 12579)
@@ -1,6 +1,6 @@
/******************************************************************************
* JBoss, a division of Red Hat *
- * Copyright 2006, Red Hat Middleware, LLC, and individual *
+ * Copyright 2009, Red Hat Middleware, LLC, and individual *
* contributors as indicated by the @authors tag. See the *
* copyright.txt in the distribution for a full listing of *
* individual contributors. *
@@ -20,29 +20,9 @@
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
* 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
******************************************************************************/
-/****dr**************************************************************************
- * JBoss, a division of Red Hat *
- * Copyright 2006, Red Hat Middleware, LLC, and individual *
- * contributors as indicated by the @authors tag. See the *
- * copyright.txt in the distribution for a full listing of *
- * individual contributors. *
- * *
- * This is free software; you can redistribute it and/or modify it *
- * under the terms of the GNU Lesser General Public License as *
- * published by the Free Software Foundation; either version 2.1 of *
- * the License, or (at your option) any later version. *
- * *
- * This software is distributed in the hope that it will be useful, *
- * but WITHOUT ANY WARRANTY; without even the implied warranty of *
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
- * Lesser General Public License for more details. *
- * *
- * You should have received a copy of the GNU Lesser General Public *
- * License along with this software; if not, write to the Free *
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
- ******************************************************************************/
+
+
package org.jboss.portal.theme.impl.render.dynamic;
import org.jboss.portal.theme.render.AbstractObjectRenderer;
@@ -132,9 +112,12 @@
markup.print("/prototype.js'></script>\n");
markup.print("<script type='text/javascript' src='");
markup.print(jsBase);
- markup.print("/scriptaculous.js?load=effects,dragdrop'></script>\n");
+ markup.print("/effects.js'></script>\n");
markup.print("<script type='text/javascript' src='");
markup.print(jsBase);
+ markup.print("/dragdrop.js'></script>\n");
+ markup.print("<script type='text/javascript' src='");
+ markup.print(jsBase);
markup.print("/dyna.js'></script>\n");
markup.print("<script type='text/javascript'>\n");
17 years, 3 months
JBoss Portal SVN: r12578 - branches/JBoss_Portal_Branch_2_7/core-samples/src/main/org/jboss/portal/core/samples/basic.
by portal-commits@lists.jboss.org
Author: chris.laprun(a)jboss.com
Date: 2009-01-20 17:48:48 -0500 (Tue, 20 Jan 2009)
New Revision: 12578
Modified:
branches/JBoss_Portal_Branch_2_7/core-samples/src/main/org/jboss/portal/core/samples/basic/RepeatRefreshPortlet.java
Log:
- Cleaned-up
Modified: branches/JBoss_Portal_Branch_2_7/core-samples/src/main/org/jboss/portal/core/samples/basic/RepeatRefreshPortlet.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core-samples/src/main/org/jboss/portal/core/samples/basic/RepeatRefreshPortlet.java 2009-01-20 21:34:24 UTC (rev 12577)
+++ branches/JBoss_Portal_Branch_2_7/core-samples/src/main/org/jboss/portal/core/samples/basic/RepeatRefreshPortlet.java 2009-01-20 22:48:48 UTC (rev 12578)
@@ -1,6 +1,6 @@
/******************************************************************************
* JBoss, a division of Red Hat *
- * Copyright 2006, Red Hat Middleware, LLC, and individual *
+ * Copyright 2009, Red Hat Middleware, LLC, and individual *
* contributors as indicated by the @authors tag. See the *
* copyright.txt in the distribution for a full listing of *
* individual contributors. *
@@ -22,22 +22,16 @@
******************************************************************************/
package org.jboss.portal.core.samples.basic;
-import java.io.IOException;
-import java.io.PrintWriter;
import javax.portlet.GenericPortlet;
+import javax.portlet.PortletContext;
+import javax.portlet.PortletException;
+import javax.portlet.PortletRequestDispatcher;
import javax.portlet.RenderRequest;
import javax.portlet.RenderResponse;
-import javax.portlet.PortletException;
import javax.portlet.ResourceRequest;
import javax.portlet.ResourceResponse;
-import javax.portlet.ResourceURL;
-import javax.portlet.ActionRequest;
-import javax.portlet.ActionResponse;
-import javax.portlet.PortletSecurityException;
-import javax.portlet.PortletURL;
-import javax.portlet.PortletMode;
-import javax.portlet.PortletRequestDispatcher;
-import javax.portlet.PortletContext;
+import java.io.IOException;
+import java.io.PrintWriter;
/**
* @author <a href="mailto:whales@redhat.com">Wesley Hales</a>
@@ -47,58 +41,50 @@
{
private static final String JSP_PATH = "/WEB-INF/jsp/ajax";
- public void processAction(ActionRequest req, ActionResponse resp) throws PortletException, PortletSecurityException, IOException
- {
-
- //String repeatText = req.getParameter("repeat");
- // set the text from form input
- //if (repeatText != null){
- //resp.setRenderParameter("repeat", repeatText);
- //}
- // request view
- //resp.setPortletMode(PortletMode.VIEW);
-
- }
public void render(RenderRequest renderRequest, RenderResponse renderResponse) throws PortletException, IOException
{
PortletContext context = getPortletContext();
PortletRequestDispatcher rd = context.getRequestDispatcher(JSP_PATH + "/repeatrefresh.jsp");
rd.include(renderRequest, renderResponse);
}
+
public void serveResource(ResourceRequest req, ResourceResponse resp) throws PortletException, IOException
{
String repeatText = req.getParameter("repeat");
String prodId = req.getParameter("prodId");
- String namespace =resp.getNamespace();
-
resp.setContentType("text/html");
PrintWriter writer = resp.getWriter();
- if (repeatText != null){
- writer.print("<div id=\"repeat-text\">"+ req.getPrivateParameterMap().get("repeat")[0] +"</div>");
+ if (repeatText != null)
+ {
+ writer.print("<div id=\"repeat-text\">" + req.getPrivateParameterMap().get("repeat")[0] + "</div>");
}
- if (prodId != null){
- if (prodId.equals("1")){
- writer.print("<div id=\"product-text\">Product ID: "+ prodId +"" +
- "<br/>" +
- " B BY BURTON ALPHA<br/>" +
- "Sale Price: $314.96 " +
- "</div>");
+ if (prodId != null)
+ {
+ if (prodId.equals("1"))
+ {
+ writer.print("<div id=\"product-text\">Product ID: " + prodId + "" +
+ "<br/>" +
+ " B BY BURTON ALPHA<br/>" +
+ "Sale Price: $314.96 " +
+ "</div>");
}
- if (prodId.equals("2")){
- writer.print("<div id=\"product-text\">Product ID: "+ prodId +"" +
- "<br/>" +
+ if (prodId.equals("2"))
+ {
+ writer.print("<div id=\"product-text\">Product ID: " + prodId + "" +
+ "<br/>" +
"FORUM DESTROYER LTD<br/>" +
"$319.99 " +
- "</div>");
+ "</div>");
}
- if (prodId.equals("3")){
- writer.print("<div id=\"product-text\">Product ID: "+ prodId +"" +
- "<br/>" +
- "\n" +
+ if (prodId.equals("3"))
+ {
+ writer.print("<div id=\"product-text\">Product ID: " + prodId + "" +
+ "<br/>" +
+ "\n" +
"SANTA CRUZ ALLSTAR<br/>" +
"$256.00 " +
- "</div>");
+ "</div>");
}
}
17 years, 3 months
JBoss Portal SVN: r12577 - in branches/JBoss_Portal_Branch_2_7: theme and 1 other directory.
by portal-commits@lists.jboss.org
Author: thomas.heute(a)jboss.com
Date: 2009-01-20 16:34:24 -0500 (Tue, 20 Jan 2009)
New Revision: 12577
Modified:
branches/JBoss_Portal_Branch_2_7/core-cms/src/resources/portal-cms-war/WEB-INF/jsp/cms/admin/confirmcopy.jsp
branches/JBoss_Portal_Branch_2_7/core-cms/src/resources/portal-cms-war/WEB-INF/jsp/cms/admin/confirmdelete.jsp
branches/JBoss_Portal_Branch_2_7/core-cms/src/resources/portal-cms-war/WEB-INF/jsp/cms/admin/confirmmove.jsp
branches/JBoss_Portal_Branch_2_7/core-cms/src/resources/portal-cms-war/WEB-INF/jsp/cms/admin/create.jsp
branches/JBoss_Portal_Branch_2_7/core-cms/src/resources/portal-cms-war/WEB-INF/jsp/cms/admin/edit.jsp
branches/JBoss_Portal_Branch_2_7/core-cms/src/resources/portal-cms-war/WEB-INF/jsp/cms/admin/main.jsp
branches/JBoss_Portal_Branch_2_7/core-cms/src/resources/portal-cms-war/WEB-INF/jsp/cms/admin/securenode.jsp
branches/JBoss_Portal_Branch_2_7/core-cms/src/resources/portal-cms-war/WEB-INF/jsp/cms/admin/viewfile.jsp
branches/JBoss_Portal_Branch_2_7/theme/.classpath
Log:
- Encode before rendering
- Fix Eclipse classpath
Modified: branches/JBoss_Portal_Branch_2_7/core-cms/src/resources/portal-cms-war/WEB-INF/jsp/cms/admin/confirmcopy.jsp
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core-cms/src/resources/portal-cms-war/WEB-INF/jsp/cms/admin/confirmcopy.jsp 2009-01-20 21:30:31 UTC (rev 12576)
+++ branches/JBoss_Portal_Branch_2_7/core-cms/src/resources/portal-cms-war/WEB-INF/jsp/cms/admin/confirmcopy.jsp 2009-01-20 21:34:24 UTC (rev 12577)
@@ -1,4 +1,6 @@
<%@ page language="java" extends="org.jboss.portal.core.servlet.jsp.PortalJsp" %>
+<%@ page import="org.jboss.portal.common.text.EntityEncoder" %>
+
<%@ taglib uri="http://java.sun.com/portlet_2_0" prefix="portlet" %>
<%@ taglib uri="/WEB-INF/portal-lib.tld" prefix="n" %>
<%@ page isELIgnored="false" %>
@@ -27,7 +29,7 @@
<table>
<tr>
<td>${n:i18n("CMS_SOURCE")}:</td>
- <td><%= sCurrPath %>
+ <td><%= EntityEncoder.FULL.encode(sCurrPath) %>
</td>
</tr>
<tr>
Modified: branches/JBoss_Portal_Branch_2_7/core-cms/src/resources/portal-cms-war/WEB-INF/jsp/cms/admin/confirmdelete.jsp
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core-cms/src/resources/portal-cms-war/WEB-INF/jsp/cms/admin/confirmdelete.jsp 2009-01-20 21:30:31 UTC (rev 12576)
+++ branches/JBoss_Portal_Branch_2_7/core-cms/src/resources/portal-cms-war/WEB-INF/jsp/cms/admin/confirmdelete.jsp 2009-01-20 21:34:24 UTC (rev 12577)
@@ -1,5 +1,7 @@
<%@ page import="org.jboss.portal.cms.util.NodeUtil" %>
<%@ page import="org.jboss.portal.core.cms.ui.admin.CMSAdminConstants" %>
+<%@ page import="org.jboss.portal.common.text.EntityEncoder" %>
+
<%@ page language="java" extends="org.jboss.portal.core.servlet.jsp.PortalJsp" %>
<%@ taglib uri="http://java.sun.com/portlet_2_0" prefix="portlet" %>
<%@ taglib uri="/WEB-INF/portal-lib.tld" prefix="n" %>
@@ -24,7 +26,7 @@
<tr>
<td align="center">
- <font class="portlet-font">${n:i18n("CMS_DELETEPATH")} <%= sCurrPath %>
+ <font class="portlet-font">${n:i18n("CMS_DELETEPATH")} <%= EntityEncoder.FULL.encode(sCurrPath) %>
</font>
<br><br>
<font class="portlet-font" style="color:red"><b>${n:i18n("CMS_DELETEWARN1")}</b></font>
Modified: branches/JBoss_Portal_Branch_2_7/core-cms/src/resources/portal-cms-war/WEB-INF/jsp/cms/admin/confirmmove.jsp
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core-cms/src/resources/portal-cms-war/WEB-INF/jsp/cms/admin/confirmmove.jsp 2009-01-20 21:30:31 UTC (rev 12576)
+++ branches/JBoss_Portal_Branch_2_7/core-cms/src/resources/portal-cms-war/WEB-INF/jsp/cms/admin/confirmmove.jsp 2009-01-20 21:34:24 UTC (rev 12577)
@@ -2,7 +2,9 @@
<%@ taglib uri="http://java.sun.com/portlet_2_0" prefix="portlet" %>
<%@ taglib uri="/WEB-INF/portal-lib.tld" prefix="n" %>
<%@ page isELIgnored="false" %>
+<%@ page import="org.jboss.portal.common.text.EntityEncoder" %>
+
<%
String sCurrPath = (String)request.getAttribute("currpath");
String OP = CMSAdminConstants.OP_CONFIRMMOVE;
@@ -31,7 +33,7 @@
<table>
<tr>
<td>${n:i18n("CMS_SOURCE")}:</td>
- <td><%= sCurrPath %>
+ <td><%= EntityEncoder.FULL.encode(sCurrPath) %>
</td>
</tr>
<tr>
Modified: branches/JBoss_Portal_Branch_2_7/core-cms/src/resources/portal-cms-war/WEB-INF/jsp/cms/admin/create.jsp
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core-cms/src/resources/portal-cms-war/WEB-INF/jsp/cms/admin/create.jsp 2009-01-20 21:30:31 UTC (rev 12576)
+++ branches/JBoss_Portal_Branch_2_7/core-cms/src/resources/portal-cms-war/WEB-INF/jsp/cms/admin/create.jsp 2009-01-20 21:34:24 UTC (rev 12577)
@@ -2,6 +2,8 @@
org.jboss.portal.core.cms.ui.admin.CMSAdminConstants,
java.util.Locale" %>
<%@ page language="java" extends="org.jboss.portal.core.servlet.jsp.PortalJsp" %>
+<%@ page import="org.jboss.portal.common.text.EntityEncoder" %>
+
<%@ taglib uri="http://java.sun.com/portlet_2_0" prefix="portlet" %>
<%@ taglib uri="/WEB-INF/portal-lib.tld" prefix="n" %>
<%@ page isELIgnored="false" %>
@@ -126,7 +128,7 @@
<tr>
<td>${n:i18n("CMS_CREATEFILEINDIR")}:
</td>
- <td><%= sCurrPath %>
+ <td><%= EntityEncoder.FULL.encode(sCurrPath) %>
</td>
</tr>
<tr>
Modified: branches/JBoss_Portal_Branch_2_7/core-cms/src/resources/portal-cms-war/WEB-INF/jsp/cms/admin/edit.jsp
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core-cms/src/resources/portal-cms-war/WEB-INF/jsp/cms/admin/edit.jsp 2009-01-20 21:30:31 UTC (rev 12576)
+++ branches/JBoss_Portal_Branch_2_7/core-cms/src/resources/portal-cms-war/WEB-INF/jsp/cms/admin/edit.jsp 2009-01-20 21:34:24 UTC (rev 12577)
@@ -1,4 +1,5 @@
<%@ page import="org.jboss.portal.core.cms.ui.admin.CMSAdminConstants" %>
+<%@ page import="org.jboss.portal.common.text.EntityEncoder" %>
<%@ page import="java.util.Locale" %>
<%@ page language="java" extends="org.jboss.portal.core.servlet.jsp.PortalJsp" %>
<%@ taglib uri="http://java.sun.com/portlet_2_0" prefix="portlet" %>
@@ -81,7 +82,7 @@
<tr>
<td>${n:i18n("CMS_EDITING")}:
</td>
- <td><%= sCurrPath %>
+ <td><%= EntityEncoder.FULL.encode(sCurrPath) %>
</td>
</tr>
<tr>
Modified: branches/JBoss_Portal_Branch_2_7/core-cms/src/resources/portal-cms-war/WEB-INF/jsp/cms/admin/main.jsp
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core-cms/src/resources/portal-cms-war/WEB-INF/jsp/cms/admin/main.jsp 2009-01-20 21:30:31 UTC (rev 12576)
+++ branches/JBoss_Portal_Branch_2_7/core-cms/src/resources/portal-cms-war/WEB-INF/jsp/cms/admin/main.jsp 2009-01-20 21:34:24 UTC (rev 12577)
@@ -1,9 +1,11 @@
<%@ page import="org.jboss.portal.cms.model.File" %>
<%@ page import="org.jboss.portal.cms.model.Folder" %>
<%@ page import="org.jboss.portal.core.cms.ui.admin.CMSAdminConstants" %>
+<%@ page import="org.jboss.portal.common.text.EntityEncoder" %>
<%@ page import="java.text.Format" %>
<%@ page import="java.util.List" %>
<%@ page import="java.util.StringTokenizer" %>
+
<%@ page language="java" extends="org.jboss.portal.core.servlet.jsp.PortalJsp" %>
<%@ taglib uri="/WEB-INF/portal-lib.tld" prefix="n" %>
<%@ taglib uri="http://java.sun.com/portlet_2_0" prefix="portlet" %>
@@ -79,7 +81,7 @@
<portlet:param name="op" value="<%= CMSAdminConstants.OP_MAIN %>"/>
<portlet:param name="path" value="<%= sPathBuilder %>"/>
</portlet:renderURL>
-"><%= sPathChunk %>
+"><%= EntityEncoder.FULL.encode(sPathChunk) %>
</a>
</li>
<%
@@ -88,7 +90,7 @@
{
%>
<li class="pathSeperator"><img src="/portal-admin/img/pathSeparator.png" alt=">"></li>
- <li class="selected"><%= sPathChunk %>
+ <li class="selected"><%= EntityEncoder.FULL.encode(sPathChunk) %>
</li>
<%
}
@@ -218,7 +220,7 @@
<portlet:param name="op" value="<%= CMSAdminConstants.OP_MAIN %>"/>
<portlet:param name="path" value="<%= folder.getBasePath() %>"/>
</portlet:renderURL>"><%=
- folder.getBasePath().substring(folder.getBasePath().lastIndexOf("/") + 1, folder.getBasePath().length()) %>
+ EntityEncoder.FULL.encode(folder.getBasePath().substring(folder.getBasePath().lastIndexOf("/") + 1, folder.getBasePath().length())) %>
</a>
</td>
<td>
@@ -274,7 +276,7 @@
<portlet:param name="path"
value="<%= file.getBasePath() %>"/>
</portlet:renderURL>"><%=
- file.getBasePath().substring(file.getBasePath().lastIndexOf("/") + 1, file.getBasePath().length()) %>
+ EntityEncoder.FULL.encode(file.getBasePath().substring(file.getBasePath().lastIndexOf("/") + 1, file.getBasePath().length())) %>
</a>
</td>
<td>
Modified: branches/JBoss_Portal_Branch_2_7/core-cms/src/resources/portal-cms-war/WEB-INF/jsp/cms/admin/securenode.jsp
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core-cms/src/resources/portal-cms-war/WEB-INF/jsp/cms/admin/securenode.jsp 2009-01-20 21:30:31 UTC (rev 12576)
+++ branches/JBoss_Portal_Branch_2_7/core-cms/src/resources/portal-cms-war/WEB-INF/jsp/cms/admin/securenode.jsp 2009-01-20 21:34:24 UTC (rev 12577)
@@ -1,4 +1,5 @@
<%@ page import="org.jboss.portal.core.cms.ui.admin.CMSAdminConstants" %>
+<%@ page import="org.jboss.portal.common.text.EntityEncoder" %>
<%@ page import="org.jboss.portal.identity.Role" %>
<%@ page import="org.jboss.portal.identity.User" %>
<%@ page import="org.jboss.portal.cms.security.AuthorizationManager" %>
@@ -50,7 +51,7 @@
%>
<tr>
<td colspan="2">
- <font class="portlet-font">${n:i18n("CMS_CONFIGURE_RESTRICTION")}: <%= sCurrPath %>
+ <font class="portlet-font">${n:i18n("CMS_CONFIGURE_RESTRICTION")}: <%= EntityEncoder.FULL.encode(sCurrPath) %>
</font>
</td>
</tr>
Modified: branches/JBoss_Portal_Branch_2_7/core-cms/src/resources/portal-cms-war/WEB-INF/jsp/cms/admin/viewfile.jsp
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core-cms/src/resources/portal-cms-war/WEB-INF/jsp/cms/admin/viewfile.jsp 2009-01-20 21:30:31 UTC (rev 12576)
+++ branches/JBoss_Portal_Branch_2_7/core-cms/src/resources/portal-cms-war/WEB-INF/jsp/cms/admin/viewfile.jsp 2009-01-20 21:34:24 UTC (rev 12577)
@@ -6,6 +6,7 @@
<%@ page import="org.jboss.portal.cms.model.Content" %>
<%@ page import="org.jboss.portal.cms.util.NodeUtil" %>
<%@ page import="org.jboss.portal.core.cms.ui.admin.CMSAdminConstants" %>
+<%@ page import="org.jboss.portal.common.text.EntityEncoder" %>
<%@ page import="java.text.Format" %>
<%@ page import="java.util.Collection" %>
<%@ page import="java.util.Iterator" %>
@@ -77,7 +78,7 @@
<portlet:param name="op" value="<%= CMSAdminConstants.OP_MAIN %>"/>
<portlet:param name="path" value="<%= sPathBuilder %>"/>
</portlet:renderURL>
-"><%= sPathChunk %>
+"><%= EntityEncoder.FULL.encode(sPathChunk) %>
</a>
</li>
<%
@@ -86,7 +87,7 @@
{
%>
<li class="pathSeperator"><img src="/portal-admin/img/pathSeparator.png" alt=">"></li>
- <li class="selected"><%= sPathChunk %>
+ <li class="selected"><%= EntityEncoder.FULL.encode(sPathChunk) %>
</li>
<%
}
@@ -334,7 +335,7 @@
%>
<%= modifiedDate %>
</td>
- <td><%= version.getTitle() %>
+ <td><%= EntityEncoder.FULL.encode(version.getTitle()) %>
</td>
</tr>
<%}%>
Modified: branches/JBoss_Portal_Branch_2_7/theme/.classpath
===================================================================
--- branches/JBoss_Portal_Branch_2_7/theme/.classpath 2009-01-20 21:30:31 UTC (rev 12576)
+++ branches/JBoss_Portal_Branch_2_7/theme/.classpath 2009-01-20 21:34:24 UTC (rev 12577)
@@ -19,5 +19,6 @@
<classpathentry kind="lib" path="/thirdparty/jboss-portal/modules/common/lib/portal-common-portal-lib.jar"/>
<classpathentry kind="lib" path="/thirdparty/jboss-portal/modules/test/lib/portal-test-lib.jar"/>
<classpathentry kind="lib" path="/thirdparty/sun-servlet/lib/servlet-api.jar"/>
+ <classpathentry kind="lib" path="/thirdparty/apache-xerces/lib/xercesImpl.jar"/>
<classpathentry kind="output" path="output/classes"/>
</classpath>
17 years, 3 months
JBoss Portal SVN: r12576 - in branches/Enterprise_Portal_Platform_4_3/testsuite/ui-tests: src/org/jboss/portal/test/selenium and 2 other directories.
by portal-commits@lists.jboss.org
Author: thomas.heute(a)jboss.com
Date: 2009-01-20 16:30:31 -0500 (Tue, 20 Jan 2009)
New Revision: 12576
Modified:
branches/Enterprise_Portal_Platform_4_3/testsuite/ui-tests/build.xml
branches/Enterprise_Portal_Platform_4_3/testsuite/ui-tests/src/org/jboss/portal/test/selenium/JBossSelenium.java
branches/Enterprise_Portal_Platform_4_3/testsuite/ui-tests/src/org/jboss/portal/test/selenium/cms/CMSArchiveUploadTestCase.java
branches/Enterprise_Portal_Platform_4_3/testsuite/ui-tests/src/org/jboss/portal/test/selenium/cms/CMSSecureTestCase.java
branches/Enterprise_Portal_Platform_4_3/testsuite/ui-tests/src/org/jboss/portal/test/selenium/portal/PortletInstancesTestCase.java
Log:
Tests tweaks
Modified: branches/Enterprise_Portal_Platform_4_3/testsuite/ui-tests/build.xml
===================================================================
--- branches/Enterprise_Portal_Platform_4_3/testsuite/ui-tests/build.xml 2009-01-20 21:27:14 UTC (rev 12575)
+++ branches/Enterprise_Portal_Platform_4_3/testsuite/ui-tests/build.xml 2009-01-20 21:30:31 UTC (rev 12576)
@@ -2,11 +2,12 @@
<property environment="env" />
+ <property name="workspace" location="build.xml" />
<property name="java.home" location="${env.JAVA_HOME}" />
<property name="suitename" location="testng-files" />
<property name="testname" location="testng-files" />
-
+
<property name="testng.dir" location="testng-files" />
<property name="testng.output.dir" location="test-output" />
<property name="test.build.dir" location="output/classes" />
@@ -55,11 +56,11 @@
<classpath refid="server.taskdef.classpath" />
</taskdef>
-<target name="init">
+ <target name="init">
<echo message="Browser : ${browser}" />
<echo message="Screenshot : ${screenshot}" />
- <echo message="Deleting testng report directory"/>
- <delete dir="${testng.output.dir}"/>
+ <echo message="Deleting testng report directory" />
+ <delete dir="${testng.output.dir}" />
</target>
@@ -89,8 +90,8 @@
</target>
<target name="copyApps">
- <echo message="Copying userInterceptor portlet into the ${portal.instance} server"/>
- <copy file="apps/userDetail-portlet.war" tofile="${jboss.home}/server/${portal.instance}/deploy/userDetail-portlet.war"/>
+ <echo message="Copying userInterceptor portlet into the ${portal.instance} server" />
+ <copy file="apps/userDetail-portlet.war" tofile="${jboss.home}/server/${portal.instance}/deploy/userDetail-portlet.war" />
</target>
<target name="clean">
@@ -120,8 +121,7 @@
<echo message="Runing TestNG" />
<mkdir dir="test-output" />
- <testng classpathref="test.cp" sourcedir="${test.src.dir}" outputdir="test-output" listeners="org.testng.reporters.JUnitXMLReporter"
- suitename="SeleniumSuite">
+ <testng classpathref="test.cp" sourcedir="${test.src.dir}" outputdir="test-output" listeners="org.testng.reporters.JUnitXMLReporter" suitename="SeleniumSuite">
<xmlfileset dir="." includes="testng.xml" />
@@ -137,32 +137,33 @@
<antcall target="cleanup" />
</target>
- <target name="single-test" depends="init, compile, run-src">
+ <target name="single-test" depends="init, compile, run-src, copyApps">
+ <echo message="Runing TestNG" />
- <testng classpathref="test.cp" sourcedir="${test.src.dir}" outputdir="${testng.output.dir}" suitename="SeleniumTest" testname="org.jboss.portal.test.selenium.SingleTestCase">
-<!-- listeners="org.testng.reporters.JUnitXMLReporter"-->
- <classfileset dir="${test.build.dir}"
- includes="${testname}" />
+ <mkdir dir="test-output" />
+ <testng classpathref="test.cp" sourcedir="${test.src.dir}" outputdir="${testng.output.dir}" suitename="SeleniumSingleTest" listeners="org.jboss.portal.test.selenium.JBossSeleniumTestListener">
+
+ <classfileset dir="${test.build.dir}" includes="${testname}" />
<sysproperty key="browser" value="${browser}" />
<sysproperty key="screenshot" value="${screenshot}" />
+ <sysproperty key="workspace" value="${workspace}" />
+
<jvmarg value="-ea" />
</testng>
</target>
- <target name="selenium-test" depends="init, compile, run-src">
+ <target name="selenium-test" depends="init, compile, run-src, copyApps">
+ <echo message="Runing TestNG" />
- <antcall target="copyApps" />
- <echo message="Runing TestNG" />
<mkdir dir="test-output" />
- <testng classpathref="test.cp" sourcedir="${test.src.dir}" outputdir="${testng.output.dir}"
- suitename="SeleniumSuite">
+ <testng classpathref="test.cp" sourcedir="${test.src.dir}" outputdir="${testng.output.dir}" suitename="SeleniumSuite">
<xmlfileset dir="." includes="testng.xml" />
<sysproperty key="browser" value="${browser}" />
<sysproperty key="screenshot" value="${screenshot}" />
- <sysproperty key="workspace" value="${workspace}"/>
+ <sysproperty key="workspace" value="${workspace}" />
<jvmarg value="-ea" />
Modified: branches/Enterprise_Portal_Platform_4_3/testsuite/ui-tests/src/org/jboss/portal/test/selenium/JBossSelenium.java
===================================================================
--- branches/Enterprise_Portal_Platform_4_3/testsuite/ui-tests/src/org/jboss/portal/test/selenium/JBossSelenium.java 2009-01-20 21:27:14 UTC (rev 12575)
+++ branches/Enterprise_Portal_Platform_4_3/testsuite/ui-tests/src/org/jboss/portal/test/selenium/JBossSelenium.java 2009-01-20 21:30:31 UTC (rev 12576)
@@ -13,7 +13,7 @@
public class JBossSelenium extends DefaultSelenium {
- protected static String PAGE_LOAD= "350000";
+ protected static String PAGE_LOAD= "500000";
protected static int count;
@Override
Modified: branches/Enterprise_Portal_Platform_4_3/testsuite/ui-tests/src/org/jboss/portal/test/selenium/cms/CMSArchiveUploadTestCase.java
===================================================================
--- branches/Enterprise_Portal_Platform_4_3/testsuite/ui-tests/src/org/jboss/portal/test/selenium/cms/CMSArchiveUploadTestCase.java 2009-01-20 21:27:14 UTC (rev 12575)
+++ branches/Enterprise_Portal_Platform_4_3/testsuite/ui-tests/src/org/jboss/portal/test/selenium/cms/CMSArchiveUploadTestCase.java 2009-01-20 21:30:31 UTC (rev 12576)
@@ -12,15 +12,17 @@
@Test(groups = { "cms_archive_upload" }, enabled = true)
public class CMSArchiveUploadTestCase extends JBossPortalSeleniumTestCase {
-
- private static final String ARCHIVE_WAITING = "90000";
- /* uncomment following lines and set the right path to the workspace in the case
- * you want to use this test case locally from eclipse */
+
+ private static final String ARCHIVE_WAITING = "60000";
/*
- {
- System.setProperty("workspace","/home/vrockai/workspace/selenium/selenium/");
- }
- */
+ * uncomment following lines and set the right path to the workspace in the
+ * case you want to use this test case locally from eclipse
+ */
+ /*
+ * {
+ * System.setProperty("workspace","/home/vrockai/workspace/p2.7tests/ui-tests/"
+ * ); }
+ */
private static final String SUB_CANCEL_ARCH_UPLOAD = "cancel";
private static final String LNK_ADMIN = "link=Admin";
private static final String LNK_CMS = "link=CMS";
@@ -30,21 +32,21 @@
private static final String SEL_ACTION = "//div[@id='center']/div/div/div[1]/div/select";
private final String WORKSPACE = System.getProperty("workspace");
- @BeforeMethod( groups = { "log" })
+ @BeforeMethod(groups = { "log" })
public void loginBeforeTest() {
logoutIfPossible();
login("admin", "admin");
}
- @AfterMethod( groups = { "log" })
+ @AfterMethod(groups = { "log" })
public void logoutAfterTest() {
-
+
}
@Test(enabled = true, description = "Test archive consisting of two files upload.")
public void testArchiveUpload() {
// canceling at the first stage
-
+
selenium.click(LNK_ADMIN);
selenium.waitForPageToLoad(PAGE_LOAD);
selenium.click(LNK_CMS);
@@ -54,18 +56,18 @@
selenium.waitForPageToLoad(PAGE_LOAD);
selenium.waitForPopUp("_top", PAGE_LOAD);
selenium.type(INP_ARCHIVE_FILE, WORKSPACE + "/test_files/archive.zip");
-
+
selenium.click(SUB_CANCEL_ARCH_UPLOAD);
selenium.waitForPageToLoad(PAGE_LOAD);
-
-
- Assert.assertFalse(selenium.isTextPresent("Your archive has been accepted for processing"));
- Assert.assertFalse(selenium.isElementPresent("link=archive"));
-
+
+ Assert.assertFalse(selenium.isTextPresent("Your archive has been accepted for processing"),
+ "archive was accepted for processing afte cancelling the upload");
+ Assert.assertFalse(selenium.isElementPresent("link=archive"), "not uploaded (upload cancelled) archive found #1");
+
selenium.open(ADDR_PORTAL);
selenium.waitForPageToLoad(PAGE_LOAD);
- Assert.assertFalse(selenium.isElementPresent("link=archive"));
-
+ Assert.assertFalse(selenium.isElementPresent("link=archive"), "not uploaded (upload cancelled) archive found #2");
+
// really uploading the file now
selenium.click(LNK_ADMIN);
selenium.waitForPageToLoad(PAGE_LOAD);
@@ -76,12 +78,10 @@
selenium.waitForPageToLoad(PAGE_LOAD);
selenium.waitForPopUp("_top", PAGE_LOAD);
selenium.type(INP_ARCHIVE_FILE, WORKSPACE + "/test_files/archive.zip");
-
+
selenium.click(SUB_SEND_ARCHIVE);
selenium.waitForPageToLoad(PAGE_LOAD);
- //
-
- selenium.waitForPageToLoad(PAGE_LOAD);
+
Assert.assertEquals(selenium.getText(DIV_ARCHIVE_STATUS),
"Your archive has been accepted for processing. The resources will appear in your Folder once the processing is finished");
@@ -89,19 +89,19 @@
selenium.click("link=Home");
selenium.setSpeed("0");
selenium.waitForPageToLoad(PAGE_LOAD);
-
- Assert.assertEquals(selenium.getText("link=archive"), "archive");
+ Assert.assertTrue(selenium.isElementPresent("link=archive"), "uploaded archive not found");
+
selenium.click("link=archive");
selenium.waitForPageToLoad(PAGE_LOAD);
- Assert.assertEquals(selenium.getText("link=readme.txt"), "readme.txt");
- Assert.assertEquals(selenium.getText("link=jbosslogo.png"), "jbosslogo.png");
+ Assert.assertEquals(selenium.isElementPresent("link=readme.txt"), "content of uploaded file not found #1");
+ Assert.assertEquals(selenium.isElementPresent("link=jbosslogo.png"), "content of uploaded file not found #2");
}
-
+
@Test(enabled = true, description = "Test archive consisting of > 100 files upload.")
public void testManyFilesArchiveUpload() {
-
+
selenium.click(LNK_ADMIN);
selenium.waitForPageToLoad(PAGE_LOAD);
selenium.click(LNK_CMS);
@@ -111,7 +111,7 @@
selenium.waitForPageToLoad(PAGE_LOAD);
selenium.waitForPopUp("_top", PAGE_LOAD);
selenium.type(INP_ARCHIVE_FILE, WORKSPACE + "/test_files/many_files.zip");
-
+
selenium.click(SUB_SEND_ARCHIVE);
selenium.waitForPageToLoad(PAGE_LOAD);
@@ -122,20 +122,18 @@
selenium.click("link=Home");
selenium.setSpeed("0");
selenium.waitForPageToLoad(PAGE_LOAD);
-
- Assert.assertTrue(selenium.isElementPresent("link=many_files"));
+ Assert.assertTrue(selenium.isElementPresent("link=many_files"), "uploaded archive not found");
+
selenium.click("link=many_files");
selenium.waitForPageToLoad(PAGE_LOAD);
- //TODO assert all files
-
- Assert.assertTrue(selenium.isElementPresent("link=file31.txt"));
+ Assert.assertTrue(selenium.isElementPresent("link=file31.txt"), "content of uploaded archive not found");
}
-
+
@Test(enabled = true, description = "Test archive consisting of 21MB file upload.")
public void testBigArchiveUpload() {
-
+
selenium.click(LNK_ADMIN);
selenium.waitForPageToLoad(PAGE_LOAD);
selenium.click(LNK_CMS);
@@ -145,7 +143,7 @@
selenium.waitForPageToLoad(PAGE_LOAD);
selenium.waitForPopUp("_top", PAGE_LOAD);
selenium.type(INP_ARCHIVE_FILE, WORKSPACE + "/test_files/big_archive.zip");
-
+
selenium.click(SUB_SEND_ARCHIVE);
selenium.waitForPageToLoad(PAGE_LOAD);
@@ -156,8 +154,7 @@
selenium.click("link=Home");
selenium.setSpeed("0");
selenium.waitForPageToLoad(PAGE_LOAD);
-
- Assert.assertTrue(selenium.isElementPresent("link=bigfile"));
+ Assert.assertTrue(selenium.isElementPresent("link=bigfile"), "uploaded archive not found");
}
}
Modified: branches/Enterprise_Portal_Platform_4_3/testsuite/ui-tests/src/org/jboss/portal/test/selenium/cms/CMSSecureTestCase.java
===================================================================
--- branches/Enterprise_Portal_Platform_4_3/testsuite/ui-tests/src/org/jboss/portal/test/selenium/cms/CMSSecureTestCase.java 2009-01-20 21:27:14 UTC (rev 12575)
+++ branches/Enterprise_Portal_Platform_4_3/testsuite/ui-tests/src/org/jboss/portal/test/selenium/cms/CMSSecureTestCase.java 2009-01-20 21:30:31 UTC (rev 12576)
@@ -297,11 +297,13 @@
selenium.open("/portal/portal/default");
selenium.waitForPageToLoad(PAGE_LOAD);
+ Assert.assertFalse(selenium.isTextPresent("Enteprise Portal Platform"));
Assert.assertTrue(selenium.isElementPresent("//img[@alt='JBoss Portal 2.7: Go Faster!']"));
selenium.click(LNK_EXPLORE);
selenium.waitForPageToLoad(PAGE_LOAD);
+ Assert.assertTrue(selenium.isTextPresent("Enteprise Portal Platform"));
Assert.assertFalse(selenium.isElementPresent("//img[@alt='JBoss Portal 2.7: Go Faster!']"));
-
+
login("admin", "admin");
selenium.click(LNK_ADMIN);
selenium.waitForPageToLoad(PAGE_LOAD);
@@ -323,12 +325,14 @@
selenium.waitForPageToLoad(PAGE_LOAD);
logout();
+ Assert.assertFalse(selenium.isTextPresent("Enteprise Portal Platform"));
Assert.assertTrue(selenium.isElementPresent("//img[@alt='JBoss Portal 2.7: Go Faster!']"));
selenium.open("/portal/portal/default");
selenium.waitForPageToLoad(PAGE_LOAD);
selenium.click(LNK_EXPLORE);
selenium.waitForPageToLoad(PAGE_LOAD);
- Assert.assertTrue(selenium.isElementPresent("//img[@alt='JBoss Portal 2.7: Go Faster!']"));
+ Assert.assertFalse(selenium.isTextPresent("Enteprise Portal Platform"));
+ Assert.assertFalse(selenium.isElementPresent("//img[@alt='JBoss Portal 2.7: Go Faster!']"));
}
Modified: branches/Enterprise_Portal_Platform_4_3/testsuite/ui-tests/src/org/jboss/portal/test/selenium/portal/PortletInstancesTestCase.java
===================================================================
--- branches/Enterprise_Portal_Platform_4_3/testsuite/ui-tests/src/org/jboss/portal/test/selenium/portal/PortletInstancesTestCase.java 2009-01-20 21:27:14 UTC (rev 12575)
+++ branches/Enterprise_Portal_Platform_4_3/testsuite/ui-tests/src/org/jboss/portal/test/selenium/portal/PortletInstancesTestCase.java 2009-01-20 21:30:31 UTC (rev 12576)
@@ -10,7 +10,7 @@
public class PortletInstancesTestCase extends JBossPortalSeleniumTestCase {
- private static final String TAB_PORTLET_INSTANCES = "instancesTable2";
+ private static final String TAB_PORTLET_INSTANCES = "//table[contains(@id,'instancesTable2')]";
private static final String UL_PAGINATOR = "//ul[@class='pagination property-container']";
private static final String SUBMIT_SECURITY_UPDATE = "//input[contains(@id,'common-edit-security-form:update')]";
private static final String SUBMIT_SECURITY_CANCEL = "//input[contains(@id,'common-edit-security-form:cancel')]";
@@ -68,9 +68,9 @@
int r = traversePortlets(NAME_COUNTPORT,0);
clickAndWait(MessageFormat.format(LNK_INSTANCE_BUTTON, r));
- safeSelect(SELECT_LANGUAGE, "Czech");
+ safeSelect(SELECT_LANGUAGE, "English");
- final String name = "Administracny";
+ final String name = "Administracning";
selenium.type(INPUT_NAME, name);
clickAndWait(SUBMIT_MODIFY_NAME);
Assert.assertTrue(findTableRow(TABLE_DISPNAMES, name, 1) >= 0);
@@ -131,7 +131,7 @@
@Test(enabled = true)
public void testSecure() {
String instance_name = "JSPPortletInstance";
- String table = TAB_PORTLET_INSTANCES;
+ //String table = TAB_PORTLET_INSTANCES;
// selenium.click(LINK_20_PAGE);
// selenium.waitForPageToLoad(PAGE_LOAD);
@@ -140,7 +140,7 @@
int r = traversePortlets(instance_name,0);
selenium.click(MessageFormat.format(LNK_SEC_BUTTON, r));
- selenium.waitForPageToLoad("30000");
+ selenium.waitForPageToLoad(PAGE_LOAD);
selenium.click("//input[contains(@name,'common-edit-security-form:cars_2')]");
selenium.click("//input[contains(@name,'common-edit-security-form:cars_1')]");
selenium.click("//input[contains(@name,'common-edit-security-form:cars_0')]");
@@ -148,10 +148,10 @@
selenium.click("//input[contains(@name,'common-edit-security-form:cars_1') and @value='admin']");
selenium.click("//input[contains(@name,'common-edit-security-form:cars_2') and @value='admin']");
selenium.click(SUBMIT_SECURITY_UPDATE);
- selenium.waitForPageToLoad("30000");
+ selenium.waitForPageToLoad(PAGE_LOAD);
selenium.open("/portal/auth/portal/default/");
- selenium.waitForPageToLoad("30000");
+ selenium.waitForPageToLoad(PAGE_LOAD);
Assert.assertTrue(selenium.isTextPresent("Greetings !"));
// then cancel
@@ -164,16 +164,16 @@
r = traversePortlets(instance_name,0);
selenium.click(MessageFormat.format(LNK_SEC_BUTTON, r));
- selenium.waitForPageToLoad("30000");
+ selenium.waitForPageToLoad(PAGE_LOAD);
selenium.click("//input[contains(@name,'common-edit-security-form:cars_0')]");
selenium.click("//input[contains(@name,'common-edit-security-form:cars_1') and @value='admin']");
selenium.click("//input[contains(@name,'common-edit-security-form:cars_0') and @value='admin']");
selenium.click("//input[contains(@name,'common-edit-security-form:cars_2') and @value='admin']");
selenium.click("//input[contains(@name,'common-edit-security-form:cars_1')]");
selenium.click(SUBMIT_SECURITY_CANCEL);
- selenium.waitForPageToLoad("30000");
+ selenium.waitForPageToLoad(PAGE_LOAD);
selenium.open("/portal/auth/portal/default/");
- selenium.waitForPageToLoad("30000");
+ selenium.waitForPageToLoad(PAGE_LOAD);
Assert.assertTrue(selenium.isTextPresent("Greetings !"));
// then really stop the greetings portlet
@@ -184,17 +184,17 @@
//r = findTableRow(table, instance_name, 0);
r = traversePortlets(instance_name,0);
selenium.click(MessageFormat.format(LNK_SEC_BUTTON, r));
- selenium.waitForPageToLoad("30000");
+ selenium.waitForPageToLoad(PAGE_LOAD);
selenium.click("//input[contains(@name,'common-edit-security-form:cars_0')]");
selenium.click("//input[contains(@name,'common-edit-security-form:cars_1') and @value='admin']");
selenium.click("//input[contains(@name,'common-edit-security-form:cars_0') and @value='admin']");
selenium.click("//input[contains(@name,'common-edit-security-form:cars_2') and @value='admin']");
selenium.click("//input[contains(@name,'common-edit-security-form:cars_1')]");
selenium.click(SUBMIT_SECURITY_UPDATE);
- selenium.waitForPageToLoad("30000");
+ selenium.waitForPageToLoad(PAGE_LOAD);
selenium.open("/portal/auth/portal/default/");
- selenium.waitForPageToLoad("30000");
+ selenium.waitForPageToLoad(PAGE_LOAD);
Assert.assertFalse(selenium.isTextPresent("Greetings !"));
}
17 years, 3 months
JBoss Portal SVN: r12575 - in branches/Enterprise_Portal_Platform_4_3: build/etc/resources and 6 other directories.
by portal-commits@lists.jboss.org
Author: thomas.heute(a)jboss.com
Date: 2009-01-20 16:27:14 -0500 (Tue, 20 Jan 2009)
New Revision: 12575
Added:
branches/Enterprise_Portal_Platform_4_3/build/etc/resources/run.bat.diff
branches/Enterprise_Portal_Platform_4_3/server/src/main/org/jboss/portal/server/ParameterSanitizer.java
Removed:
branches/Enterprise_Portal_Platform_4_3/core/src/main/org/jboss/portal/core/util/ParameterSanitizer.java
Modified:
branches/Enterprise_Portal_Platform_4_3/build/distrib.xml
branches/Enterprise_Portal_Platform_4_3/core-samples/src/resources/portal-basic-samples-war/WEB-INF/portlet.xml
branches/Enterprise_Portal_Platform_4_3/core/src/resources/portal-server-war/login.jsp
branches/Enterprise_Portal_Platform_4_3/theme/src/main/org/jboss/portal/theme/servlet/DynaAjaxServlet.java
branches/Enterprise_Portal_Platform_4_3/wsrp/src/main/org/jboss/portal/wsrp/WSRPPortletURL.java
Log:
- patch permgen for run.bat (Should be useless here)
- Forgot to commit added attribute.
- Cleaned-up DynaAjaxServlet, still investigating whether removal is safe or not.
- Moved ParameterSanitizer to server module and renamed methods to follow common.
- JBPORTAL-2205: use proper mode and window state names...
Modified: branches/Enterprise_Portal_Platform_4_3/build/distrib.xml
===================================================================
--- branches/Enterprise_Portal_Platform_4_3/build/distrib.xml 2009-01-20 19:42:27 UTC (rev 12574)
+++ branches/Enterprise_Portal_Platform_4_3/build/distrib.xml 2009-01-20 21:27:14 UTC (rev 12575)
@@ -196,7 +196,11 @@
<target name="patch-run.conf">
<patch patchfile="${source.dir}/build/etc/resources/run.conf.diff" originalfile="${todir}/bin/run.conf" />
</target>
+ <target name="patch-run.bat">
+ <patch patchfile="${source.dir}/build/etc/resources/run.bat.diff" originalfile="${todir}/bin/run.bat" />
+ </target>
+
<!-- use -Dno-doc=true if you simply want jboss-portal.sar without licenses etc-->
<target name="package-bin" unless="no-doc">
<sequential>
Copied: branches/Enterprise_Portal_Platform_4_3/build/etc/resources/run.bat.diff (from rev 12546, branches/JBoss_Portal_Branch_2_7/build/etc/resources/run.bat.diff)
===================================================================
--- branches/Enterprise_Portal_Platform_4_3/build/etc/resources/run.bat.diff (rev 0)
+++ branches/Enterprise_Portal_Platform_4_3/build/etc/resources/run.bat.diff 2009-01-20 21:27:14 UTC (rev 12575)
@@ -0,0 +1,11 @@
+--- run.bat 2008-12-23 12:45:51.017077000 -0500
++++ run1.bat 2008-12-23 12:45:25.983136000 -0500
+@@ -70,7 +70,7 @@
+ if not errorlevel == 1 (set JAVA_OPTS=%JAVA_OPTS% -server)
+
+ rem JVM memory allocation pool parameters. Modify as appropriate.
+-set JAVA_OPTS=%JAVA_OPTS% -Xms128m -Xmx512m
++set JAVA_OPTS=%JAVA_OPTS% -Xms128m -Xmx512m -XX:MaxPermSize=128m
+
+ rem With Sun JVMs reduce the RMI GCs to once per hour
+ set JAVA_OPTS=%JAVA_OPTS% -Dsun.rmi.dgc.client.gcInterval=3600000 -Dsun.rmi.dgc.server.gcInterval=3600000
Deleted: branches/Enterprise_Portal_Platform_4_3/core/src/main/org/jboss/portal/core/util/ParameterSanitizer.java
===================================================================
--- branches/Enterprise_Portal_Platform_4_3/core/src/main/org/jboss/portal/core/util/ParameterSanitizer.java 2009-01-20 19:42:27 UTC (rev 12574)
+++ branches/Enterprise_Portal_Platform_4_3/core/src/main/org/jboss/portal/core/util/ParameterSanitizer.java 2009-01-20 21:27:14 UTC (rev 12575)
@@ -1,52 +0,0 @@
-/*
-* JBoss, a division of Red Hat
-* Copyright 2008, Red Hat Middleware, LLC, and individual contributors as indicated
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* This is free software; you can redistribute it and/or modify it
-* under the terms of the GNU Lesser General Public License as
-* published by the Free Software Foundation; either version 2.1 of
-* the License, or (at your option) any later version.
-*
-* This software is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-* Lesser General Public License for more details.
-*
-* You should have received a copy of the GNU Lesser General Public
-* License along with this software; if not, write to the Free
-* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-*/
-
-package org.jboss.portal.core.util;
-
-import org.jboss.portal.common.util.ParameterValidation;
-
-import java.util.regex.Pattern;
-
-/**
- * TODO
- * @author <a href="mailto:chris.laprun@jboss.com">Chris Laprun</a>
- * @version $Revision$
- * @deprecated Should use {@link org.jboss.portal.common.util.ParameterValidation#sanitize} instead starting with 2.7.2
- */
-public class ParameterSanitizer
-{
- public final static Pattern CSS_DISTANCE = Pattern.compile("\\d+\\W*(em|ex|px|in|cm|mm|pt|pc|%)?");
-
- public static String sanitize(String value, Pattern regex, String defaultValue)
- {
- ParameterValidation.throwIllegalArgExceptionIfNull(regex, "expected value format");
-
- if(value == null || !regex.matcher(value).matches())
- {
- return defaultValue;
- }
- else
- {
- return value;
- }
- }
-}
Modified: branches/Enterprise_Portal_Platform_4_3/core/src/resources/portal-server-war/login.jsp
===================================================================
--- branches/Enterprise_Portal_Platform_4_3/core/src/resources/portal-server-war/login.jsp 2009-01-20 19:42:27 UTC (rev 12574)
+++ branches/Enterprise_Portal_Platform_4_3/core/src/resources/portal-server-war/login.jsp 2009-01-20 21:27:14 UTC (rev 12575)
@@ -21,23 +21,24 @@
~ 02110-1301 USA, or see the FSF site: http://www.fsf.org. ~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~--%>
<%@ page pageEncoding="utf-8" %>
-<%@page import="org.jboss.portal.identity.UserStatus"%>
-<%@page import="org.jboss.portal.core.util.ParameterSanitizer"%>
-<%@page import="java.util.ResourceBundle"%>
+<%@page import="org.jboss.portal.identity.UserStatus" %>
+<%@page import="org.jboss.portal.server.ParameterSanitizer" %>
+<%@page import="java.util.ResourceBundle" %>
<%
ResourceBundle rb = ResourceBundle.getBundle("Resource", request.getLocale());
// todo: use ParameterValidation.sanitize after 2.7.1
String loginheight = request.getParameter("loginheight");
boolean paramPresent = loginheight != null;
- loginheight = ParameterSanitizer.sanitize(loginheight, ParameterSanitizer.CSS_DISTANCE, "300px");
+ loginheight = ParameterSanitizer.sanitizeFromPattern(loginheight, ParameterSanitizer.CSS_DISTANCE, "300px");
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
- <title><%= rb.getString("LOGIN_TITLE") %></title>
+ <title><%= rb.getString("LOGIN_TITLE") %>
+ </title>
<style type="text/css">
/* <![CDATA[ */
body {
@@ -46,20 +47,24 @@
border: 0;
padding-top: <%=loginheight%>;
}
+
/* ]]> */
</style>
<script>
- function setFocusOnLoginForm() {
- try {
- document.loginform.j_username.focus();
+ function setFocusOnLoginForm()
+ {
+ try
+ {
+ document.loginform.j_username.focus();
+ }
+ catch (e)
+ {
+ }
}
- catch (e) {
- }
- }
</script>
- <link rel="stylesheet" href="/portal-core/css/login.css" type="text/css" />
+ <link rel="stylesheet" href="/portal-core/css/login.css" type="text/css"/>
</head>
<body onload="setFocusOnLoginForm();">
@@ -67,44 +72,51 @@
<div class="login-header">
- <h2><%= rb.getString("LOGIN_TITLE") %></h2>
+ <h2><%= rb.getString("LOGIN_TITLE") %>
+ </h2>
</div>
<div class="login-content">
<div class="error-message"
style="<%=(request.getAttribute(!UserStatus.OK.equals("org.jboss.portal.userStatus") ? "" : "display:none"))%>;">
- <%
+ <%
- if (UserStatus.DISABLE.equals(request.getAttribute("org.jboss.portal.userStatus")))
- {
- out.println(rb.getString("ACCOUNT_DISABLED"));
- }
- else if (UserStatus.WRONGPASSWORD.equals(request.getAttribute("org.jboss.portal.userStatus")) || UserStatus.UNEXISTING.equals(request.getAttribute("org.jboss.portal.userStatus")))
- {
- out.println(rb.getString("ACCOUNT_INEXISTING_OR_WRONG_PASSWORD"));
- }
- else if (UserStatus.NOTASSIGNEDTOROLE.equals(request.getAttribute("org.jboss.portal.userStatus")))
- {
- out.println(rb.getString("ACCOUNT_NOTASSIGNEDTOROLE"));
- }
- %>
+ if (UserStatus.DISABLE.equals(request.getAttribute("org.jboss.portal.userStatus")))
+ {
+ out.println(rb.getString("ACCOUNT_DISABLED"));
+ }
+ else if (UserStatus.WRONGPASSWORD.equals(request.getAttribute("org.jboss.portal.userStatus")) || UserStatus.UNEXISTING.equals(request.getAttribute("org.jboss.portal.userStatus")))
+ {
+ out.println(rb.getString("ACCOUNT_INEXISTING_OR_WRONG_PASSWORD"));
+ }
+ else if (UserStatus.NOTASSIGNEDTOROLE.equals(request.getAttribute("org.jboss.portal.userStatus")))
+ {
+ out.println(rb.getString("ACCOUNT_NOTASSIGNEDTOROLE"));
+ }
+ %>
</div>
<form method="post" action="<%= response.encodeURL("j_security_check") %>" name="loginform" id="loginForm"
target="_parent">
<div class="form-field">
- <label for="j_username"><%= rb.getString("LOGIN_USERNAME") %></label>
+ <label for="j_username"><%= rb.getString("LOGIN_USERNAME") %>
+ </label>
<input type="text" name="j_username" id="j_username" value=""/>
</div>
<div class="form-field">
- <label for="j_password"><%= rb.getString("LOGIN_PASSWORD") %></label>
+ <label for="j_password"><%= rb.getString("LOGIN_PASSWORD") %>
+ </label>
<input type="password" name="j_password" id="j_password" value=""/>
</div>
<br class="clear"/>
+
<div class="button-container">
<br class="clear"/>
- <input style="<%=paramPresent ? "" : "display:none"%>;" type="button" name="cancel" value="<%= rb.getString("LOGIN_CANCEL") %>" class="cancel-button" onclick="window.parent.hideContentModal('login-modal');"/>
+ <input style="<%=paramPresent ? "" : "display:none"%>;" type="button" name="cancel"
+ value="<%= rb.getString("LOGIN_CANCEL") %>" class="cancel-button"
+ onclick="window.parent.hideContentModal('login-modal');"/>
<br class="clear"/>
- <input style="<%=paramPresent ? "" : "right:10px"%>;" type="submit" name="login" value="<%= rb.getString("LOGIN_SUBMIT") %>" class="login-button"/>
+ <input style="<%=paramPresent ? "" : "right:10px"%>;" type="submit" name="login"
+ value="<%= rb.getString("LOGIN_SUBMIT") %>" class="login-button"/>
</div>
<br class="clear"/>
</form>
Modified: branches/Enterprise_Portal_Platform_4_3/core-samples/src/resources/portal-basic-samples-war/WEB-INF/portlet.xml
===================================================================
--- branches/Enterprise_Portal_Platform_4_3/core-samples/src/resources/portal-basic-samples-war/WEB-INF/portlet.xml 2009-01-20 19:42:27 UTC (rev 12574)
+++ branches/Enterprise_Portal_Platform_4_3/core-samples/src/resources/portal-basic-samples-war/WEB-INF/portlet.xml 2009-01-20 21:27:14 UTC (rev 12575)
@@ -428,6 +428,9 @@
<name>user.name.nickName</name>
</user-attribute>
<user-attribute>
+ <name>user.login.id</name>
+ </user-attribute>
+ <user-attribute>
<name>user.business-info.online.email</name>
</user-attribute>
<user-attribute>
Copied: branches/Enterprise_Portal_Platform_4_3/server/src/main/org/jboss/portal/server/ParameterSanitizer.java (from rev 12558, branches/JBoss_Portal_Branch_2_7/server/src/main/org/jboss/portal/server/ParameterSanitizer.java)
===================================================================
--- branches/Enterprise_Portal_Platform_4_3/server/src/main/org/jboss/portal/server/ParameterSanitizer.java (rev 0)
+++ branches/Enterprise_Portal_Platform_4_3/server/src/main/org/jboss/portal/server/ParameterSanitizer.java 2009-01-20 21:27:14 UTC (rev 12575)
@@ -0,0 +1,71 @@
+/*
+* JBoss, a division of Red Hat
+* Copyright 2008, Red Hat Middleware, LLC, and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
+
+package org.jboss.portal.server;
+
+import org.jboss.portal.common.util.ParameterValidation;
+
+import java.util.Arrays;
+import java.util.List;
+import java.util.regex.Pattern;
+
+/**
+ * TODO
+ *
+ * @author <a href="mailto:chris.laprun@jboss.com">Chris Laprun</a>
+ * @version $Revision$
+ * @deprecated Should use {@link org.jboss.portal.common.util.ParameterValidation#sanitize*} instead starting with
+ * 2.7.2
+ */
+public class ParameterSanitizer
+{
+ public final static Pattern CSS_DISTANCE = Pattern.compile("\\d+\\W*(em|ex|px|in|cm|mm|pt|pc|%)?");
+
+ public static String sanitizeFromPattern(String value, Pattern regex, String defaultValue)
+ {
+ ParameterValidation.throwIllegalArgExceptionIfNull(regex, "expected value format");
+
+ if (value == null || !regex.matcher(value).matches())
+ {
+ return defaultValue;
+ }
+ else
+ {
+ return value;
+ }
+ }
+
+ public static String sanitizeFromValues(String value, String[] possibleValues, String defaultValue)
+ {
+ ParameterValidation.throwIllegalArgExceptionIfNullOrEmpty(possibleValues, "possible values");
+
+ List<String> values = Arrays.asList(possibleValues);
+ if (!values.contains(value))
+ {
+ return defaultValue;
+ }
+ else
+ {
+ return value;
+ }
+ }
+}
Modified: branches/Enterprise_Portal_Platform_4_3/theme/src/main/org/jboss/portal/theme/servlet/DynaAjaxServlet.java
===================================================================
--- branches/Enterprise_Portal_Platform_4_3/theme/src/main/org/jboss/portal/theme/servlet/DynaAjaxServlet.java 2009-01-20 19:42:27 UTC (rev 12574)
+++ branches/Enterprise_Portal_Platform_4_3/theme/src/main/org/jboss/portal/theme/servlet/DynaAjaxServlet.java 2009-01-20 21:27:14 UTC (rev 12575)
@@ -23,7 +23,7 @@
package org.jboss.portal.theme.servlet;
-import org.jboss.logging.Logger;
+import org.jboss.portal.server.ParameterSanitizer;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
@@ -31,7 +31,6 @@
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.util.Date;
-import java.util.Enumeration;
/**
* @author <a href="mailto:tomasz.szymanski@jboss.com">Tomasz Szymanski</a>
@@ -40,7 +39,9 @@
public class DynaAjaxServlet extends HttpServlet
{
- private final static Logger log = Logger.getLogger(DynaAjaxServlet.class);
+ private static final String ACTION = "action";
+ private static final String[] POSSIBLE_ACTION_VALUES = new String[]{"windowremove", "windowmove"};
+ private static final String DEFAULT_RESPONSE = "";
public void doGet(HttpServletRequest req, HttpServletResponse resp)
throws ServletException, IOException
@@ -48,79 +49,11 @@
doPost(req, resp);
}
- public void doPost(HttpServletRequest req, HttpServletResponse resp)
- throws ServletException, IOException
+ public void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException
{
- Enumeration paramNames = req.getParameterNames();
- String response = "";
- while (paramNames.hasMoreElements())
- {
- String name = (String)paramNames.nextElement();
- // action: windowremove|windowmove
- if ("action".equalsIgnoreCase(name))
- {
- response = req.getParameter(name);
- }
- System.out.println("Parameter: " + name + " = " + req.getParameter(name));
- }
-
+ String actionValue = req.getParameter(ACTION);
+ String response = ParameterSanitizer.sanitizeFromValues(actionValue, POSSIBLE_ACTION_VALUES, DEFAULT_RESPONSE);
sendResp(resp, response);
-
-/*
- if(req.getParameter("action") != null)
- {
- if(req.getParameter("action").equals(PERSIST))
- {
- if(req.getParameter("positionNo") == null
- || req.getParameter("windowId") == null
- || req.getParameter("oldRegionId") == null
- || req.getParameter("newRegionId") == null)
- {
- resp.sendError(400, "Not enought parameters");
- return;
- }
-
- if(!testMode)
- {
- persistance.persistPosition(req.getParameter("positionNo"),
- req.getParameter("windowId"), req
- .getParameter("oldRegionId"), req
- .getParameter("newRegionId"));
- }
-
- sendResp(resp, "Position persisted");
- }
- else if(req.getParameter("action").equals(TEST_MODE))
- {
- if(req.getParameter("mode") != null)
- {
- try
- {
- testMode = Boolean.valueOf(req.getParameter("mode"))
- .booleanValue();
- }
- catch(RuntimeException e)
- {
- resp.sendError(400, "Bad arguments");
- return;
- }
-
- sendResp(resp, ((testMode) ? "Test mode ON" : "Test mode OFF"));
-
- }
- else
- {
- resp.sendError(400, "Not enought parameters");
- return;
- }
- }
- else
- {
- resp.sendError(400, "Unknown ajax call");
- return;
- }
- }
-*/
}
private void sendResp(HttpServletResponse resp, String respData)
Modified: branches/Enterprise_Portal_Platform_4_3/wsrp/src/main/org/jboss/portal/wsrp/WSRPPortletURL.java
===================================================================
--- branches/Enterprise_Portal_Platform_4_3/wsrp/src/main/org/jboss/portal/wsrp/WSRPPortletURL.java 2009-01-20 19:42:27 UTC (rev 12574)
+++ branches/Enterprise_Portal_Platform_4_3/wsrp/src/main/org/jboss/portal/wsrp/WSRPPortletURL.java 2009-01-20 21:27:14 UTC (rev 12575)
@@ -347,13 +347,13 @@
//
if (mode != null)
{
- createURLParameter(sb, WSRPRewritingConstants.MODE, mode.toString());
+ createURLParameter(sb, WSRPRewritingConstants.MODE, WSRPUtils.getWSRPNameFromJSR168PortletMode(mode));
}
//
if (windowState != null)
{
- createURLParameter(sb, WSRPRewritingConstants.WINDOW_STATE, windowState.toString());
+ createURLParameter(sb, WSRPRewritingConstants.WINDOW_STATE, WSRPUtils.getWSRPNameFromJSR168WindowState(windowState));
}
// todo: not sure how to deal with authenticated
17 years, 3 months
JBoss Portal SVN: r12574 - in branches/Enterprise_Portal_Platform_4_3: server/src/main/org/jboss/portal/server and 1 other directory.
by portal-commits@lists.jboss.org
Author: thomas.heute(a)jboss.com
Date: 2009-01-20 14:42:27 -0500 (Tue, 20 Jan 2009)
New Revision: 12574
Modified:
branches/Enterprise_Portal_Platform_4_3/build/build.xml
branches/Enterprise_Portal_Platform_4_3/server/src/main/org/jboss/portal/server/PortalConstants.java
Log:
Change version number
Modified: branches/Enterprise_Portal_Platform_4_3/build/build.xml
===================================================================
--- branches/Enterprise_Portal_Platform_4_3/build/build.xml 2009-01-20 19:40:12 UTC (rev 12573)
+++ branches/Enterprise_Portal_Platform_4_3/build/build.xml 2009-01-20 19:42:27 UTC (rev 12574)
@@ -59,11 +59,11 @@
<!--| Project version information. |-->
<!--+==============================+-->
- <property name="version.major" value="2"/>
- <property name="version.minor" value="7"/>
- <property name="version.revision" value="1"/>
- <property name="version.tag" value="GA"/>
- <property name="version.name" value="Community"/>
+ <property name="version.major" value="4"/>
+ <property name="version.minor" value="3"/>
+ <property name="version.revision" value="0"/>
+ <property name="version.tag" value="SNAPSHOT"/>
+ <property name="version.name" value="Enterprise"/>
<!-- This must be set to the CVS tag for any release -->
<property name="version.cvstag" value="HEAD"/>
Modified: branches/Enterprise_Portal_Platform_4_3/server/src/main/org/jboss/portal/server/PortalConstants.java
===================================================================
--- branches/Enterprise_Portal_Platform_4_3/server/src/main/org/jboss/portal/server/PortalConstants.java 2009-01-20 19:40:12 UTC (rev 12573)
+++ branches/Enterprise_Portal_Platform_4_3/server/src/main/org/jboss/portal/server/PortalConstants.java 2009-01-20 19:42:27 UTC (rev 12574)
@@ -36,7 +36,7 @@
{
/** Current version. */
- public static final Version VERSION = new Version("JBoss Portal", 2, 7, 1, new Version.Qualifier(Version.Qualifier.Prefix.GA), "Community");
+ public static final Version VERSION = new Version("Enterprise Portal Platform", 4, 3, 0, new Version.Qualifier(Version.Qualifier.Prefix.SNAPSHOT), "Enterprise");
/** The default portal name. */
public static final String DEFAULT_PORTAL_NAME = "default";
17 years, 3 months
JBoss Portal SVN: r12573 - branches/Enterprise_Portal_Platform_4_3/core-cms/src/resources/portal-cms-war/WEB-INF/jsp/cms/admin.
by portal-commits@lists.jboss.org
Author: thomas.heute(a)jboss.com
Date: 2009-01-20 14:40:12 -0500 (Tue, 20 Jan 2009)
New Revision: 12573
Modified:
branches/Enterprise_Portal_Platform_4_3/core-cms/src/resources/portal-cms-war/WEB-INF/jsp/cms/admin/confirmcopy.jsp
branches/Enterprise_Portal_Platform_4_3/core-cms/src/resources/portal-cms-war/WEB-INF/jsp/cms/admin/confirmdelete.jsp
branches/Enterprise_Portal_Platform_4_3/core-cms/src/resources/portal-cms-war/WEB-INF/jsp/cms/admin/confirmmove.jsp
branches/Enterprise_Portal_Platform_4_3/core-cms/src/resources/portal-cms-war/WEB-INF/jsp/cms/admin/create.jsp
branches/Enterprise_Portal_Platform_4_3/core-cms/src/resources/portal-cms-war/WEB-INF/jsp/cms/admin/edit.jsp
branches/Enterprise_Portal_Platform_4_3/core-cms/src/resources/portal-cms-war/WEB-INF/jsp/cms/admin/main.jsp
branches/Enterprise_Portal_Platform_4_3/core-cms/src/resources/portal-cms-war/WEB-INF/jsp/cms/admin/securenode.jsp
branches/Enterprise_Portal_Platform_4_3/core-cms/src/resources/portal-cms-war/WEB-INF/jsp/cms/admin/viewfile.jsp
Log:
Encode before rendering
Modified: branches/Enterprise_Portal_Platform_4_3/core-cms/src/resources/portal-cms-war/WEB-INF/jsp/cms/admin/confirmcopy.jsp
===================================================================
--- branches/Enterprise_Portal_Platform_4_3/core-cms/src/resources/portal-cms-war/WEB-INF/jsp/cms/admin/confirmcopy.jsp 2009-01-20 19:39:21 UTC (rev 12572)
+++ branches/Enterprise_Portal_Platform_4_3/core-cms/src/resources/portal-cms-war/WEB-INF/jsp/cms/admin/confirmcopy.jsp 2009-01-20 19:40:12 UTC (rev 12573)
@@ -1,4 +1,6 @@
<%@ page language="java" extends="org.jboss.portal.core.servlet.jsp.PortalJsp" %>
+<%@ page import="org.jboss.portal.common.text.EntityEncoder" %>
+
<%@ taglib uri="http://java.sun.com/portlet_2_0" prefix="portlet" %>
<%@ taglib uri="/WEB-INF/portal-lib.tld" prefix="n" %>
<%@ page isELIgnored="false" %>
@@ -27,7 +29,7 @@
<table>
<tr>
<td>${n:i18n("CMS_SOURCE")}:</td>
- <td><%= sCurrPath %>
+ <td><%= EntityEncoder.FULL.encode(sCurrPath) %>
</td>
</tr>
<tr>
Modified: branches/Enterprise_Portal_Platform_4_3/core-cms/src/resources/portal-cms-war/WEB-INF/jsp/cms/admin/confirmdelete.jsp
===================================================================
--- branches/Enterprise_Portal_Platform_4_3/core-cms/src/resources/portal-cms-war/WEB-INF/jsp/cms/admin/confirmdelete.jsp 2009-01-20 19:39:21 UTC (rev 12572)
+++ branches/Enterprise_Portal_Platform_4_3/core-cms/src/resources/portal-cms-war/WEB-INF/jsp/cms/admin/confirmdelete.jsp 2009-01-20 19:40:12 UTC (rev 12573)
@@ -1,5 +1,7 @@
<%@ page import="org.jboss.portal.cms.util.NodeUtil" %>
<%@ page import="org.jboss.portal.core.cms.ui.admin.CMSAdminConstants" %>
+<%@ page import="org.jboss.portal.common.text.EntityEncoder" %>
+
<%@ page language="java" extends="org.jboss.portal.core.servlet.jsp.PortalJsp" %>
<%@ taglib uri="http://java.sun.com/portlet_2_0" prefix="portlet" %>
<%@ taglib uri="/WEB-INF/portal-lib.tld" prefix="n" %>
@@ -24,7 +26,7 @@
<tr>
<td align="center">
- <font class="portlet-font">${n:i18n("CMS_DELETEPATH")} <%= sCurrPath %>
+ <font class="portlet-font">${n:i18n("CMS_DELETEPATH")} <%= EntityEncoder.FULL.encode(sCurrPath) %>
</font>
<br><br>
<font class="portlet-font" style="color:red"><b>${n:i18n("CMS_DELETEWARN1")}</b></font>
Modified: branches/Enterprise_Portal_Platform_4_3/core-cms/src/resources/portal-cms-war/WEB-INF/jsp/cms/admin/confirmmove.jsp
===================================================================
--- branches/Enterprise_Portal_Platform_4_3/core-cms/src/resources/portal-cms-war/WEB-INF/jsp/cms/admin/confirmmove.jsp 2009-01-20 19:39:21 UTC (rev 12572)
+++ branches/Enterprise_Portal_Platform_4_3/core-cms/src/resources/portal-cms-war/WEB-INF/jsp/cms/admin/confirmmove.jsp 2009-01-20 19:40:12 UTC (rev 12573)
@@ -2,7 +2,9 @@
<%@ taglib uri="http://java.sun.com/portlet_2_0" prefix="portlet" %>
<%@ taglib uri="/WEB-INF/portal-lib.tld" prefix="n" %>
<%@ page isELIgnored="false" %>
+<%@ page import="org.jboss.portal.common.text.EntityEncoder" %>
+
<%
String sCurrPath = (String)request.getAttribute("currpath");
String OP = CMSAdminConstants.OP_CONFIRMMOVE;
@@ -31,7 +33,7 @@
<table>
<tr>
<td>${n:i18n("CMS_SOURCE")}:</td>
- <td><%= sCurrPath %>
+ <td><%= EntityEncoder.FULL.encode(sCurrPath) %>
</td>
</tr>
<tr>
Modified: branches/Enterprise_Portal_Platform_4_3/core-cms/src/resources/portal-cms-war/WEB-INF/jsp/cms/admin/create.jsp
===================================================================
--- branches/Enterprise_Portal_Platform_4_3/core-cms/src/resources/portal-cms-war/WEB-INF/jsp/cms/admin/create.jsp 2009-01-20 19:39:21 UTC (rev 12572)
+++ branches/Enterprise_Portal_Platform_4_3/core-cms/src/resources/portal-cms-war/WEB-INF/jsp/cms/admin/create.jsp 2009-01-20 19:40:12 UTC (rev 12573)
@@ -2,6 +2,8 @@
org.jboss.portal.core.cms.ui.admin.CMSAdminConstants,
java.util.Locale" %>
<%@ page language="java" extends="org.jboss.portal.core.servlet.jsp.PortalJsp" %>
+<%@ page import="org.jboss.portal.common.text.EntityEncoder" %>
+
<%@ taglib uri="http://java.sun.com/portlet_2_0" prefix="portlet" %>
<%@ taglib uri="/WEB-INF/portal-lib.tld" prefix="n" %>
<%@ page isELIgnored="false" %>
@@ -126,7 +128,7 @@
<tr>
<td>${n:i18n("CMS_CREATEFILEINDIR")}:
</td>
- <td><%= sCurrPath %>
+ <td><%= EntityEncoder.FULL.encode(sCurrPath) %>
</td>
</tr>
<tr>
Modified: branches/Enterprise_Portal_Platform_4_3/core-cms/src/resources/portal-cms-war/WEB-INF/jsp/cms/admin/edit.jsp
===================================================================
--- branches/Enterprise_Portal_Platform_4_3/core-cms/src/resources/portal-cms-war/WEB-INF/jsp/cms/admin/edit.jsp 2009-01-20 19:39:21 UTC (rev 12572)
+++ branches/Enterprise_Portal_Platform_4_3/core-cms/src/resources/portal-cms-war/WEB-INF/jsp/cms/admin/edit.jsp 2009-01-20 19:40:12 UTC (rev 12573)
@@ -1,4 +1,5 @@
<%@ page import="org.jboss.portal.core.cms.ui.admin.CMSAdminConstants" %>
+<%@ page import="org.jboss.portal.common.text.EntityEncoder" %>
<%@ page import="java.util.Locale" %>
<%@ page language="java" extends="org.jboss.portal.core.servlet.jsp.PortalJsp" %>
<%@ taglib uri="http://java.sun.com/portlet_2_0" prefix="portlet" %>
@@ -81,7 +82,7 @@
<tr>
<td>${n:i18n("CMS_EDITING")}:
</td>
- <td><%= sCurrPath %>
+ <td><%= EntityEncoder.FULL.encode(sCurrPath) %>
</td>
</tr>
<tr>
Modified: branches/Enterprise_Portal_Platform_4_3/core-cms/src/resources/portal-cms-war/WEB-INF/jsp/cms/admin/main.jsp
===================================================================
--- branches/Enterprise_Portal_Platform_4_3/core-cms/src/resources/portal-cms-war/WEB-INF/jsp/cms/admin/main.jsp 2009-01-20 19:39:21 UTC (rev 12572)
+++ branches/Enterprise_Portal_Platform_4_3/core-cms/src/resources/portal-cms-war/WEB-INF/jsp/cms/admin/main.jsp 2009-01-20 19:40:12 UTC (rev 12573)
@@ -1,9 +1,11 @@
<%@ page import="org.jboss.portal.cms.model.File" %>
<%@ page import="org.jboss.portal.cms.model.Folder" %>
<%@ page import="org.jboss.portal.core.cms.ui.admin.CMSAdminConstants" %>
+<%@ page import="org.jboss.portal.common.text.EntityEncoder" %>
<%@ page import="java.text.Format" %>
<%@ page import="java.util.List" %>
<%@ page import="java.util.StringTokenizer" %>
+
<%@ page language="java" extends="org.jboss.portal.core.servlet.jsp.PortalJsp" %>
<%@ taglib uri="/WEB-INF/portal-lib.tld" prefix="n" %>
<%@ taglib uri="http://java.sun.com/portlet_2_0" prefix="portlet" %>
@@ -79,7 +81,7 @@
<portlet:param name="op" value="<%= CMSAdminConstants.OP_MAIN %>"/>
<portlet:param name="path" value="<%= sPathBuilder %>"/>
</portlet:renderURL>
-"><%= sPathChunk %>
+"><%= EntityEncoder.FULL.encode(sPathChunk) %>
</a>
</li>
<%
@@ -88,7 +90,7 @@
{
%>
<li class="pathSeperator"><img src="/portal-admin/img/pathSeparator.png" alt=">"></li>
- <li class="selected"><%= sPathChunk %>
+ <li class="selected"><%= EntityEncoder.FULL.encode(sPathChunk) %>
</li>
<%
}
@@ -218,7 +220,7 @@
<portlet:param name="op" value="<%= CMSAdminConstants.OP_MAIN %>"/>
<portlet:param name="path" value="<%= folder.getBasePath() %>"/>
</portlet:renderURL>"><%=
- folder.getBasePath().substring(folder.getBasePath().lastIndexOf("/") + 1, folder.getBasePath().length()) %>
+ EntityEncoder.FULL.encode(folder.getBasePath().substring(folder.getBasePath().lastIndexOf("/") + 1, folder.getBasePath().length())) %>
</a>
</td>
<td>
@@ -274,7 +276,7 @@
<portlet:param name="path"
value="<%= file.getBasePath() %>"/>
</portlet:renderURL>"><%=
- file.getBasePath().substring(file.getBasePath().lastIndexOf("/") + 1, file.getBasePath().length()) %>
+ EntityEncoder.FULL.encode(file.getBasePath().substring(file.getBasePath().lastIndexOf("/") + 1, file.getBasePath().length())) %>
</a>
</td>
<td>
Modified: branches/Enterprise_Portal_Platform_4_3/core-cms/src/resources/portal-cms-war/WEB-INF/jsp/cms/admin/securenode.jsp
===================================================================
--- branches/Enterprise_Portal_Platform_4_3/core-cms/src/resources/portal-cms-war/WEB-INF/jsp/cms/admin/securenode.jsp 2009-01-20 19:39:21 UTC (rev 12572)
+++ branches/Enterprise_Portal_Platform_4_3/core-cms/src/resources/portal-cms-war/WEB-INF/jsp/cms/admin/securenode.jsp 2009-01-20 19:40:12 UTC (rev 12573)
@@ -1,4 +1,5 @@
<%@ page import="org.jboss.portal.core.cms.ui.admin.CMSAdminConstants" %>
+<%@ page import="org.jboss.portal.common.text.EntityEncoder" %>
<%@ page import="org.jboss.portal.identity.Role" %>
<%@ page import="org.jboss.portal.identity.User" %>
<%@ page import="org.jboss.portal.cms.security.AuthorizationManager" %>
@@ -50,7 +51,7 @@
%>
<tr>
<td colspan="2">
- <font class="portlet-font">${n:i18n("CMS_CONFIGURE_RESTRICTION")}: <%= sCurrPath %>
+ <font class="portlet-font">${n:i18n("CMS_CONFIGURE_RESTRICTION")}: <%= EntityEncoder.FULL.encode(sCurrPath) %>
</font>
</td>
</tr>
Modified: branches/Enterprise_Portal_Platform_4_3/core-cms/src/resources/portal-cms-war/WEB-INF/jsp/cms/admin/viewfile.jsp
===================================================================
--- branches/Enterprise_Portal_Platform_4_3/core-cms/src/resources/portal-cms-war/WEB-INF/jsp/cms/admin/viewfile.jsp 2009-01-20 19:39:21 UTC (rev 12572)
+++ branches/Enterprise_Portal_Platform_4_3/core-cms/src/resources/portal-cms-war/WEB-INF/jsp/cms/admin/viewfile.jsp 2009-01-20 19:40:12 UTC (rev 12573)
@@ -6,6 +6,7 @@
<%@ page import="org.jboss.portal.cms.model.Content" %>
<%@ page import="org.jboss.portal.cms.util.NodeUtil" %>
<%@ page import="org.jboss.portal.core.cms.ui.admin.CMSAdminConstants" %>
+<%@ page import="org.jboss.portal.common.text.EntityEncoder" %>
<%@ page import="java.text.Format" %>
<%@ page import="java.util.Collection" %>
<%@ page import="java.util.Iterator" %>
@@ -77,7 +78,7 @@
<portlet:param name="op" value="<%= CMSAdminConstants.OP_MAIN %>"/>
<portlet:param name="path" value="<%= sPathBuilder %>"/>
</portlet:renderURL>
-"><%= sPathChunk %>
+"><%= EntityEncoder.FULL.encode(sPathChunk) %>
</a>
</li>
<%
@@ -86,7 +87,7 @@
{
%>
<li class="pathSeperator"><img src="/portal-admin/img/pathSeparator.png" alt=">"></li>
- <li class="selected"><%= sPathChunk %>
+ <li class="selected"><%= EntityEncoder.FULL.encode(sPathChunk) %>
</li>
<%
}
@@ -334,7 +335,7 @@
%>
<%= modifiedDate %>
</td>
- <td><%= version.getTitle() %>
+ <td><%= EntityEncoder.FULL.encode(version.getTitle()) %>
</td>
</tr>
<%}%>
17 years, 3 months