tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From craig...@locus.apache.org
Subject cvs commit: jakarta-tomcat/src/share/org/apache/tomcat/servlets DefaultServlet.java
Date Fri, 07 Apr 2000 17:32:22 GMT
craigmcc    00/04/07 10:32:21

  Modified:    src/share/org/apache/tomcat/servlets DefaultServlet.java
  Log:
  Add a doPost() method to the default file-serving servlet, which simply
  delegates to the existing doGet() method.  This makes the following
  scenarios (among others) work correctly:
  - POST to a servlet, which RequestDispatcher.forward()s to a static file
    served by the file serving servlet.
  - POST to a servlet, which RequestDispatcher.include()s a static
    file served by the file serving servlet.
  - POST to a welcome file (such as index.jsp) served by the
    file serving servlet.
  
  This makes me a little nervous, but I could not find any negative
  consequences to adding this code.  Needless to say, it still passes all
  the tests and Watchdog, but that just means our test suites never tried
  one of the above activities.
  
  Revision  Changes    Path
  1.13      +7 -0      jakarta-tomcat/src/share/org/apache/tomcat/servlets/DefaultServlet.java
  
  Index: DefaultServlet.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat/src/share/org/apache/tomcat/servlets/DefaultServlet.java,v
  retrieving revision 1.12
  retrieving revision 1.13
  diff -u -r1.12 -r1.13
  --- DefaultServlet.java	2000/04/05 23:29:59	1.12
  +++ DefaultServlet.java	2000/04/07 17:32:21	1.13
  @@ -106,6 +106,13 @@
           return "DefaultServlet";
       }
   
  +    public void doPost(HttpServletRequest request,
  +		       HttpServletResponse response)
  +	throws ServletException, IOException
  +    {
  +	doGet(request, response);
  +    }
  +
       public void doGet(HttpServletRequest request,
   		      HttpServletResponse response)
   	throws ServletException, IOException
  
  
  

Mime
View raw message