Hi everybody,
Is there a standard / preferred way(s) to pass parameters from one Action(Form) to
another? Is there some way to have some property (of any type) automatically mapped
between two ActionForms?
Regards,
Freddy.
---
Outgoing mail is certified Virus Free.
Checked by AVG
I am a relative newbie and I have a question regarding passing of parameters in
actions.
Currently, I am using LookupDispatchAction for all my actions which requires passing
at least one parameter to my actions as well as any additional that I might have.
Thus, I have code in my JSP like
Is there any reason you are forwarding from JSP? Try using Dispatcher
in Action1 class like
request.getRequestDispatcher(/Action2.do).forward(request, response);
- jung
Hunter Hillegas wrote:
I am trying to pass a parameter between two actions and running into
trouble.
I call action 1 like
: Jung Yang [mailto:[EMAIL PROTECTED]
Sent: Tuesday, 15 July 2003 22:31
To: [EMAIL PROTECTED]
Subject: Re: Passing Parameters Between Actions
Is there any reason you are forwarding from JSP? Try using Dispatcher
in Action1 class like
request.getRequestDispatcher(/Action2.do).forward(request, response
Parameters Between Actions
Won't this look for a forward with '?rec_num=map1' in the name of the
forward?
This is not what I need... I need to make the parameter available to the
second action... But the parameter will change with each request. I can't
hardwire the parameter names into the forward
Hello, i'm using this dynamic link to pass a parameters to an action:
http://localhost:8081/deleteEvent.do?action=confirmDelete
* code in deleteEventAction :
try {
String action = (String) request.getAttribute(action);
if
);
if(confirmDelete.equals(action)){}
Bye..
-Original Message-
From: José Moreira [mailto:[EMAIL PROTECTED]
Sent: lundi, 7. juillet 2003 13:51
To: Struts Users Mailing List
Subject: Parameters to Actions
Hello, i'm using this dynamic link to pass a parameters to an action:
http://localhost:8081
typo in action field in input form. maybe...
Jose' Moreira wrote:
Hello, i'm using this dynamic link to pass a parameters to an action:
http://localhost:8081/deleteEvent.do?action=confirmDelete
* code in deleteEventAction :
try {
String action = (String)
Hello, i'm using this dynamic link to pass a parameters to an action:
http://localhost:8081/deleteEvent.do?action=confirmDelete
String action = (String) request.getAttribute(action);
Use getParameter instead of getAttribute!
HTH, Heiko
I am trying to pass a parameter between two actions and running into
trouble.
I call action 1 like this: /Action1.do?rec_num=1
Action1 does some processing and when complete it forwards via an
ActionForward to Action2 as such:
forward name=action2 path=/Action2.do/
Action2 has no way to
path=/Action2.do?rec_num=map1 /
request.getParameter(rec_num);
can use logic:equal if you are forwarding to a JSP
-Original Message-
From: Hunter Hillegas [mailto:[EMAIL PROTECTED]
Sent: Monday, July 07, 2003 3:03 PM
To: Struts List
Subject: Passing Parameters Between Actions
I am
or u can use
in action1:
actionForward = mapping.findForward(FOR_WARD) + ?rec_num=map1;
-Original Message-
From: Mathew, Manoj
Sent: Monday, July 07, 2003 3:34 PM
To: Struts Users Mailing List
Subject: RE: Passing Parameters Between Actions
path=/Action2.do?rec_num=map1
: Mathew, Manoj [EMAIL PROTECTED]
Reply-To: Struts Users Mailing List [EMAIL PROTECTED]
Date: Mon, 7 Jul 2003 15:49:59 -0500
To: Struts Users Mailing List [EMAIL PROTECTED]
Subject: RE: Passing Parameters Between Actions
or u can use
in action1:
actionForward = mapping.findForward(FOR_WARD
In the struts-config.xml file I want to pass a few parameters to my actions
but it looks like the DTD only supports one parameter tag.
I.E.:
action path=/app/main
type=com.symbol.mobilecommerce.analysis.actions.app.Main
name=app.main
parameter=admin
forward name=PAGE_SRC path=/app
Whitefish MT 59937
P (406) 862-2245
F (406) 862-0354
[EMAIL PROTECTED]
http://www.phase.ws
-Original Message-
From: Sloan Seaman [mailto:[EMAIL PROTECTED]
Sent: Tuesday, February 25, 2003 12:29 PM
To: Struts Users Mailing List
Subject: Passing parameters to Actions
In the struts-config.xml
Message-
From: Sloan Seaman [mailto:[EMAIL PROTECTED]
Sent: Tuesday, February 25, 2003 2:29 PM
To: Struts Users Mailing List
Subject: Passing parameters to Actions
In the struts-config.xml file I want to pass a few parameters
to my actions
but it looks like the DTD only supports one
:[EMAIL PROTECTED]
Sent: Tuesday, February 25, 2003 12:33 PM
To: Struts Users Mailing List
Subject: RE: Passing parameters to Actions
parameter is only used for dispatch actions. If you want to set properties
for an action... you can extend the ActionMapping class and use the
set-property in an action
parameters to Actions
parameter is only used for dispatch actions. If you want to
set properties
for an action... you can extend the ActionMapping class and use the
set-property in an action element while specifying the
className attribute
of the action element.
Brandon Goodin
Phase Web
, February 25, 2003 2:29 PM
To: Struts Users Mailing List
Subject: Passing parameters to Actions
In the struts-config.xml file I want to pass a few parameters
to my actions
but it looks like the DTD only supports one parameter tag.
I.E.:
action path=/app/main
type
]
Sent: Tuesday, February 25, 2003 2:40 PM
Subject: RE: Passing parameters to Actions
Here is a config sample:
action path=/myAction.do
parameter=submit
type=com.foo.MyAction
name=myForm
scope=request
className=com.foo.MyExtendedActionMapping
set-property property
Message-
From: Sloan Seaman [mailto:[EMAIL PROTECTED]
Sent: Tuesday, February 25, 2003 12:56 PM
To: Struts Users Mailing List
Subject: Re: Passing parameters to Actions
Ok. sounds like a plan. Question though:
How do I access the set-property information? Do I have to parse the XML
or something
Very cool.
Thanks!!!
--
Sloan
- Original Message -
From: Brandon Goodin [EMAIL PROTECTED]
To: Struts Users Mailing List [EMAIL PROTECTED]
Sent: Tuesday, February 25, 2003 3:06 PM
Subject: RE: Passing parameters to Actions
It is done automagically upon startup of your application
I wonder if MyExtendedActionMapping is as simple as:
public class MyExtendedActionMapping extends ActionMapping {
private String xxx;
public void setXXX(String xxx) { this.xxx = xxx; }
public String getXXX() { return xxx; }
}
Should I implement any other method...?
: Tuesday, February 25, 2003 1:32 PM
To: Struts Users Mailing List
Subject: RE: Passing parameters to Actions
I wonder if MyExtendedActionMapping is as simple as:
public class MyExtendedActionMapping extends ActionMapping {
private String xxx;
public void setXXX(String xxx
:[EMAIL PROTECTED]
Sent: Tuesday, February 25, 2003 3:32 PM
To: Struts Users Mailing List
Subject: RE: Passing parameters to Actions
I wonder if MyExtendedActionMapping is as simple as:
public class MyExtendedActionMapping extends ActionMapping {
private String xxx;
public void
Well, I'm sure it's a typo, but make sure the methods are called
setXxx(String) and getXxx()..! :)
Geeta
Guido wrote:
I wonder if MyExtendedActionMapping is as simple as:
public class MyExtendedActionMapping extends ActionMapping {
private String xxx;
public void
Mailing List
Subject: Re: Passing parameters to Actions
Well, I'm sure it's a typo, but make sure the methods are called
setXxx(String) and getXxx()..! :)
Geeta
Guido wrote:
I wonder if MyExtendedActionMapping is as simple as:
public class MyExtendedActionMapping extends ActionMapping
) 862-0354
[EMAIL PROTECTED]
http://www.phase.ws
-Original Message-
From: Guido [mailto:[EMAIL PROTECTED]
Sent: Tuesday, February 25, 2003 1:32 PM
To: Struts Users Mailing List
Subject: RE: Passing parameters to Actions
I wonder if MyExtendedActionMapping is as simple as:
public class
ag
Zurich, Switzerland
-Original Message-
From: struts-user-digest-help
[mailto:[EMAIL PROTECTED]]
Sent: Freitag, 8. März 2002 20:35
To: struts-user
Cc: M.Orbidans
Subject: How to pass parameters to actions ? action.do?variable=value
hello
I need to create links with different
hello
I need to create links with different parameters. Can I pass them
directly to actions ?
like this aaction.do?variable=value/a
Does the Struts servlet do POST and GET ?
thanx
Maris Orbidans
--
To unsubscribe, e-mail: mailto:[EMAIL PROTECTED]
For additional commands, e-mail:
]]
Sent: Friday, March 08, 2002 2:35 PM
To: Struts Users Mailing List
Subject: How to pass parameters to actions ? action.do?variable=value
hello
I need to create links with different parameters. Can I pass them
directly to actions ?
like this aaction.do?variable=value/a
Does the Struts servlet
christian reichlin wrote:
hi,
im looking for an easy way to "configure" actions.
One general approach to this comes from the fact that you can subclass the
ActionMapping class with your own, which could then include some additional
properties. Then, you could say:
action
32 matches
Mail list logo