aspose file tools*
The moose likes Struts and the fly likes Problem Passing Parameter values to action Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Problem Passing Parameter values to action" Watch "Problem Passing Parameter values to action" New topic
Author

Problem Passing Parameter values to action

Harry Singh
Ranch Hand

Joined: May 02, 2001
Posts: 124
Hi,

I'm just a started on struts. 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 string 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


and this is the form definition of SynchReportForm


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.

Any Pointers.

Thanks & Regards,
Harry
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

Is there any reason you're not just submitting the form normally?
Harry Singh
Ranch Hand

Joined: May 02, 2001
Posts: 124
The form values comes from another JSP. 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.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: Problem Passing Parameter values to action