out.println("<b>"+"username: "+"</b>"+"<input type=text name=t1 value="+ x
+">");

-----Original Message-----
From: s saravanan [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, November 28, 2000 8:42 AM
To: [EMAIL PROTECTED]
Subject: can u help me?


Hi everybody,

      I don't know how to display the values in textfield in the servlet
program. I want the 'x' value(see the program) to be printed in the
textfield 't1'.

     Can u help on this immediately!!!


My part of code is:
*******************


    String u1=request.getParameter("un");
    String p1=request.getParameter("pw");
    PrintWriter out=response.getWriter();
    response.setContentType("text/html");
    try
   {
    Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
    Connection con=DriverManager.getConnection("jdbc:odbc:test1", "sa", "");

    Statement stmt=con.createStatement();
    String query="select * from userdetails where username='"+u1+"'"+"AND
password='"+p1+"'";
    ResultSet rs = stmt.executeQuery(query);

    if(rs.next())
    {


     out.println("<html>"+"<body bgcolor=#CCCCFF>");
     String x=rs.getString(1);
     //out.println(x);
     out.println("<br>");
     out.println("<b>"+"username: "+"</b>"+"<input type=text name=t1 >");
     out.println("</body>"+"</html>");

    }
    else
    {
      response.sendRedirect("/comfortsbiz/updaterr.html");
    }





Bye
sar.

____________________________________________________________________________
_________
Get more from the Web.  FREE MSN Explorer download : http://explorer.msn.com

___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".

Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".

Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

Reply via email to