textbox values

Hi I want a small clarification........
can anyone help me out please ?
Iam developing a form . The first 5 fields must be filled automatically as the user logs in. The values are stored in the database.Iam able to retrieve the values successfully on to the screen but not able to place them in to the text box....... I have written it this way

<%@ page language="java" %>
<%@ page import="javax.servlet.*" %>
<%@ page import="javax.servlet.http.*" %>
<%@ page import="java.sql.*" %>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
String id , name , dept, desig,band;
String username=(String) session.getAttribute("theName");
if(username==null) username="";
try {
Connection con=DriverManager.getConnection("jdbc:oracle:thin:@","xius","xius");
out.println("connection established");
String s ="select emp_id , emp_name ,emp_dept_id, emp_desig_id, band_id from employee_master where emp_id=(select user_id from user_master where user_name='"+username+"')";
Statement stmt = con.createStatement();
ResultSet rs=stmt.executeQuery(s);
out.println("data retrieved");
id = rs.getString(1);
out.println(id+" "+name+" "+dept+" "+desig+" "+band);

catch(Exception e)
<form name="form1">
EMP ID <input type="text" name="text1">
EMP name <input type="text" name="text2">
EMP designation <input type="text" name="text3">
February 9,
Sry but this forum is for ActiveWidgets questions, why dont u try to find any java forum?!
google it!
Pc (from Brazil)
February 9,

This topic is archived.

See also:

Back to support forum