<p>hi please help me to solve this. i have searchproj.jsp and updateproj.jsp. In searchproj.jsp values r retrieved from db as follows </p> <pre class="prettyprint"><%@ page import="vo.SearchProjVO"%> <%@ page language="java"%> <%@ page import ="java.sql.*"%> <HTML> <head> <meta http-equiv='Content-Type' content='text/html; charset=utf-8' /> <link type='text/css' rel='stylesheet' href='/css/crec.css' /> <script src="js/AdminHeader.js"></script> <jsp:include page="/jsp/admin/Adminmenu.jsp" > </jsp:include> <% String contextPath = request.getContextPath(); %> <script language="javascript"> function validate() { if(document.frm1.projid.value != "") { document.frm1.action="<%=contextPath%>/SearchProj"; document.frm1.submit(); } if(document.frm1.projname.value != "") { document.frm1.action="<%=contextPath%>/SearchProj"; document.frm1.submit(); } if(document.frm1.cost.value != "") { document.frm1.action="<%=contextPath%>/SearchProj"; document.frm1.submit(); } if(document.frm1.manager.value != "") { document.frm1.action="<%=contextPath%>/SearchProj"; document.frm1.submit(); } if(document.frm1.projid.value=="" && document.frm1.projname.value=="" && document.frm1.cost.value=="" && document.frm1.manager.value=="") { alert("Please enter any one field."); } } </script> <script language="javascript"> function gotoSearchProjAction() { validate(); } </script> </head> <body> <form name="frm1" method="post"> <table width="100%" id='table1' border="0" cellspacing="0" cellpadding="0"> <tr><td valign="bottom"> <span class="title">SEARCH PROJECT</span></td></tr> <tr><td height="3" bgcolor="#EEEEEE"><img src="/images/hr-image.gif" width="6" height="4" /> </td> </tr> </table> <br> <div align="right"> <br> <table width="100%" id='table1' border="0" cellspacing="2" cellpadding="2"> <tr><td width="40%" class="txt-label"> <SPAN CLASS="txt-label">Project ID : </SPAN> </td> <td width="60%" class="txt-lable"> <input type="text" name="projid"> </td></tr> <tr><td width="40%" class="txt-label"> <SPAN CLASS="txt-label">Project Name :</SPAN> </td> <td width="60%" class="txt-lable"> <input type="text" name="projname"> </td> </tr> <tr><td width="40%" class="txt-label"> <SPAN CLASS="txt-label">Cost Center : </SPAN> </td> <td width="60%" class="txt-lable"> <input type="text" name="cost"> </td> </tr> <tr><td width="40" class="txt-label"> <SPAN CLASS="txt-label">Manager : </SPAN> </td> <td width="60%" class="txt-lable"> <Select name="manager"> <option value="" selected>Select</option> <option value="Ashok">Ashok</option><option value="Sathish Kumar" >Sathish Kumar</option><option value="Jaya Kumar">Jaya Kumar</option><option value="Sean">Sean</option><option value="Somashekar">Somashekar</option> </select> </td> </tr> </table> <table width="100%" border="0" align="center"> <tr><td> <input type="button" name="Search" value=" Search " class="button" onMouseOver=(this.className='buttonover') onMouseOut=(this.className='button') onClick="gotoSearchProjAction()"> </td></tr> </table> <table width="100%" id='table1' border="0" cellspacing="2" cellpadding="2"> <tr class="tab-highlighted-2"> <td class="tab-highlighted-2" width="10%"> <div align="left">Project ID </div> </td> <td class="tab-highlighted-2" width="10%"> <div align="left">Project Name </div> </td> <td class="tab-highlighted-2" width="20%"> <div align="left">Cost Center </div> </td> <td class="tab-highlighted-2" width="20%"> <div align="left">Manager</div> </td> </tr> <% int count=0; String color = "#F9EBB3"; if(request.getAttribute("searchList")!=null) { ArrayList al = (ArrayList)request.getAttribute("searchList"); Iterator itr = al.iterator(); while(itr.hasNext()) { count++; SearchProjVO searchList1 = (SearchProjVO)itr.next(); %> <tr class="bg-row1"> <td class="td-highlighted-2"> <div align="left" id="id1"><a href="<%=contextPath%>/jsp/admin/UpdateProject.jsp?id="+<%=searchList1.getProjid()%>><%=searchList1.getProjid()%></a></div> </td> <td class="td-highlighted-2"> <div align="left"><%=searchList1.getProjname()%></div> </td> <td class="td-highlighted-2"> <div align="left"><%=searchList1.getManager()%></div> </td> <td class="td-highlighted-2"> <div align="left"><%=searchList1.getCost()%></div> </td> </tr> <% } } %> <% if(count==0){ %> <tr> <td colspan=8 align="center" style="background-color:eeffee"><b>No Record</b> </td> </tr> <% } %> </table> <script src=" /js/SAFooter.js"></script> </BODY> </HTML> </code></pre> <p>in updateproject.jsp i have to get the values in their corresponding text box from searchproject.jsp </p> <pre class="prettyprint"><table width="100%" id='table1' border="0" cellspacing="2" cellpadding="2"> <tr><td width="40%" class="txt-label"> <SPAN CLASS="txt-label">Project ID</SPAN> <font color='red'> *</font>: </td> <td width="60%" class="txt-lable"> <input type="text" name="useid" value="<%=request.getParameterValues("id")%>" onchange="if (isNotEmpty(this))" > </td></tr> <tr><td width="40%" class="txt-label"> <SPAN CLASS="txt-label">Project Name</SPAN> <font color='red'> *</font>: </td> <td width="60%" class="txt-lable"> <input type="text" name="projname" onchange="if (isNotEmpty(this)) {isStr(this)}"> </td></tr> <tr><td width="40%" class="txt-label"> <SPAN CLASS="txt-label">Cost Centre</SPAN><font color='red'> *</font>: </td> <td width="60%" class="txt-lable"> </code></pre> <p> <input type="text" name="cost" onchange="if (isNotEmpty(this)) {isNumber(this)}"> </td></tr> <br /> <tr><td width="40%" class="txt-label"> <br /> <SPAN CLASS="txt-label">Manager</SPAN><font color='red'> *</font>: </td> <td width="60%" class="txt-lable"> <br /> <Select name="manager"><option value="" selected>Select</option> <option value="Ashok">Ashok</option><option value="Sathish Kumar" >Sathish Kumar</option><option value="Jaya Kumar">Jaya Kumar</option><option value="Sean">Sean</option><option value="Somashekar">Somashekar</option></select> </td></tr> <br /> </table> </p> <p>i am getting [Ljava.lang.String;@e793e4 in the text box. please guide me ......</p>
Ads