Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

dynamic textbox and jstl/jsp  RSS feed

 
Mr.David Shapiro
Ranch Hand
Posts: 54
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hello,

If I have one or more textboxes with data in them (i.e., value is set for each of them) and I want to commit whatever changes a user does in the textboxes via sql:update (jstl) type command, then how can I do this with something like an onChange so that I can have onChange call a bean or just run an sql:update (jstl)?
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65826
134
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Nothing Tomcat-specific about this, so moved to the JSP forum.
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65826
134
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
onchange is a JavaScript mechanism that triggers on the client side long after the JSP (including JSTL tags) has been executed on the server in order to format and send the generated HTML page to the browser.

To communicate back with the server, you'll need to submit the form -- preferably to a servlet: I strongly discourage performing database actions in the presentation layer, especially within a JSP.

If you'd rather not refresh the whole page, you might investigate making the request via Ajax.
[ May 15, 2006: Message edited by: Bear Bibeault ]
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!