Deploy this portlet and reload the page a few times. The expected behavior is
that there is always only on entry, but jboss adds one with every request.
package com.opentext.websdk.portlet;
import java.io.IOException;
import java.io.Writer;
import java.util.HashSet;
import java.util.Iterator;
import java.util.Set;
import javax.portlet.ActionRequest;
import javax.portlet.ActionResponse;
import javax.portlet.Portlet;
import javax.portlet.PortletConfig;
import javax.portlet.PortletException;
import javax.portlet.RenderRequest;
import javax.portlet.RenderResponse;
public class MvoPortlet implements Portlet {
Set nameSpaces = null;
public void init(PortletConfig arg0) throws PortletException {
nameSpaces = new HashSet();
}
public void processAction(ActionRequest arg0, ActionResponse arg1)
throws PortletException, IOException {
// ignore
}
public void render(RenderRequest arg0, RenderResponse response)
throws PortletException, IOException {
response.setContentType("text/html");
String id = response.getNamespace();
nameSpaces.add(id);
Writer writer = response.getWriter();
writer.write("ids");
for (Iterator iter = nameSpaces.iterator(); iter.hasNext();) {
String element = (String) iter.next();
writer.write("");
writer.write(element);
writer.write("");
}
writer.write("");
writer.flush();
}
public void destroy() {
nameSpaces.clear();
nameSpaces = null;
}
}
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3919107#3919107
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3919107
-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems? Stop! Download the new AJAX search engine that makes
searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642
_______________________________________________
JBoss-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jboss-user