taylor 2004/01/13 19:58:51
Modified: . project.properties
applications/demo/src/java/org/apache/jetspeed/demo/preferences
PreferencePortlet.java
applications/pam/src/java/org/apache/jetspeed/apps/pam
PortletApplicationBrowser.java
applications/pam/src/webapp hello.jsp
cps/test/rewriter test-001-output.html
portal maven.xml
portal/src/webapp/WEB-INF/pages default-page.psml
Log:
Made the PAM portlet application a webapp-type portlet application
Too many problems with local webapp portlet apps
Revision Changes Path
1.3 +1 -1 jakarta-jetspeed-2/project.properties
Index: project.properties
===================================================================
RCS file: /home/cvs/jakarta-jetspeed-2/project.properties,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- project.properties 10 Jan 2004 17:32:48 -0000 1.2
+++ project.properties 14 Jan 2004 03:58:50 -0000 1.3
@@ -7,6 +7,6 @@
# The following MUST be defined in the user's build.properties
# catalina.shared.lib = <tomcat_home>/shared/lib/
-maven.repo.remote = http://www.bluesunrise.com/maven/,
http://www.bluesunrise.com/maven/
+maven.repo.remote = http://www.bluesunrise.com/maven/, http://www.ibiblio.org/maven/
1.7 +5 -2
jakarta-jetspeed-2/applications/demo/src/java/org/apache/jetspeed/demo/preferences/PreferencePortlet.java
Index: PreferencePortlet.java
===================================================================
RCS file:
/home/cvs/jakarta-jetspeed-2/applications/demo/src/java/org/apache/jetspeed/demo/preferences/PreferencePortlet.java,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- PreferencePortlet.java 20 Oct 2003 03:32:05 -0000 1.6
+++ PreferencePortlet.java 14 Jan 2004 03:58:50 -0000 1.7
@@ -62,6 +62,7 @@
import javax.portlet.PortletContext;
import javax.portlet.PortletException;
import javax.portlet.PortletRequestDispatcher;
+import javax.portlet.PortletSession;
import javax.portlet.RenderRequest;
import javax.portlet.RenderResponse;
@@ -104,7 +105,8 @@
*/
public void processAction(ActionRequest request, ActionResponse response)
throws PortletException, IOException
{
- Integer iCount = (Integer)
request.getAttribute("org.apache.jetspeed.invocationCount");
+ // Integer iCount = (Integer)
request.getAttribute("org.apache.jetspeed.invocationCount");
+ Integer iCount = (Integer)
request.getPortletSession().getAttribute("org.apache.jetspeed.invocationCount");
if (iCount == null)
{
iCount = new Integer(0);
@@ -116,6 +118,7 @@
response.setRenderParameter("invocationCount", String.valueOf(count));
response.setRenderParameter("invokeMessage", "processAction() I was invoked
" + count + " times!");
+
request.getPortletSession().setAttribute("org.apache.jetspeed.invocationCount", new
Integer(count), PortletSession.PORTLET_SCOPE);
System.out.println("--------------------------- I was
invoked!!!---------------------------------");
}
1.2 +19 -9
jakarta-jetspeed-2/applications/pam/src/java/org/apache/jetspeed/apps/pam/PortletApplicationBrowser.java
Index: PortletApplicationBrowser.java
===================================================================
RCS file:
/home/cvs/jakarta-jetspeed-2/applications/pam/src/java/org/apache/jetspeed/apps/pam/PortletApplicationBrowser.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- PortletApplicationBrowser.java 30 Dec 2003 06:21:43 -0000 1.1
+++ PortletApplicationBrowser.java 14 Jan 2004 03:58:50 -0000 1.2
@@ -54,7 +54,10 @@
package org.apache.jetspeed.apps.pam;
import java.io.IOException;
-import java.io.InputStream;
+//import java.io.InputStream;
+
+import javax.portlet.ActionRequest;
+import javax.portlet.ActionResponse;
import javax.portlet.GenericPortlet;
import javax.portlet.PortletConfig;
@@ -65,7 +68,7 @@
import javax.portlet.RenderRequest;
import javax.portlet.RenderResponse;
-import org.apache.jetspeed.cps.util.Streams;
+//import org.apache.jetspeed.cps.util.Streams;
/**
* This portlet is a browser over all the portlet applications in the system.
@@ -80,6 +83,7 @@
throws PortletException
{
System.out.println("ApplicationBrowserPortlet: initializing portlet, config
= " + config.getPortletName());
+ System.out.println("[MHL] Ready for action...");
super.init(config);
}
@@ -107,7 +111,7 @@
{
PortletContext context = getPortletContext();
response.setContentType("text/html");
-
+
PortletURL url = response.createRenderURL();
// url.addParameter("test", "value");
@@ -118,12 +122,18 @@
PortletRequestDispatcher rd = context.getRequestDispatcher("/hello.jsp");
rd.include(request, response);
- InputStream is = context.getResourceAsStream("/snipet.html");
- if (is != null)
- {
- Streams.drain(is, response.getWriter());
- }
+// InputStream is = context.getResourceAsStream("/snipet.html");
+// if (is != null)
+// {
+// Streams.drain(is, response.getWriter());
+// }
response.getWriter().println("<br/><b>Done Request dispatching.</b>");
}
+
+
+ public void processAction(ActionRequest actionRequest, ActionResponse
actionResponse) throws PortletException, IOException
+ {
+ System.out.println("[MHL] Napindot ako!!!");
+ }
}
1.2 +29 -1 jakarta-jetspeed-2/applications/pam/src/webapp/hello.jsp
Index: hello.jsp
===================================================================
RCS file: /home/cvs/jakarta-jetspeed-2/applications/pam/src/webapp/hello.jsp,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- hello.jsp 30 Dec 2003 06:21:43 -0000 1.1
+++ hello.jsp 14 Jan 2004 03:58:50 -0000 1.2
@@ -1,5 +1,33 @@
-<%@ page session="false"%>
+<%@ page language="java" import="javax.portlet.*, java.util.List" session="true" %>
+<%@ taglib uri='/WEB-INF/portlet.tld' prefix='portlet'%>
+<%@ taglib uri="http://java.sun.com/jstl/core" prefix="c" %>
+
+<portlet:defineObjects/>
<p>This page was invoked from a LOCAL portlet app</P>
<a href='/snipet.html'>somelink</a>
+
+<p>renderURL</p>
+
+<p>
+<portlet:renderURL windowState="normal" portletMode="view" var="myView">
+ <portlet:param name="invokeMsg" value="No action just render" />
+</portlet:renderURL>
+<a href="<c:out value="${myView}" />">View!</a>
+
+</p>
+
+<p>"<c:out value="${myView}" />"</p>
+
+<p>
+<a href="<portlet:actionURL windowState="normal" portletMode="view" />">My
Action!!!</a>
+<a href="<portlet:actionURL windowState="normal" portletMode="view" />">Invoke My
Action!!!</a>
+
+</p>
+
+
+<br>
+
+
+
1.12 +6 -6 jakarta-jetspeed-2/cps/test/rewriter/test-001-output.html
Index: test-001-output.html
===================================================================
RCS file: /home/cvs/jakarta-jetspeed-2/cps/test/rewriter/test-001-output.html,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -r1.11 -r1.12
--- test-001-output.html 30 Dec 2003 06:39:51 -0000 1.11
+++ test-001-output.html 14 Jan 2004 03:58:50 -0000 1.12
@@ -1,10 +1,10 @@
<p>
This is a test</p>
-<a name="1" href="http://www.bluesunrise.com/suffix" target="_BLANK">keep this</a>
- <a name="2" href="http://www.rewriter.com/stuff/junk/stuffedjunk.html/suffix"
target="_BLANK">junk</a>
- <a name="3" href="http://www.rewriter.com/stuff/junk/stuffedjunk.html/suffix"
target="_BLANK">junk2</a>
- <a name="4" href="javascript:whatever()">script</a>
- <a name="5" href="mailto:[EMAIL PROTECTED]">script</a>
- <a name="6" href="#INTERNAL">internal</a>
+<a href="http://www.bluesunrise.com/suffix" name="1" target="_BLANK">keep this</a>
+ <a href="http://www.rewriter.com/stuff/junk/stuffedjunk.html/suffix" name="2"
target="_BLANK">junk</a>
+ <a href="http://www.rewriter.com/stuff/junk/stuffedjunk.html/suffix" name="3"
target="_BLANK">junk2</a>
+ <a href="javascript:whatever()" name="4">script</a>
+ <a href="mailto:[EMAIL PROTECTED]" name="5">script</a>
+ <a href="#INTERNAL" name="6">internal</a>
1.29 +2 -1 jakarta-jetspeed-2/portal/maven.xml
Index: maven.xml
===================================================================
RCS file: /home/cvs/jakarta-jetspeed-2/portal/maven.xml,v
retrieving revision 1.28
retrieving revision 1.29
diff -u -r1.28 -r1.29
--- maven.xml 14 Jan 2004 01:47:27 -0000 1.28
+++ maven.xml 14 Jan 2004 03:58:51 -0000 1.29
@@ -107,7 +107,7 @@
<arg value="-PortalName" />
<arg value="jetspeed" />
<arg value="-ApplicationType" />
- <arg value="local" />
+ <arg value="webapp" />
</java>
</goal>
@@ -232,6 +232,7 @@
<attainGoal name="deploy" />
<attainGoal name="pam.register" />
<attainGoal name="pam.deploy" />
+ <attainGoal name="pam.padeploy" />
</goal>
<preGoal name="hotdeploy">
1.6 +5 -1
jakarta-jetspeed-2/portal/src/webapp/WEB-INF/pages/default-page.psml
Index: default-page.psml
===================================================================
RCS file:
/home/cvs/jakarta-jetspeed-2/portal/src/webapp/WEB-INF/pages/default-page.psml,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- default-page.psml 12 Jan 2004 18:22:18 -0000 1.5
+++ default-page.psml 14 Jan 2004 03:58:51 -0000 1.6
@@ -9,7 +9,7 @@
<fragment id="pe001" type="portlet" name="HelloPortlet">
<property layout="TwoColumns" name="row" value="0" />
<property layout="TwoColumns" name="column" value="0" />
- </fragment>
+ </fragment>
<fragment id="pe002" type="portlet" name="JMXPortlet">
<property layout="TwoColumns" name="row" value="0" />
<property layout="TwoColumns" name="column" value="1" />
@@ -21,6 +21,10 @@
<fragment id="pe004" type="portlet" name="CustomerList">
<property layout="TwoColumns" name="row" value="1" />
<property layout="TwoColumns" name="column" value="1" />
+ </fragment>
+ <fragment id="pe005" type="portlet" name="PortletApplicationBrowser">
+ <property layout="TwoColumns" name="row" value="1" />
+ <property layout="TwoColumns" name="column" value="2" />
</fragment>
</fragment>
</page>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]