aspose file tools*
The moose likes Servlets and the fly likes Getting the status of a checkbox in a 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 "Getting the status of a checkbox in a servlet" Watch "Getting the status of a checkbox in a servlet" New topic
Author

Getting the status of a checkbox in a servlet

Mohit G Gupta
Ranch Hand

Joined: May 18, 2010
Posts: 634

i am building an email-system with servlets and html
with functionalities line inbox,compose delete mail.

i am facing problem ,while implementing the delete functionality
The requirement for the delete functionality is that user should select the checkbox corresponding to a mail to be deleted and the after clicking the delete hyperlink should be able to see the inbox with only the left over mails.



The data in the second row onwards is inserted into html table dynamically by querying the mysql database table mailbox corresponding to logged in user.
The checkbox is not within a form and don't want to use either a javascript or button for the deletetion.



----------------------------------delete inbox compose logout-------------------
---------------------select subject sender date---------------------
------------------------------------------------- IMP m20 09-09-2011


OCPJP 6.0 93%
OCPJWCD 5.0 98%
Paul Clapham
Bartender

Joined: Oct 14, 2005
Posts: 18110
    
    8

Your code seems to be generating HTML and updating the database all at once. Probably that's the source of your confusion. You should have two pieces of code: the first should generate the HTML, including a form containing the checkboxes, and the second should process the request generated by that form.
Mohit G Gupta
Ranch Hand

Joined: May 18, 2010
Posts: 634


Your code seems to be generating HTML and updating the database all at once. Probably that's the source of your confusion. You should have two pieces of code: the first should generate the HTML, including a form containing the checkboxes, and the second should process the request generated by that form.

i have deleted that portion from the code.
Paul Clapham
Bartender

Joined: Oct 14, 2005
Posts: 18110
    
    8

As far as I can tell your problem is that you don't know what HTML you should generate. If that's the case, then showing us some Java code that allegedly generates some HTML is pretty useless. Let's talk about the HTML you need (and why you have the idea that you don't want to use an HTML form).

Okay? Post the HTML you think you need and let's start from there.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Getting the status of a checkbox in a servlet
 
Similar Threads
please help me in sending email using java mail api
reading data from jsp page to another jsp page using request.getParameter
when i retrive data from access it showing empty page in tomcat
Automatic flushing of response
How can I retrieve date using rs.getDate() ?