File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes JSP and the fly likes Fetching one table cell click and passing it to servlet 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 » JSP
Reply locked New topic

Fetching one table cell click and passing it to servlet

Navya J Nair

Joined: Apr 04, 2012
Posts: 15
Hi All,

Please help !!!

I am building a TicTacToe game web-services application using jsp and servlet where I need to extract the table's cell onclick event each time for each user and pass is to servlet.

The code so far I have built is :

<style type="text/css">
text-align: center;
text-align: center;

<form action="TicTacToeGame" method="post">

<table id="board" border=1 align=left cellpadding="2" cellspacing="3" width="250" height="250" >
<td> <input type="button" name="11" /> </td>
<td> <input type="button" name="12" /> </td>
<td> <input type="button" name="13" /> </td>
<td> <input type="button" name="21" /> </td>
<td> <input type="button" name="22" /> </td>
<td> <input type="button" name="23" /> </td>
<td> <input type="button" name="31" /> </td>
<td> <input type="button" name="32" /> </td>
<td> <input type="button" name="33" /> </td>
<input type="submit" name="submit" value="MyMove">


Matthew Brown

Joined: Apr 06, 2010
Posts: 4343

Please don't post the same message to multiple forums. Thanks!

Duplicate of
It is sorta covered in the JavaRanch Style Guide.
subject: Fetching one table cell click and passing it to servlet
Similar Threads
how show values in jsp from getting database
Getting error
How to getParameter value
How can i get selected radio button value using jsp
Doubts in jsp