wood burning stoves 2.0*
The moose likes Servlets and the fly likes getting button name Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "getting button name" Watch "getting button name" New topic

getting button name

sitaram irrinki
Ranch Hand

Joined: Feb 16, 2005
Posts: 158
Is there a way to know which key has been pressed while sending request to a servlet.
Like GO,REFRESH or BACKSPACE (especially the BACKSPACE).
Jeanne Boyarsky
internet detective

Joined: May 26, 2003
Posts: 30138

No. You only know that the request has been submitted.

You can identify a backspace/reload case by putting a value in the session when the page is first loaded and seeing if it is already there. This is the "token" approach.

[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
Consider Paul's rocket mass heater.
subject: getting button name
Similar Threads
servlet action
What's annoying that is said to be a feature in a Computer
Trouble using BufferedReader and the If Else statement.