dcsimg
www.webdeveloper.com
Results 1 to 2 of 2

Thread: unable to update and pass the dynamic value to servlet from jsp

  1. #1
    Join Date
    May 2012
    Posts
    9

    unable to update and pass the dynamic value to servlet from jsp

    here is my jsp page :

    <center>
    <h4> Device Monitoring & Management </h4>
    <table name="table" id="table" cellpadding="4" cellspacing="2" border="1" bgcolor="" >
    <tr name="tr" id="tr">
    <th><input type="checkbox" name="allCheck" onclick="selectallMe()"></th>
    <th>Emp ID</th>
    <th>Device</th>
    <th>Feature Status</th>
    <th>Policy</th>
    <th>Password Management</th>
    </tr>
    <tr>
    <% while(rs.next()){ %>
    <td><input type="checkbox" name="chkName" onclick="selectall()"></td>
    <td><input type="text" name="empId" value="<%= rs.getString(1)%> " disabled="disabled" maxlength="10"></td>
    <td><input type="text" name="device" value="<%= rs.getString(2)%>" disabled="disabled" maxlength="10"></td>
    <td><input type="text" name="features" value="<%= rs.getString(3)%>" disabled="disabled" maxlength="60"></td>
    <td><input type="text" name="policyName" value="<%= rs.getString(4)%>" disabled="disabled" maxlength="10"></td>
    <td><input type="text" name="password" id="password" disabled="disabled" value="<%= rs.getString(5) %>" ><input type="button" name="Password" id="Password" value="Reset Password" onclick="fillFields(this);"></td>
    </tr>
    <% }
    %>
    </table>
    <td><input type="submit" value="Save" colspan="2" onclick= "save(this)"></td>
    <td><input type="submit" value="Delete" colspan="2" onclick="deleted(this)"></td>
    </center>
    </form>
    <%
    String empId =request.getParameter("empId");
    session.setAttribute("empId", empId);
    String device =request.getParameter("device");
    session.setAttribute("device", device);

    String features = request.getParameter("features");
    session.setAttribute("features", features);
    String policyName = request.getParameter("policyName");
    session.setAttribute("policyName", policyName);
    String password = request.getParameter("password");
    session.setAttribute("password", password);
    %>
    </body>
    </html>


    Actually this jsp showing a joining table(user_table & policy_management) where I want to update this joined table simultaneously.

    I am facing problem :

    a> when trying to set the value,in the servlet page (e.g. request.getParameter("policyName")-> showing null value) -> give me some idea what I have to do to pass the dynamic value.

    b> Unable update or delete two table simutaneously(though I am not using "on delete cascade")

    Could you tell me, what should I have to do for a> & b> ... ??

  2. #2
    Join Date
    Dec 2002
    Location
    Calgary, Canada
    Posts
    6,136
    Its been a while that I worked with this stuff, but I think your problem is in tht all of your controls are disabled, set them readonly and try again
    Cheers

    Khalid

    Message Posting Guidelines In These Forums, Please read these before posting any question.
    Web site: webapplikations.com
    Web Resources Page:Web Resources

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles