aspose file tools*
The moose likes Struts and the fly likes calling method variable from anotherAction  class Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "calling method variable from anotherAction  class" Watch "calling method variable from anotherAction  class" New topic
Author

calling method variable from anotherAction class

R .sourav nayak
Ranch Hand

Joined: May 14, 2006
Posts: 67
hi,
i have a class named ViewAction and which has a following method

protected void setupRequestHandler(HttpServletRequest request, HttpServletRequestHandler requestHandler) {
String prompt = request.getParameter("prompt"); //$NON-NLS-1$
String solutionName = request.getParameter("solution"); //$NON-NLS-1$
String actionPath = request.getParameter("path"); //$NON-NLS-1$
String actionName = request.getParameter("action"); //$NON-NLS-1$
String processId = this.getClass().getName();
String instanceId = request.getParameter("instance-id"); //$NON-NLS-1$
requestHandler.setInstanceId(instanceId);
requestHandler.setProcessId(processId);
requestHandler.setAction(actionPath, actionName);
requestHandler.setSolutionName(solutionName);
requestHandler.setForcePrompt(prompt != null && prompt.equalsIgnoreCase("yes")); //$NON-NLS-1$
}

and i have another class named showAction and i wanted to call string varibale solutionname, actionpath from the setupRequestHandler() method.

how will call thoses varibale from showAction class?

thanks in advance
Mathias Nilsson
Ranch Hand

Joined: Aug 21, 2004
Posts: 367
Please be more specific. Post some more code.


SCJP1.4
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: calling method variable from anotherAction class