Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Going from one JSP page to another

Going from one JSP page to another

Going from one JSP page to another

Hi all...the following bit of code has been causing me immense grief and I would be very grateful for any assistance I can get with this. Im basically trying to go back to a page called rfqTestsender after the code below remove an unwanted record from the db. I also have to pass all the parameters so I cant use a response.sendRedirect. After executing the code, I thought that because it went into the html form, it would read that on the load event, it should go to the javascript function "submitter" which should send the output back to the rfqTestsender page. All I get when I come to this page is a blan screen, even though it does remove the unwanted item from the db. If anyone can help I would be most grateful!

I created this message twice so I could recieve notification at work and home
*****************CODE BEGINS****************************

<%@ page import="java.sql.*,
<script language="javascript">
function submitter(daform){
String avRFQ_NUMBER = request.getParameter("RFQ_NUMBER");
String remove = request.getParameter("REMOVE");
String avRFQ_LINE = request.getParameter("RFQ_LINE");


String avTEAM = request.getParameter("TEAM");


String avSTARTDATE = request.getParameter("STARTDATE");
String avCODE = request.getParameter("PLANT_CODE");
String avREQUESTOR = request.getParameter("REQUESTOR");
String avAUTHORIZED = request.getParameter("AUTHBUYER");


String avFAX_NUMBER = request.getParameter("FAX");
String avPHONE = request.getParameter("PHONE");
String avADDRESS = request.getParameter("ADDRESS");
String avQTY = request.getParameter("QTY");
String avCUST_RFQ = request.getParameter("CUST_RFQ");

String avEMAIL = request.getParameter("");
String avNAME = request.getParameter("PLANT_NAME");
String avGEDESC = request.getParameter("GEDESC");
String avCUSTDESC = request.getParameter("CUSTDESC");
String avPURCHASEOPTION = request.getParameter("PRICETYPE");
String avLEADTIME = request.getParameter("LEADTIME");

String avPRIORITY = request.getParameter("PRIORITY");
String avREQUESTDATE = request.getParameter("REQDATE");
String avSAFETYCLASS = request.getParameter("SAFETY");
String avOPTION = request.getParameter("OPTION");

Connection conn = null;
Statement stmt3; //= null;
Statement stmt4;
int rsRemove;
int rsInsert;

catch(Exception e)
    System.out.println("problem with the JDBC driver: " + e);

    conn = DriverManager.getConnection("jdbc:weblogic:oracle:engdev", "GE156MAC", "comet");
    String SQLremove = "delete from eng.comtcustrfq where RFQ_NUMBER=" + avRFQ_NUMBER +
    " AND RFQ_LINE=" + remove;
    stmt3 = conn.createStatement();
    rsRemove = stmt3.executeUpdate(SQLremove);

catch(SQLException e)
    System.out.println("<hr>An error occurred: " + e);

    catch(SQLException e)
        System.out.println("<hr>An error occurred: " + e);
}      // end finally


<form name="delete" method="post" action="rfqSendTester.jsp" onLoad="javascript:submitter(document.delete)">
<input type="hidden" name="RFQ_NUMBER" value="<%= avRFQ_NUMBER %>">
<input type="hidden" name="RFQ_LINE" value="<%= avRFQ_LINE %>">
<input type="hidden" name="TEAM" value="<%= avTEAM %>">
<input type="hidden" name="PLANT_NAME" value="<%= avNAME %>">
<input type="hidden" name="PLANT_CODE" value="<%= avCODE %>">
<input type="hidden" name="REQUESTOR" value="<%= avREQUESTOR %>">
<input type="hidden" name="AUTHBUYER" value="<%= avAUTHORIZED %>">
<input type="hidden" name="STARTDATE" value="<%= avSTARTDATE%>">
<input type="hidden" name="FAX" value="<%= avFAX_NUMBER%>">
<input type="hidden" name="PHONE" value="<%= avPHONE%>">
<input type="hidden" name="AUTHBUYER" value="<%= avAUTHORIZED %>">
<input type="hidden" name="ADDRESS" value="<%= avADDRESS%>">
<input type="hidden" name="QTY" value="<%= avQTY%>">
<input type="hidden" name="CUST_RFQ" value="<%= avCUST_RFQ%>">
<input type="hidden" name="EMAIL" value="<%= avEMAIL%>">
<input type="hidden" name="AUTHBUYER" value="<%= avAUTHORIZED %>">
<input type="hidden" name="GEDESC" value="<%= avGEDESC%>">
<input type="hidden" name="CUSTDESC" value="<%= avCUSTDESC%>">
<input type="hidden" name="PRICETYPE" value="<%= avPURCHASEOPTION%>">
<input type="hidden" name="LEADTIME" value="<%= avLEADTIME%>">
<input type="hidden" name="PRIORITY" value="<%= avPRIORITY%>">
<input type="hidden" name="REQDATE" value="<%= avREQUESTDATE%>">
<input type="hidden" name="SAFETY" value="<%= avSAFETYCLASS%>">
<input type="hidden" name="OPTION" value="<%= avOPTION%>">

System.out.println("Whats up?");

********************CODE ENDS******************************

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close