struts-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Praveen Kumar Ralla (JIRA)" <>
Subject [jira] Created: (WW-3527) Struts2.0 porlet
Date Wed, 03 Nov 2010 04:38:25 GMT
Struts2.0 porlet 

                 Key: WW-3527
             Project: Struts 2
          Issue Type: Bug
          Components: Core Actions
    Affects Versions: 2.0.14
         Environment: Websphere Portal Server6.1.5, JSR168 API,
            Reporter: Praveen Kumar Ralla
             Fix For: 2.0.14

I am working on login page using struts2.0 portlet on wps 6.1.5. When I submit the form I
am getting an exception,

11/2/10 20:06:25:227 IST 0000002e ActionRespons E
setRenderParameter EJPPC0161E: Cannot set RenderParameter after sendRedirect has been called

11/2/10 20:06:25:243 IST 0000002e ActionRespons E
setRenderParameter EJPPC0161E: Cannot set RenderParameter after sendRedirect has been called

Here is my code..

Portlet Class

public class LoginBasePortlet extends Jsr168Dispatcher{
static Logger log;
public LoggerService LoggerService;
public Factory Factory;
private Context ctx = null;
private Object home = null;
private PortletServiceHome portletServiceHome = null;
public AuthenticationPortletService loginService = null;

boolean resumeSession = true;

public void init() throws PortletException {
// TODO Auto-generated method stub

Factory = Factory.getInstance();
LoggerService = Factory.getLoggerServiceInstance();
log = Logger.getLogger(LoginBasePortlet.class);
loginService = (AuthenticationPortletService) getLoginService();

protected void doView(RenderRequest renderRequest, RenderResponse renderResponse)
throws PortletException, IOException {

log.debug("LoginBasePortlet :: Enter into doView() method");

super.doView(renderRequest, renderResponse);
// TODO Auto-generated method stub

public void processAction(ActionRequest actionRequest, ActionResponse actionResponse)
throws PortletException, IOException {

log.debug("LoginBasePortlet :: Enter into processAction() method");
String userName = actionRequest.getParameter("userName");
String password = actionRequest.getParameter("password");

PortletSession session = actionRequest.getPortletSession();
if(loginService != null){
loginService.doLogin(userName, password, resumeSession, actionRequest, actionResponse);
// Exception occurs when the  dologin method is called...
session.setAttribute("authFlag", true);


session.setAttribute("authFlag", false,


super.processAction(actionRequest, actionResponse);

// TODO Auto-generated method stub
}catch(Exception e){


private AuthenticationPortletService getLoginService(){
try {
ctx = new InitialContext();
home = ctx.lookup("portletservice/");
if (home != null)
portletServiceHome = (PortletServiceHome) home;
if (portletServiceHome != null){
loginService = (AuthenticationPortletService) portletServiceHome.getPortletService(AuthenticationPortletService.class);

} catch (NamingException ne) {
}catch(Exception psue){


return loginService;


Here is my struts Action Class

public String execute() throws Exception {
// TODO Auto-generated method stub
//Factory Factory = null;

try {

PortletSession session = portletRequest.getPortletSession();

authFlag = (Boolean) session.getAttribute("authFlag");

if (authFlag == true ){

resultType = "fwdTOHome";


resultType = "Login";

}catch(Exception e){
// authFlag = false;


return resultType;

Am I doing anything wrong

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message