×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

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

Jobs

Manuvering from one JSP/HTML page to another

Manuvering from one JSP/HTML page to another

Manuvering from one JSP/HTML page to another

(OP)
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. 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!

Ashraf

*****************CODE BEGINS****************************

<%@ page import="java.sql.*,
                 java.net.URLEncoder,
                 java.net.URLDecoder,
                 java.text.DecimalFormat,
                 java.util.*"%>
                 
 <html>
 <head>                
<script language="javascript">
function submitter(daform){
alert("HELLO!");
daform.submit();
}
</script>
</head>
<body>
<%
String avRFQ_NUMBER = request.getParameter("RFQ_NUMBER");
System.out.println(avRFQ_NUMBER);
String remove = request.getParameter("REMOVE");
String avRFQ_LINE = request.getParameter("RFQ_LINE");

System.out.println(avRFQ_LINE);

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

System.out.println(avTEAM);

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

System.out.println(avSTARTDATE);

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;

try
    {
    Class.forName("weblogic.jdbc.oci.Driver").newInstance();
}
catch(Exception e)
{
    System.out.println("problem with the JDBC driver: " + e);
}

try
{
    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);
    stmt3.close();
    
//response.sendRedirect("rfqsendTester.jsp?Del=true");    

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

 finally
{
    try
    {
        conn.close();
        
    }
    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%>">

</body>
</html>
<%
System.out.println("Whats up?");
//response.sendRedirect("rfqsendTester.jsp?Del=true");
%>

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

RE: Manuvering from one JSP/HTML page to another

You have no visible html within your <body></body> tags.  If you view source you will see all of your hidden inputs.  "What's up" should be printing in your servlet engine/container.  Change it from System.out.println to out.println and move it within the body tags and it will print to the html page.


Wushutwist

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