Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Agile forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JSP - Servlet Comm Pattern

 
JavaTee
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
folks & gurus,
am trying to find a viable-tryable pattern that would allow me to inform my Servlet of a single change of value on my JSP. I need to send the new value and the field Name/ID that changed.

Thanks in advance.
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64629
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"JavaTee",

There aren't many rules that you need to worry about here on the Ranch, but one that we take very seriously regards the use of proper names. Please take a look at the JavaRanch Naming Policy and adjust your display name to match it.

In particular, your display name must be a first and a last name separated by a space character, and must not be obviously fictitious.

Thanks!
bear
Forum Bartender
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64629
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Well, as I'm sure you know, once a page is sent to the browser the job of the servlet that generated the page is done and there can be no further communciation. Any subsequent interaction needs to happen in the guise of a new HTTP request back to the server.

You can generate such a request by submitting a page, but you can also use the XMLHttpRequest object (aka AJAX technology) to send a 'behind the scenes" request back to a servlet informing the server of changes.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic