Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

how to manage values of disabled cells in a row to the actionServlet in a loop?

 
Rd Dari
Ranch Hand
Posts: 212
Java Netbeans IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 212
Java Netbeans IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Sheriff
Posts: 3752
62
Chrome Netbeans IDE Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 308
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.


 
Rd Dari
Ranch Hand
Posts: 212
Java Netbeans IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 212
Java Netbeans IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 212
Java Netbeans IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
any ways I have done it using JavaScript


 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic