File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
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
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "calling method variable from anotherAction  class" Watch "calling method variable from anotherAction  class" New topic

calling method variable from anotherAction class

R .sourav nayak
Ranch Hand

Joined: May 14, 2006
Posts: 67
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.setAction(actionPath, actionName);
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.

I agree. Here's the link:
subject: calling method variable from anotherAction class
It's not a secret anymore!