A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Win a copy of
Getting MEAN with Mongo, Express, Angular, and Node
this week in the
Problem Passing Parameter values to action
Joined: May 02, 2001
Nov 16, 2008 23:51:00
I'm just a started on
. So I just want to know how can I pass the parameters on the submit of the button to the action.
Basically I want to call one action on the button click.On the button click , I would like to send username in the query
to the action, so that only this user reports can be fetched.
I'm doing this on my button on click event
The action getSynchReport.do is defined in config file as
action path="/getSynchReport" type="mmu.action.ReportsAction" name="SynchReportForm" parameter="getSynchReport" validate="true" scope="request" forward name="Success" path=".mmu.pwdSynchReport"/ /action
and this is the form definition of SynchReportForm
form-bean name="SynchReportForm" type="org.apache.struts.validator.DynaValidatorActionForm" form-property name="userName" type="java.lang.String"/ form-property name="location" type="java.lang.String"/ /form-bean
So basically I want to set the username field of the form. How do I do that. I thought I could do it by query string, but it doesn't seem to work.
Thanks & Regards,
Joined: Sep 29, 2008
Nov 17, 2008 05:15:00
Is there any reason you're not just submitting the form normally?
Joined: May 02, 2001
Nov 17, 2008 16:29:00
The form values comes from another
. so from that JSP, the values are filled in text boxes and then the action is called and all works fine.
However I want to link this action or the result page from another JSP, which doesn't have this form.
I agree. Here's the link:
subject: Problem Passing Parameter values to action
I am getting error when starting Tomcat .How can I rectify it?
Struts: checkbox's previous value remains if i go back and unselect it
accessing dynaactionform in action class
Submit a form via hyperlink
How do I use html:select?
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2015