JavaRanch » Java Forums »
Java »
Servlets
| Author |
how to manage values of disabled cells in a row to the actionServlet in a loop?
|
Rd Dari
Ranch Hand
Joined: Feb 22, 2010
Posts: 194
|
|
Hi All,
I am trying to insert a data in another table which come from different table in a jsp page and want to insert only enabled data of a particular row.
Please guide me.
here is my jsp and servlet.......
SERVLET IS
|
 |
Rd Dari
Ranch Hand
Joined: Feb 22, 2010
Posts: 194
|
|
what is the solution for the above problem can anyone suggest me what should I use in my Servlet and JavaScript to avoid this problem.
Thanks in advanced!
|
 |
Martin Vajsar
Bartender
Joined: Aug 22, 2010
Posts: 2330
|
|
|
I've moved your post to the Servlets forum; it's more likely to get an answer there. Please see CarefullyChooseOneForum (⇐ click).
|
 |
Nicola Garofalo
Ranch Hand
Joined: Apr 10, 2010
Posts: 308
|
|
You want to insert data into a database
Those data come from an html table, is that correct?
Start to move all the sql operations away from your jsp. Move them in the servlet.
A jsp file is used to show data, not to perform database operations.
In the same way move all html code away from your servlet and put it in a jsp. Servlet shouldn't build html anymore.
The steps are:
1) Put the Input mask in a jsp with all javascript and html stuff. When you are done you can post your jsp.
2) Let the Servlet get the parameters, perform database operations and forward control to a jsp. When you are done post the servlet code.
If the input mask parameters are disabled they arrive as null Strings to the servlet, so you can check them before performing the insert query.
Waiting for your jsp and servlet.
|
Bye,
Nicola
|
 |
Rd Dari
Ranch Hand
Joined: Feb 22, 2010
Posts: 194
|
|
As you recommend THIS IS JSP
And This SERVLET
I need a good solution to set NA in that cells values which is disabled in jsp page. How it is possible.
|
 |
Rd Dari
Ranch Hand
Joined: Feb 22, 2010
Posts: 194
|
|
Hi, guys its my Servlet which I missed yesterday with the above post
Please give me a solution to add value(blank or "NA") in disabled cell
Thanks in advanced
|
 |
Rd Dari
Ranch Hand
Joined: Feb 22, 2010
Posts: 194
|
|
any ways I have done it using JavaScript
|
 |
 |
|
|
subject: how to manage values of disabled cells in a row to the actionServlet in a loop?
|
|
|
|
|