Author: chris.laprun(a)jboss.com
Date: 2008-07-10 17:48:41 -0400 (Thu, 10 Jul 2008)
New Revision: 11416
Added:
branches/JBoss_Portal_Branch_2_7/wsrp/src/main/org/jboss/portal/test/wsrp/other/AbsoluteURLReplacementGeneratorTestCase.java
branches/JBoss_Portal_Branch_2_7/wsrp/src/main/org/jboss/portal/test/wsrp/portlet/ResourceNoEncodeURLPortlet.java
branches/JBoss_Portal_Branch_2_7/wsrp/src/resources/tests/test-resourcenoencodeurl-portlet-war/
branches/JBoss_Portal_Branch_2_7/wsrp/src/resources/tests/test-resourcenoencodeurl-portlet-war/WEB-INF/
branches/JBoss_Portal_Branch_2_7/wsrp/src/resources/tests/test-resourcenoencodeurl-portlet-war/WEB-INF/jboss-portlet.xml
branches/JBoss_Portal_Branch_2_7/wsrp/src/resources/tests/test-resourcenoencodeurl-portlet-war/WEB-INF/portlet.xml
branches/JBoss_Portal_Branch_2_7/wsrp/src/resources/tests/test-resourcenoencodeurl-portlet-war/WEB-INF/web.xml
branches/JBoss_Portal_Branch_2_7/wsrp/src/resources/tests/test-resourcenoencodeurl-portlet-war/gif/
branches/JBoss_Portal_Branch_2_7/wsrp/src/resources/tests/test-resourcenoencodeurl-portlet-war/gif/logo.gif
Modified:
branches/JBoss_Portal_Branch_2_7/wsrp/build.xml
branches/JBoss_Portal_Branch_2_7/wsrp/src/main/org/jboss/portal/test/wsrp/framework/support/MockHttpServletRequest.java
branches/JBoss_Portal_Branch_2_7/wsrp/src/main/org/jboss/portal/test/wsrp/v1/producer/MarkupTestCase.java
branches/JBoss_Portal_Branch_2_7/wsrp/src/main/org/jboss/portal/wsrp/producer/AbsoluteURLReplacementGenerator.java
branches/JBoss_Portal_Branch_2_7/wsrp/src/main/org/jboss/portal/wsrp/producer/WSRPPortletInvocationContext.java
Log:
- JBPORTAL-2067: Fixed several issues, added more tests.
Modified: branches/JBoss_Portal_Branch_2_7/wsrp/build.xml
===================================================================
--- branches/JBoss_Portal_Branch_2_7/wsrp/build.xml 2008-07-10 21:48:11 UTC (rev 11415)
+++ branches/JBoss_Portal_Branch_2_7/wsrp/build.xml 2008-07-10 21:48:41 UTC (rev 11416)
@@ -1,4 +1,5 @@
-<?xml version="1.0"
encoding="UTF-8"?><!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+<?xml version="1.0" encoding="UTF-8"?>
+<!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~ JBoss, a division of Red Hat ~
~ Copyright 2006, Red Hat Middleware, LLC, and individual ~
~ contributors as indicated by the @authors tag. See the ~
@@ -609,6 +610,9 @@
<!-- Resource test portlet -->
<package-test-portlet archiveName="resource"
portletName="Resource"/>
+ <!-- Non URL Encoded Resource test portlet -->
+ <package-test-portlet archiveName="resourcenoencodeurl"
portletName="ResourceNoEncodeURL"/>
+
<!-- Multipart test portlet -->
<!--<package-test-portlet archiveName="multipart"
portletName="Multipart"/>-->
@@ -861,6 +865,8 @@
<execute-tests>
<x-test>
<test todir="${test.reports}"
name="org.jboss.portal.test.wsrp.other.WSRPPortletURLTestCase"/>
+ <test todir="${test.reports}"
+
name="org.jboss.portal.test.wsrp.other.AbsoluteURLReplacementGeneratorTestCase"/>
<test todir="${test.reports}"
name="org.jboss.portal.test.wsrp.other.UserContextConverterTestCase"/>
<test todir="${test.reports}"
name="org.jboss.portal.test.wsrp.other.RegistrationPropertyDescriptionTestCase"/>
Modified:
branches/JBoss_Portal_Branch_2_7/wsrp/src/main/org/jboss/portal/test/wsrp/framework/support/MockHttpServletRequest.java
===================================================================
---
branches/JBoss_Portal_Branch_2_7/wsrp/src/main/org/jboss/portal/test/wsrp/framework/support/MockHttpServletRequest.java 2008-07-10
21:48:11 UTC (rev 11415)
+++
branches/JBoss_Portal_Branch_2_7/wsrp/src/main/org/jboss/portal/test/wsrp/framework/support/MockHttpServletRequest.java 2008-07-10
21:48:41 UTC (rev 11416)
@@ -41,6 +41,9 @@
private HttpSession session;
private Map attrs;
+ public static String scheme = "http";
+ public static String serverName = "test";
+ public static Integer serverPort = 1234;
public MockHttpServletRequest(HttpSession session)
{
@@ -89,7 +92,20 @@
{
String name = (String)args[0];
attrs.remove(name);
+ return null;
}
+ if ("getScheme".equals(methodName))
+ {
+ return scheme;
+ }
+ if ("getServerName".equals(methodName))
+ {
+ return serverName;
+ }
+ if ("getServerPort".equals(methodName))
+ {
+ return serverPort;
+ }
throw new UnsupportedOperationException("MockHttpServletRequest does not
support: " + method);
}
}
Added:
branches/JBoss_Portal_Branch_2_7/wsrp/src/main/org/jboss/portal/test/wsrp/other/AbsoluteURLReplacementGeneratorTestCase.java
===================================================================
---
branches/JBoss_Portal_Branch_2_7/wsrp/src/main/org/jboss/portal/test/wsrp/other/AbsoluteURLReplacementGeneratorTestCase.java
(rev 0)
+++
branches/JBoss_Portal_Branch_2_7/wsrp/src/main/org/jboss/portal/test/wsrp/other/AbsoluteURLReplacementGeneratorTestCase.java 2008-07-10
21:48:41 UTC (rev 11416)
@@ -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.test.wsrp.other;
+
+import junit.framework.TestCase;
+import org.jboss.portal.test.wsrp.framework.support.MockHttpServletRequest;
+import static org.jboss.portal.test.wsrp.framework.support.MockHttpServletRequest.*;
+import org.jboss.portal.wsrp.producer.AbsoluteURLReplacementGenerator;
+import static org.jboss.portal.wsrp.producer.AbsoluteURLReplacementGenerator.PORT_END;
+import static org.jboss.portal.wsrp.producer.AbsoluteURLReplacementGenerator.SCH_END;
+
+import javax.servlet.http.HttpServletRequest;
+import java.lang.reflect.Proxy;
+
+/**
+ * @author <a href="mailto:chris.laprun@jboss.com">Chris
Laprun</a>
+ * @version $Revision$
+ */
+public class AbsoluteURLReplacementGeneratorTestCase extends TestCase
+{
+ private AbsoluteURLReplacementGenerator gen;
+
+ @Override
+ protected void setUp() throws Exception
+ {
+ super.setUp();
+
+ MockHttpServletRequest mockRequest = new MockHttpServletRequest(null);
+ HttpServletRequest request =
(HttpServletRequest)Proxy.newProxyInstance(getClass().getClassLoader(),
+ new Class[]{HttpServletRequest.class}, mockRequest);
+ gen = new AbsoluteURLReplacementGenerator(request);
+ }
+
+ public void testNonAbsoluteURL()
+ {
+ String url = "foo";
+ assertEquals(url, gen.getAbsoluteURLFor(url));
+ }
+
+ public void testAbsoluteURL()
+ {
+ String url = "/foo";
+ assertEquals(scheme + SCH_END + serverName + PORT_END + serverPort + url,
gen.getAbsoluteURLFor(url));
+ }
+
+ public void testWSRPEncodedURL()
+ {
+ String url =
"wsrp_rewrite?wsrp-urlType=blockingAction&wsrp-interactionState=JBPNS_/wsrp_rewrite";
+ assertEquals(url, gen.getAbsoluteURLFor(url));
+ }
+}
Added:
branches/JBoss_Portal_Branch_2_7/wsrp/src/main/org/jboss/portal/test/wsrp/portlet/ResourceNoEncodeURLPortlet.java
===================================================================
---
branches/JBoss_Portal_Branch_2_7/wsrp/src/main/org/jboss/portal/test/wsrp/portlet/ResourceNoEncodeURLPortlet.java
(rev 0)
+++
branches/JBoss_Portal_Branch_2_7/wsrp/src/main/org/jboss/portal/test/wsrp/portlet/ResourceNoEncodeURLPortlet.java 2008-07-10
21:48:41 UTC (rev 11416)
@@ -0,0 +1,44 @@
+/*
+* 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.test.wsrp.portlet;
+
+import javax.portlet.GenericPortlet;
+import javax.portlet.PortletException;
+import javax.portlet.RenderRequest;
+import javax.portlet.RenderResponse;
+import java.io.IOException;
+import java.io.Writer;
+
+/**
+ * @author <a href="mailto:chris.laprun@jboss.com">Chris
Laprun</a>
+ * @version $Revision$
+ */
+public class ResourceNoEncodeURLPortlet extends GenericPortlet
+{
+ protected void doView(RenderRequest request, RenderResponse response) throws
PortletException, IOException
+ {
+ response.setContentType("text/html");
+ Writer writer = response.getWriter();
+ writer.write("<img src='" + request.getContextPath() +
"/gif/logo.gif'/>");
+ }
+}
Modified:
branches/JBoss_Portal_Branch_2_7/wsrp/src/main/org/jboss/portal/test/wsrp/v1/producer/MarkupTestCase.java
===================================================================
---
branches/JBoss_Portal_Branch_2_7/wsrp/src/main/org/jboss/portal/test/wsrp/v1/producer/MarkupTestCase.java 2008-07-10
21:48:11 UTC (rev 11415)
+++
branches/JBoss_Portal_Branch_2_7/wsrp/src/main/org/jboss/portal/test/wsrp/v1/producer/MarkupTestCase.java 2008-07-10
21:48:41 UTC (rev 11416)
@@ -60,7 +60,7 @@
private static final String DEFAULT_MARKUP_PORTLET_WAR =
"test-markup-portlet.war";
public MarkupTestCase()
- throws Exception
+ throws Exception
{
super("MarkupTestCase", DEFAULT_MARKUP_PORTLET_WAR);
}
@@ -115,8 +115,8 @@
MarkupResponse response = markupService.getMarkup(getMarkup);
checkMarkupResponse(response, "<form method='post'
action='wsrp_rewrite?wsrp-urlType=blockingAction&wsrp" +
- "-interactionState=JBPNS_/wsrp_rewrite'
id='wsrp_rewrite_portfolioManager'><table><tr><td>Stock
symbol</t" +
- "d><td><input
name='symbol'/></td></tr><tr><td><input
type='submit'
value='Submit'></td></tr></table></form>");
+ "-interactionState=JBPNS_/wsrp_rewrite'
id='wsrp_rewrite_portfolioManager'><table><tr><td>Stock
symbol</t" +
+ "d><td><input
name='symbol'/></td></tr><tr><td><input
type='submit'
value='Submit'></td></tr></table></form>");
}
public void testGetMarkupRenderParameters() throws Exception
@@ -154,7 +154,7 @@
// let's see now if we can increment the counter
PerformBlockingInteraction performBlockingInteraction =
-
WSRPTypeFactory.createDefaultPerformBlockingInteraction(getHandleForCurrentlyDeployedArchive());
+
WSRPTypeFactory.createDefaultPerformBlockingInteraction(getHandleForCurrentlyDeployedArchive());
InteractionParams interactionParams =
performBlockingInteraction.getInteractionParams();
interactionParams.setInteractionState(incrementAction.getInteractionState().getStringValue());
markupService.performBlockingInteraction(performBlockingInteraction);
@@ -222,7 +222,7 @@
public void testPerformBlockingInteractionRedirect() throws Exception
{
PerformBlockingInteraction performBlockingInteraction =
- WSRPTypeFactory.createDefaultPerformBlockingInteraction(getDefaultHandle());
+
WSRPTypeFactory.createDefaultPerformBlockingInteraction(getDefaultHandle());
InteractionParams interactionParams =
performBlockingInteraction.getInteractionParams();
NamedString[] formParams = {new NamedString("symbol", "HELP")};
// crappy way but this is a test! ;)
interactionParams.setFormParameters(formParams);
@@ -436,7 +436,7 @@
MarkupResponse response = markupService.getMarkup(getMarkup);
checkMarkupResponse(response,
"wsrp_rewrite?wsrp-urlType=blockingAction&wsrp-interactionState=JBPNS_/wsrp_rewrite\n"
+
-
"wsrp_rewrite?wsrp-urlType=render&wsrp-navigationalState=JBPNS_/wsrp_rewrite");
+
"wsrp_rewrite?wsrp-urlType=render&wsrp-navigationalState=JBPNS_/wsrp_rewrite");
}
finally
{
@@ -473,7 +473,7 @@
try
{
PerformBlockingInteraction action =
-
WSRPTypeFactory.createDefaultPerformBlockingInteraction(getHandleForCurrentlyDeployedArchive());
+
WSRPTypeFactory.createDefaultPerformBlockingInteraction(getHandleForCurrentlyDeployedArchive());
action.getInteractionParams().setFormParameters(new NamedString[]{new
NamedString("multi", "value1")});
BlockingInteractionResponse actionResponse =
markupService.performBlockingInteraction(action);
GetMarkup markupRequest = createMarkupRequestForCurrentlyDeployedPortlet();
@@ -482,7 +482,7 @@
checkMarkupResponse(response, "multi: value1");
action.getInteractionParams().setFormParameters(new NamedString[]{
- new NamedString("multi", "value1"), new
NamedString("multi", "value2")});
+ new NamedString("multi", "value1"), new
NamedString("multi", "value2")});
actionResponse = markupService.performBlockingInteraction(action);
markupRequest = createMarkupRequestForCurrentlyDeployedPortlet();
markupRequest.getMarkupParams().setNavigationalState(actionResponse.getUpdateResponse().getNavigationalState());
@@ -571,6 +571,32 @@
}
}
+ public void testGetMarkupWithNonURLEncodedResource() throws Exception
+ {
+ undeploy(DEFAULT_MARKUP_PORTLET_WAR);
+ String archive = "test-resourcenoencodeurl-portlet.war";
+ deploy(archive);
+
+ try
+ {
+ GetMarkup gm = createMarkupRequestForCurrentlyDeployedPortlet();
+ MarkupResponse res = markupService.getMarkup(gm);
+ String markupString = res.getMarkupContext().getMarkupString();
+
+ // accept either localhost or 127.0.0.1 for the host part of the generated
markup
+ String markupStart = "<img src='http://";
+ String markupEnd =
":8080/test-resourcenoencodeurl-portlet/gif/logo.gif'/>";
+ String localhostMarkup = markupStart + "localhost" + markupEnd;
+ String homeIPMarkup = markupStart + "127.0.0.1" + markupEnd;
+ boolean result = localhostMarkup.equals(markupString) ||
homeIPMarkup.equals(markupString);
+ ExtendedAssert.assertTrue(result);
+ }
+ finally
+ {
+ undeploy(archive);
+ }
+ }
+
public void testApplicationScopeVariableHandling() throws Exception
{
undeploy(DEFAULT_MARKUP_PORTLET_WAR);
@@ -598,7 +624,7 @@
private String checkPBIAndGetNavigationalState(String symbol) throws Exception
{
PerformBlockingInteraction performBlockingInteraction =
- WSRPTypeFactory.createDefaultPerformBlockingInteraction(getDefaultHandle());
+
WSRPTypeFactory.createDefaultPerformBlockingInteraction(getDefaultHandle());
InteractionParams interactionParams =
performBlockingInteraction.getInteractionParams();
NamedString[] formParams = {new NamedString("symbol", symbol)};
interactionParams.setFormParameters(formParams);
Modified:
branches/JBoss_Portal_Branch_2_7/wsrp/src/main/org/jboss/portal/wsrp/producer/AbsoluteURLReplacementGenerator.java
===================================================================
---
branches/JBoss_Portal_Branch_2_7/wsrp/src/main/org/jboss/portal/wsrp/producer/AbsoluteURLReplacementGenerator.java 2008-07-10
21:48:11 UTC (rev 11415)
+++
branches/JBoss_Portal_Branch_2_7/wsrp/src/main/org/jboss/portal/wsrp/producer/AbsoluteURLReplacementGenerator.java 2008-07-10
21:48:41 UTC (rev 11416)
@@ -23,6 +23,7 @@
package org.jboss.portal.wsrp.producer;
import org.jboss.portal.common.net.URLTools;
+import org.jboss.portal.wsrp.WSRPRewritingConstants;
import javax.servlet.http.HttpServletRequest;
@@ -33,8 +34,9 @@
public class AbsoluteURLReplacementGenerator extends URLTools.URLReplacementGenerator
{
private String serverAddress;
- static final String SCH_END = "://";
- static final String PORT_END = ":";
+ public static final String SCH_END = "://";
+ public static final String PORT_END = ":";
+ public static final String SLASH = "/";
public AbsoluteURLReplacementGenerator(HttpServletRequest request)
{
@@ -50,13 +52,32 @@
return getAbsoluteURLFor(urlMatch.getURLAsString());
}
+ /**
+ * todo: public only for tests
+ *
+ * @param url
+ * @return
+ */
public String getAbsoluteURLFor(String url)
{
- if (!URLTools.isNetworkURL(url))
+ return getAbsoluteURLFor(url, true);
+ }
+
+ String getAbsoluteURLFor(String url, boolean checkWSRPToken)
+ {
+ // We don't encode URL through this API when it is a wsrp URL
+ if (checkWSRPToken &&
url.startsWith(WSRPRewritingConstants.BEGIN_WSRP_REWRITE))
{
+ return url;
+ }
+
+ if (!URLTools.isNetworkURL(url) && url.startsWith(SLASH))
+ {
return serverAddress + url;
}
-
- return url;
+ else
+ {
+ return url;
+ }
}
}
Modified:
branches/JBoss_Portal_Branch_2_7/wsrp/src/main/org/jboss/portal/wsrp/producer/WSRPPortletInvocationContext.java
===================================================================
---
branches/JBoss_Portal_Branch_2_7/wsrp/src/main/org/jboss/portal/wsrp/producer/WSRPPortletInvocationContext.java 2008-07-10
21:48:11 UTC (rev 11415)
+++
branches/JBoss_Portal_Branch_2_7/wsrp/src/main/org/jboss/portal/wsrp/producer/WSRPPortletInvocationContext.java 2008-07-10
21:48:41 UTC (rev 11416)
@@ -22,6 +22,7 @@
******************************************************************************/
package org.jboss.portal.wsrp.producer;
+import org.jboss.portal.common.NotYetImplemented;
import org.jboss.portal.common.net.URLTools;
import org.jboss.portal.common.util.MarkupInfo;
import org.jboss.portal.portlet.ContainerURL;
@@ -95,33 +96,25 @@
/** Override the default behavior in order to avoid to encode when it is producer
written URL. */
public String encodeResourceURL(String url)
{
- if (url != null)
+ if (url != null &&
!url.startsWith(WSRPRewritingConstants.BEGIN_WSRP_REWRITE))
{
- if (url.startsWith(WSRPRewritingConstants.BEGIN_WSRP_REWRITE))
- {
- // We don't encode URL through this API when it is a wsrp URL
- return url;
- }
- else
- {
- // make root relative URLs absolute
- url = new
AbsoluteURLReplacementGenerator(getClientRequest()).getAbsoluteURLFor(url);
+ // make root relative URLs absolute. Optimization: we don't recheck the
precense of the WSRP token.
+ url = new
AbsoluteURLReplacementGenerator(getClientRequest()).getAbsoluteURLFor(url, false);
- // properly encode the URL
- url = URLTools.encodeXWWWFormURL(url);
+ // properly encode the URL
+ url = URLTools.encodeXWWWFormURL(url);
- // build the WSRP resource URL with rewrite tokens
- StringBuffer sb = new StringBuffer(url.length() * 2);
-
sb.append(WSRPRewritingConstants.BEGIN_WSRP_REWRITE).append(WSRPRewritingConstants.URL_TYPE_NAME)
-
.append(EQ).append(WSRPRewritingConstants.URL_TYPE_RESOURCE).append(AMP)
- .append(WSRPRewritingConstants.RESOURCE_URL).append(EQ).append(url)
-
.append(AMP).append(WSRPRewritingConstants.RESOURCE_REQUIRES_REWRITE)
- .append(EQ_TRUE).append(WSRPRewritingConstants.END_WSRP_REWRITE);
- return sb.toString();
- }
+ // build the WSRP resource URL with rewrite tokens
+ StringBuffer sb = new StringBuffer(url.length() * 2);
+
sb.append(WSRPRewritingConstants.BEGIN_WSRP_REWRITE).append(WSRPRewritingConstants.URL_TYPE_NAME)
+
.append(EQ).append(WSRPRewritingConstants.URL_TYPE_RESOURCE).append(AMP)
+ .append(WSRPRewritingConstants.RESOURCE_URL).append(EQ).append(url)
+ .append(AMP).append(WSRPRewritingConstants.RESOURCE_REQUIRES_REWRITE)
+ .append(EQ_TRUE).append(WSRPRewritingConstants.END_WSRP_REWRITE);
+ return sb.toString();
}
- return null;
+ return url;
}
/**
@@ -152,7 +145,7 @@
else if (containerURL instanceof ResourceURL)
{
ResourceURL resourceURL = (ResourceURL)containerURL;
- // todo: do something
+ throw new NotYetImplemented("ResourceURL support not implemented.
Requested URL: " + resourceURL);
}
}
return null;
Added:
branches/JBoss_Portal_Branch_2_7/wsrp/src/resources/tests/test-resourcenoencodeurl-portlet-war/WEB-INF/jboss-portlet.xml
===================================================================
---
branches/JBoss_Portal_Branch_2_7/wsrp/src/resources/tests/test-resourcenoencodeurl-portlet-war/WEB-INF/jboss-portlet.xml
(rev 0)
+++
branches/JBoss_Portal_Branch_2_7/wsrp/src/resources/tests/test-resourcenoencodeurl-portlet-war/WEB-INF/jboss-portlet.xml 2008-07-10
21:48:41 UTC (rev 11416)
@@ -0,0 +1,28 @@
+<!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ ~ JBoss, a division of Red Hat ~
+ ~ Copyright 2007, 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. ~
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
+<portlet-app>
+ <portlet>
+ <portlet-name>Resource Non URL Encoded Test Portlet</portlet-name>
+ <remotable>true</remotable>
+ </portlet>
+</portlet-app>
\ No newline at end of file
Added:
branches/JBoss_Portal_Branch_2_7/wsrp/src/resources/tests/test-resourcenoencodeurl-portlet-war/WEB-INF/portlet.xml
===================================================================
---
branches/JBoss_Portal_Branch_2_7/wsrp/src/resources/tests/test-resourcenoencodeurl-portlet-war/WEB-INF/portlet.xml
(rev 0)
+++
branches/JBoss_Portal_Branch_2_7/wsrp/src/resources/tests/test-resourcenoencodeurl-portlet-war/WEB-INF/portlet.xml 2008-07-10
21:48:41 UTC (rev 11416)
@@ -0,0 +1,42 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ ~ 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. ~
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
+
+<portlet-app
xmlns="http://java.sun.com/xml/ns/portlet/portlet-app_1_0.xsd"
+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+
xsi:schemaLocation="http://java.sun.com/xml/ns/portlet/portlet-app_1...
version="1.0">
+ <portlet>
+ <portlet-name>Resource Non URL Encoded Test Portlet</portlet-name>
+
<portlet-class>org.jboss.portal.test.wsrp.portlet.ResourceNoEncodeURLPortlet</portlet-class>
+
+ <supports>
+ <mime-type>text/html</mime-type>
+ <portlet-mode>view</portlet-mode>
+ </supports>
+
+ <portlet-info>
+ <title>Non URL Encoded Resource Test</title>
+ </portlet-info>
+ </portlet>
+
+</portlet-app>
\ No newline at end of file
Added:
branches/JBoss_Portal_Branch_2_7/wsrp/src/resources/tests/test-resourcenoencodeurl-portlet-war/WEB-INF/web.xml
===================================================================
---
branches/JBoss_Portal_Branch_2_7/wsrp/src/resources/tests/test-resourcenoencodeurl-portlet-war/WEB-INF/web.xml
(rev 0)
+++
branches/JBoss_Portal_Branch_2_7/wsrp/src/resources/tests/test-resourcenoencodeurl-portlet-war/WEB-INF/web.xml 2008-07-10
21:48:41 UTC (rev 11416)
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ ~ 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. ~
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
+
+<web-app version="2.4"
+
xmlns="http://java.sun.com/xml/ns/j2ee"
+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
+</web-app>
\ No newline at end of file
Added:
branches/JBoss_Portal_Branch_2_7/wsrp/src/resources/tests/test-resourcenoencodeurl-portlet-war/gif/logo.gif
===================================================================
(Binary files differ)
Property changes on:
branches/JBoss_Portal_Branch_2_7/wsrp/src/resources/tests/test-resourcenoencodeurl-portlet-war/gif/logo.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream