This week's book giveaway is in the General Computing forum. We're giving away four copies of Arduino in Action and have Martin Evans, Joshua Noble, and Jordan Hochenbaum on-line! See this thread for details.
I am creating a jSP page.THe basic idea is 1.First screen asks for the input say- report id.User enters the value. This is the textbox of the first screen. <input name="ReportID" id="ReportID" type="TEXT" class="textfieldfont" size="30" maxlength="25" onChange="allowSubmit()">
2.SEcond screen displays the report-Id and emp-Key in two textboxes ,fetching data from database based on report_id provided.
IN the second screen the data is loaded to the textbox as follows String sql = "SELECT * FROM CONCUR_ADMIN.CT_REPORT WHERE REPORT_ID LIKE '" + request.getParameter("ReportID") + "'", qry, cName = "";
i can EDIT the emp-key textbox value in this page.
3.on clicking the submit button another jsp page is called which updates the values and reloads the second screen
4.THe problem is:When the 2nd screen is uploaded with updaqted values,the texboxes are blank.IT is not populated with new values(no values at all in textboxes). But,in the database the value is updated.
5.i think I am not storing the report id in a variable,so the problem occured,not sure.
6.please tell me with eg how should i correct this.
Originally posted by Sruthi Surendran: I am creating a jSP page.THe basic idea is 1.First screen asks for the input say- report id.User enters the value. This is the textbox of the first screen. <input name="ReportID" id="ReportID" type="TEXT" class="textfieldfont" size="30" maxlength="25" onChange="allowSubmit()">
2.SEcond screen displays the report-Id and emp-Key in two textboxes ,fetching data from database based on report_id provided.
IN the second screen the data is loaded to the textbox as follows String sql = "SELECT * FROM CONCUR_ADMIN.CT_REPORT WHERE REPORT_ID LIKE '" + request.getParameter("ReportID") + "'", qry, cName = "";
i can EDIT the emp-key textbox value in this page.
3.on clicking the submit button another jsp page is called which updates the values and reloads the second screen
4.THe problem is:When the 2nd screen is uploaded with updaqted values,the texboxes are blank.IT is not populated with new values(no values at all in textboxes). But,in the database the value is updated.
5.i think I am not storing the report id in a variable,so the problem occured,not sure.
6.please tell me with eg how should i correct this.
7.pLease help
Hi, What i understood from your question is that after pressing the submit button you are not able to see the details in the next page if i am right with your question if this is your problem it is very simple what you have to do just retrive the details in the next jsp page by like <% String username=request.getParameter("username");%> here the username is the property name of that jsp. here i have given as username but in your case it is report id.
Hi, My understanding from your explanation is From jsp2 on click of submit button you re calling jsp3. There you are updating the record and then redirecting to jsp2 page. If i am right, then as you said that the Report_ID is not there in the request scope. So either put the Report_ID in session or pass the Report_ID to the jsp3 as well by hidden text box from jsp2 to jsp3 with the same name of the Report_Id textbox which you have given in the in the jsp1.
I hope i am clear to you. [ November 30, 2007: Message edited by: kesava narayana ]
I got your question, you want to access the report.Id in 3rd page means you should save the report.Id value in requset(or session, application,page according to your use)scopes.