Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Problem Passing Parameter values to action

 
Harry Singh
Ranch Hand
Posts: 124
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is there any reason you're not just submitting the form normally?
 
Harry Singh
Ranch Hand
Posts: 124
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic