Adding localhost shouldn't make a difference since the "/path" notation
stays within the same host anyway. But check your servlet root: /Servlet,
/servlet, /Servlets and /servlets are FOUR different paths! Also, depending
on how you've set up your servlet engine, it might run on a different port
than the web server. By default, the web server is running on port 80 and
Tomcat for example runs on 8080 unless you changed it.

At 11:28 PM 2/11/01 +0100, you wrote:
>i think you need to set the url-path (not the relative path) to your servlet
>in the form-attribute: for example http://localhost/servlet/InsContactenos
>instead of /servlets/InsContactenos
>
>-mw
>
>
>----- Original Message -----
>From: "Mauricio Villa" <[EMAIL PROTECTED]>
>To: <[EMAIL PROTECTED]>
>Sent: Sunday, February 11, 2001 9:45 PM
>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

Klaus Sonnenleiter
The Media Machine, LLC

___________________________________________________________________________
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

Reply via email to