Hi!
the probable reason why you are facing this problem is that when you point
your browser to the URL a, Your Browser sends a GET request to the server
which is delegated to doGet().

But since u dont seem to have any overridden doGet(), u get this error.
though a 400 would have been more helpful
u don't need to rewrite ur servlet, just do the following

doGet(HttpServletRequest req,HttpServletResponse resp){
doPost(req, resp);
}

rgds.
Rohitashva Mathur

-----Original Message-----
From: sidaty [mailto:[EMAIL PROTECTED]]
Sent: Thursday, September 16, 1999 3:57 PM
To: [EMAIL PROTECTED]
Subject: Unable to run a Servlet that overrides the doPost method


Hi all ,
I have a JDK1.1.7B for linux-2.2-5
Servlet Server is JSDK2.1

I wrote several servlet that attempt to use doPost method bu each time i get
HTTP 405 RESOUCE NOT AUTHORIZED
Internet Explorer

Please What dose it mean and How can ovoid this problem.

look At the following Simple example :

import java.io.*;
import java.servlet.*;
import javax.servlet.*;
import javax.servlet.http.*;

public class servlet08 extends HttpServlet {

   public void doPost(HttpServletRequest request,HttpServletResponse
response)
               throws IOException , ServletException
       {
         PrintWriter out;
         String title = "Simple Servlet Output";

     /* set content type and other response header fields first */

        response.setContentType("text/html");

     /* write the data of the response */

        out = response.getWriter() ;
        out.println("<HTML><HEAD><TITLE>");
        out.println(title);
        out.println("</TITLE></HEAD><BODY>");
        out.println("<H1>" + title + "</H1>");
        out.println("<P>This is output from servlet08 Servlet.");
        out.println("</BODY></HTML>");
        out.close();
      }
  }


Each time i access it through the IE5  i get the following page
http://localhost:8081/servlet/servlet08

 Impossible d'afficher la page
La page que vous recherchez ne peut pas �tre affich�e car l'adresse est
incorrecte.

----------------------------------------------------------------------------
----

Essayez de la mani�re suivante :

Si vous avez tap� l'adresse de cette page dans la barre d'adresses, v�rifiez
qu'elle est correcte.

Ouvrez la page de d�marrage localhost:8081 et recherchez des liens vers les
informations voulues.
Cliquez sur  Rechercher pour trouver des informations sur Internet.



HTTP 405 - Ressource non autoris�e
Internet Explorer

___________________________________________________________________________
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

Reply via email to