• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

acessing values across forms , actions

 
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks man ! i will try that out
 
reply
    Bookmark Topic Watch Topic
  • New Topic