I am not using any wlm specific features. Its plain jsp and servelets.
WebActionMapping webActionMapping = this.getWebActionMapping(selectedURL);
actionHandler = this.getWebActionHandler(webActionMapping, webSM);
actionHandler.init(_request,_response,webSM,webActionMapping);
// call action method to handle the request
String actionMethodName = webActionMapping.getWebActionMethodName();
Method actionMethod = this.getActionMethod(actionHandler,actionMethodName);
logger.log(Level.INFO,"Invoke " + webActionMapping.getWebActionHandlerClass() + "." + actionMethodName + "()");
actionMethod.invoke(actionHandler,new Object[0]);
nextScreen = actionHandler.getNextScreen();
redirect = actionHandler.isRedirect();
// place the web session manager proxy in session for JSP
if (!webSM.isDestroyed())
this.setWebSessionManagerProxy(webSM);
}
String forwardURL = nextScreen;
if (redirect)
{ System.out.println("If redirect is true");
logger.log(Level.INFO,"Redirecting request to [" + contextURL + forwardURL + "]");
// redirecting url needs to be relative to the server root path
_response.sendRedirect(_response.encodeRedirectURL(contextURL + forwardURL));
} else {
System.out.println("If forwardURL is true");
// forwading url are relative to the webapp context path
forwardURL = "/" + forwardURL;
logger.log(Level.INFO,"Forwarding request to [" + forwardURL + "]");
RequestDispatcher rd = context.getRequestDispatcher(_response.encodeURL(forwardURL));
// up to here i am getting values from request, But in jsp i am getting null
rd.forward(_request, _response);
}