replace /Servlets/InsContactenos with /Servlet/InsContactenos
----- Original Message -----
From: Mauricio Villa <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, February 12, 2001 2:15 AM
Subject: FW: Simple Question
> Ok, Here are the page and the servlet, the question is why the page can
not
> find the servlet?
>
> Thanks for any help, Mauricio.
>
>
>
>
>
> The Page:
>
>
> <table>
> Aca se Ingresan los Datos Nuevos
> <Form Method="Post" ACTION="/Servlets/InsContactenos">
> <Input Type="Text" Id="Fecha_Recibo" Name="Fecha_Recibo">
> <Input Type="Text" Id="Email_Origen" Name="Email_Origen">
> <Input Type="Text" Id="Destinatario" Name="Destinatario">
> <Input Type="Text" Id="Asunto" Name="Asunto">
> <Input Type="Text" Id="Cc" Name="Cc">
> <Input Type="Text" Id="Texto" Name="Texto">
> <Input Type="Submit">
> </Form>
> </table>
>
>
> The Servlet:
>
>
>
> import java.io.*;
> import javax.servlet.*;
> import javax.servlet.http.*;
> import java.sql.*;
>
> public class InsContactenos extends HttpServlet{
>
>
> protected String dbURL = "jdbc:odbc:orclx07";
> protected String dbuserID = "xxx";
> protected String dbpasswd = "xxx";
> protected Connection dbConnection;
> protected PreparedStatement stmt;
>
> public void doPost(HttpServletRequest req, HttpServletResponse res) throws
> ServletException, IOException
> {
>
> try{
> String Fecha_Recibo = req.getParameter("Fecha_Recibo");
> String Email_Origen = req.getParameter("Email_Origen");
> String Destinatario = req.getParameter("Destinatario");
> String Asunto = req.getParameter("Asunto");
> String Cc = req.getParameter("Cc");
> String Texto = req.getParameter("Texto");
>
> Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
> dbConnection =
> DriverManager.getConnection("jdbc:oracle:oci:solutech/solutech@orclx07");
>
> Statement stmt = dbConnection.createStatement();
>
> String sql= "INSERT INTO bdct_conepros (FECHRECI, EMAILORIG,
> EMAILDEST, ASUNCONE, COPICONE, DATAMENS, FECHRESP, DATARESP) VALUES ('" +
> Fecha_Recibo + "', '" + Email_Origen +"', '" + Destinatario + "', '" +
> Asunto + "', '" + Cc + "','" + Texto + "', ' ', ' ', ' '";
>
> ResultSet rs = stmt.executeQuery(sql);
> stmt.close();
> dbConnection.close();
> }
> catch (Exception e)
> {
> cleanUp();
> e.printStackTrace();
> }
>
>
> }
>
>
> public void cleanUp()
> {
> try {
> System.out.println("Closing database connection");
> dbConnection.close();
> }
> catch (SQLException e)
> {
> e.printStackTrace();
> }
> }
>
>
> }
>
>
___________________________________________________________________________
> To unsubscribe, send email to [EMAIL PROTECTED] and include in the
body
> of the message "signoff SERVLET-INTEREST".
>
> Archives: http://archives.java.sun.com/archives/servlet-interest.html
> Resources: http://java.sun.com/products/servlet/external-resources.html
> LISTSERV Help: http://www.lsoft.com/manuals/user/user.html
___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".
Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html