Bookmark Topic Watch Topic
  • New Topic

detect Keystroke in jsp textarea and keylistener in servlet

 
chan choon chee
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Report post to moderator
Hi i would like to know if you all have any solution that i can use this current code to change it so that it use TextArea in jsp and the keylistener code in servlet. i really need the answer and help thanks
i know i have to take out the JFrame,JTextfield and ContentPane but still i could not do it.

Servlet:

 
chan choon chee
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Report post to moderator
Currently my code with jsp is like this:

JSP:




 
Ulf Dittmer
Rancher
Posts: 42970
73
  • Likes 1
  • Mark post as helpful
  • send pies
  • Report post to moderator
You have a fundamental misconception about how servlets work. They are executed on the server, whereas any user interaction happens in the HTML generated by the JSP. If you want to capture and work with keystrokes, you need to do it with JavaScript as part of the HTML page. (And wrt. servlets, it is indeed their doGet and doPost methods that are used, not the main method.)
 
Dieter Quickfend
Bartender
Posts: 543
4
Java Netbeans IDE Redhat
  • Mark post as helpful
  • send pies
  • Report post to moderator
On the plus side, this application is the definition of scalability
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65516
105
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Report post to moderator
Please do not post the same question more than once. It was already pointed out in your other post that this approach was flawed.
 
    Bookmark Topic Watch Topic
  • New Topic
Boost this thread!