aspose file tools*
The moose likes Servlets and the fly likes About Servlet Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "About Servlet " Watch "About Servlet " New topic
Author

About Servlet

Anonymous
Ranch Hand

Joined: Nov 22, 2008
Posts: 18944
I have Four Buttons in my Html Form
i want to know how the server is going to identify which Button
is Pressed???
Frank Carver
Sheriff

Joined: Jan 07, 1999
Posts: 6920
You give each button a name and a value, and they are passed as query parameters just like other form fields. Note that one common trick is to have multiple SUBMIT buttons - all with the same name, but different values - and use them to control what the servlet does with the form data.
eg.
The HTML contains:

and the servlet contains:


Read about me at frankcarver.me ~ Raspberry Alpha Omega ~ Frank's Punchbarrel Blog
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: About Servlet
 
Similar Threads
The x900 effect ?
WA #1.....word association
Cant use object from another class
Posting to bump up my count...
Text box value is not being completely filled with request attribute