process action called twice

Hi,

in my case whenever the form is submitted once from the JSP page , the process action is called and then doView is called both methods twice.

Im writing down the code im using

*****Process Action******

public class ApplicantProfile extends GenericPortlet {

private PortletContext pContext;

private String strJSPPath ="";

private String strJSPFile="";

public void init(PortletConfig config) throws PortletException

{

super.init(config);

pContext = config.getPortletContext();

}

protected void doView (RenderRequest request, RenderResponse response) throws PortletException, IOException

{

System.out.println("In doView");

strJSPPath=ResourceManager.getCommonCtsValue(IApplicationCommonConstants.APPLIC ANT_PROFILE_PATH);

response.setContentType(request.getResponseContentType());

strJSPFile = request.getPreferences().getValue("ApplicantProfile", "");

PortletRequestDispatcher dispatcher = pContext.getRequestDispatcher(strJSPPath+strJSPFile);

dispatcher.include(request, response);

}

public void processAction(ActionRequest request, ActionResponse response) throws PortletException, IOException

{

System.out.println("In process Action");

}

}

In the JSP file im using the portlet:actionURL. so that it goes to process action first and then doView, but the problem is that after going to doView it agains goes to processAction and then doView. whereas normally it should do it once.

[1568 byte] By [manish_narula] at [2007-11-25 21:56:15]
# 1

Hi,

I noticed this behaviour on the portal server simulator that came with Java Studio enterprise, but when deploying the portlet-app on Portal Server 6 (installed with JES 2005Q4) this didn't happen.

In my case it looked like the same thread was accesing the portlet twice per request. So if I had a...

System.out.println("Portlet: doView()");

... in my portlet's doView I got this in the server log:

[#|2006-01-13T12:09:27.093+0200|INFO|sun-appserver-pe8.1_02|javax.e nterprise.system.stream.out|_ThreadID=31;|

Portlet: doView()|#]

[#|2006-01-13T12:09:27.109+0200|INFO|sun-appserver-pe8.1_02| javax.enterprise.system.stream.out|_ThreadID=31;|

Portlet: doView()|#]

As I said I had this happening only with the simulator (Harness portlet provider or whatever it is called). My post is on the studio forum:

http://swforum.sun.com/jive/thread.jspa?threadID=61527

But I haven't been provided with any help so far.

Juhani at 2007-7-5 1:15:54 > top of Java-index,Web & Directory Servers,Portal Servers...