• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
Bartenders:
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

acessing values across forms , actions

 
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi

i am developing an application in which i have one.jsp which has one action associated.
i have html:link on same jsp which redirects to two.jsp using forwardaction.

now i need to access values of text boxes on one.jsp in action class associated with form in two.jsp..

please help me in this as i am very new to struts


Thanks in advance
Madhura P
 
Ranch Hand
Posts: 425
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You got forward and redirect mixed up.
1. Forward can be done only on server side from one jsp/servlet to another jsp/servlet within the server.
2. You have a link in the HTML page to the "two.jsp" and when user click on this it makes "GET" request not form POST.
3. If it's just one field you want to pass it to server, the simple way is to write a onclick function on html:link& to append the text box name with value to the actual href value.

There are few more options like changing the form action dynamically to sending additional parameter to one.jsp to forward to two.jsp. You need to pick how you want to implement.
 
Madhura Phansalkar
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks man ! i will try that out
 
And then the flying monkeys attacked. My only defense was this tiny ad:
the value of filler advertising in 2020
https://coderanch.com/t/730886/filler-advertising
    Bookmark Topic Watch Topic
  • New Topic