• Post Reply Bookmark Topic Watch Topic
  • New Topic

Can Servlet do so? Pass value from this form to another form  RSS feed

 
Ken Shamrock
Ranch Hand
Posts: 139
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
For example, in webpage A, it popup another windows which can allow some value inputting and submit, once submit , the values will be return to the parent form in webpage A (just behave like javascript passing value to other forms), I heard that servlet can do this. Can it? Thanks
 
Bosun Bello
Ranch Hand
Posts: 1511
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes, you can share variables between servlets. You will need to add the attribute to the request, and then use the requestDispatchers forward method to forward to another servlet.
 
Dave Vick
Ranch Hand
Posts: 3244
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ken
As Bosun said you can do it but it wont act like iidoes in Javascript. With Javascript you can actually change the value of a form elemet on the parent page,however with a servlet the parent would have no idea that a change had been made unless you refresh the parent page - requiring another round trip to the server.
Just my $.02
 
Don't get me started about those stupid light bulbs.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!