In a JSP page, I have a link that calls an Action. Usually, this is done
with a submit button within a form, but I need it to be a link. Apparently,
this introduces a problem, since I'm not using a form. Basically, I want to
click a link, execute an Action which puts some object in request scope,
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
Hello,
I am getting an error when requesting a JSP page.
The extract from the Tomcat-Apache logfile is below.
Also I have included the action-mappings from the struts-config.xml file.
As you can see in there, I have no Form and JSP connected to that
Action. When it is started by the user (via a
Hello,
I am trying to invoke an action class without having a form-bean associated
with it. I know that it works with html:link tag and forward. but, can I use
a button or href or something like that to be able to do this. Can somebody
shed some light over this.
An example would be greatly
[EMAIL PROTECTED]
To: '[EMAIL PROTECTED]' [EMAIL PROTECTED]
Subject: Action without a form
Date: Thu, 12 Sep 2002 15:55:28 -0500
Hello,
I am trying to invoke an action class without having a form-bean associated
with it. I know that it works with html:link tag and forward. but, can I
use
a button
[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
I'd like to have an action without an associated form. Any suggestions?
Many thanks,
boz
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
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
: Monday, April 15, 2002 3:05 PM
To: 'Struts Users Mailing List'
Subject: Action without a form.
I'd like to have an action without an associated form. Any suggestions?
Many thanks,
boz
--
To unsubscribe, e-mail: mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]
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
16 matches
Mail list logo