This week's book giveaway is in the Design forum.
We're giving away four copies of Building Microservices and have Sam Newman on-line!
See this thread for details.
The moose likes Servlets and the fly likes how checkbox works in servlets? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Building Microservices this week in the Design forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "how checkbox works in servlets?" Watch "how checkbox works in servlets?" New topic

how checkbox works in servlets?

kuni patel

Joined: Jun 04, 2005
Posts: 7
how can i get work with checkboxes in servlet.if i use checkbox in one servlet then how can i retrive those selected items in another servlet?

William Brogden
Author and all-around good cowpoke

Joined: Mar 22, 2000
Posts: 13007
You need to find a good tutorial/reference on HTML forms and the input items that can appear in them.
An INPUT of type="checkbox" that has a name="myname" will create a request parameter "myname" with value="on" if it has been checked.
Ben Souther

Joined: Dec 11, 2004
Posts: 13410

This chapter from "Core Servlets and Java Server Pages" covers all the HTML form elements from a servlet programmer's perspective:

Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
I agree. Here's the link:
subject: how checkbox works in servlets?
It's not a secret anymore!