This week's book giveaway is in the Agile and other Processes forum.
We're giving away four copies of The Mikado Method and have Ola Ellnestam and Daniel Brolund on-line!
See this thread for details.
The moose likes Struts and the fly likes Passing parameter value from jsp to action class Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Frameworks » Struts
Reply Bookmark "Passing parameter value from jsp to action class" Watch "Passing parameter value from jsp to action class" New topic
Author

Passing parameter value from jsp to action class

sa sam
Ranch Hand

Joined: Mar 01, 2009
Posts: 46
i want to get ipaddress of pc in jsp page and want to send this value to action class. my code is as follows -


how can i get this s_ipAddress value in my action class.
Fidel Edwards
Ranch Hand

Joined: Mar 19, 2008
Posts: 202
sa sam wrote:i want to get ipaddress of pc in jsp page and want to send this value to action class. my code is as follows -


how can i get this s_ipAddress value in my action class.


Your Action class would not be able to receive populated form bean until you submit it. So please create a property in your FormBean class (say s_ipAddress) and then try to access that property from your Action class



God Gave Me Nothing I Wanted, He Gave Me Everything I Needed.
sa sam
Ranch Hand

Joined: Mar 01, 2009
Posts: 46
i want to get that value after clicking on submit button.
Naman Patidar
Greenhorn

Joined: Oct 03, 2008
Posts: 15
you can use request.getRemoteAddr()
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

sa sam wrote:

Where do you believe this Java code will be executed?
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Passing parameter value from jsp to action class
 
Similar Threads
Help me with servlet - mapping
JSP session
JSTL not working
Passing values to param value dynamically in jsp
Help me with servlet - mapping