This should work. I've used the same construct before. Make sure that myObj !=
null in the Action and that you are referencing request.getAttribute(label) in
the JSP.
-Carl
Rachell, Morgan wrote:
In a JSP page, I have a link that calls an Action. Usually, this is done
with a submit button
You should also build your Action using a package so
struts/Web Container knows exactly where to look. Do some debugging
to see if the Action is actually called at all.
Example struts-config.xml ActionMapping with package
action
path=/GetUsersAction
type=app.GetUsersAction
forward
I'm not sure exactly what you want. It's easy to not have a form bean
associated with an action. In struts-config.xml define your action like
this:
action type=com.yourcorp.YourAction
path=/index/
Dave
From: Challa, Prasad V [EMAIL PROTECTED]
Reply-To: Struts Users Mailing List
[mailto:[EMAIL PROTECTED]]
Sent: Thursday, September 12, 2002 4:02 PM
To: [EMAIL PROTECTED]
Subject: Re: Action without a form
I'm not sure exactly what you want. It's easy to not have a form bean
associated with an action. In struts-config.xml define your action like
this:
action type
: '[EMAIL PROTECTED]' [EMAIL PROTECTED]
Subject: RE: Action without a form
Date: Thu, 12 Sep 2002 16:06:55 -0500
Thank you Dave for your reply.
My question is how would you call or invoke that action from your jsp. I
know we can use html:link and forward for that but I need to do it from a
button
help me with this.
Thank you very much,
Prasad.
-Original Message-
From: David Graham [mailto:[EMAIL PROTECTED]]
Sent: Thursday, September 12, 2002 4:13 PM
To: [EMAIL PROTECTED]
Subject: RE: Action without a form
You invoke it just like any other url.
a href=/app/someAction.domy link
this:
forward name=forward.foo path=/app/someAction.do/
chris
-Original Message-
From: David Graham [mailto:[EMAIL PROTECTED]]
Sent: Thursday, September 12, 2002 4:13 PM
To: [EMAIL PROTECTED]
Subject: RE: Action without a form
You invoke it just like any other url.
a href=/app
That's the best way to do it.
Dave
From: Bartley, Chris P [PCS] [EMAIL PROTECTED]
Reply-To: Struts Users Mailing List [EMAIL PROTECTED]
To: 'Struts Users Mailing List' [EMAIL PROTECTED]
Subject: RE: Action without a form
Date: Thu, 12 Sep 2002 16:22:03 -0500
Note that the html:link tag will do
Use an usual HTML form.
Adolfo
From: Jennings, Christofer J. [EMAIL PROTECTED]
Reply-To: Struts Users Mailing List [EMAIL PROTECTED]
To: 'Struts Users Mailing List' [EMAIL PROTECTED]
Subject: Action without a form.
Date: Mon, 15 Apr 2002 12:05:17 -0700
I'd like to have an action without an
PROTECTED]
Subject: Re: Action without a form.
Use an usual HTML form.
Adolfo
From: Jennings, Christofer J. [EMAIL PROTECTED]
Reply-To: Struts Users Mailing List [EMAIL PROTECTED]
To: 'Struts Users Mailing List' [EMAIL PROTECTED]
Subject: Action without a form.
Date: Mon, 15 Apr 2002 12:05:17
I guess what you mean by this is that you don't want a form bean
associated with your action mapping, but you still want to pass data
either through another bean or in the request?
Could you clarify?
-Original Message-
From: Jennings, Christofer J. [mailto:[EMAIL PROTECTED]]
Sent:
Yes, it is null.
-Original Message-
From: Jennings, Christofer J. [mailto:[EMAIL PROTECTED]]
Sent: Monday, April 15, 2002 4:14 PM
To: 'Struts Users Mailing List'
Subject: RE: Action without a form.
Does this result in null being passed for the ActionForm parameter of
perform?
,boz
12 matches
Mail list logo