cvs: php4 /sapi/servlet servlet.java
| From: | Sam Ruby | Date: | Sun, 30 Jul 2000 04:50:30 +0000 |
| Subject: | cvs: php4 /sapi/servlet servlet.java | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-985@lists.php.net to get a copy of this message | ||
rubys Sat Jul 29 21:50:30 2000 EDT
Modified files:
/php4/sapi/servlet servlet.java
Log:
Refactor in support of subclassing
Index: php4/sapi/servlet/servlet.java
diff -u php4/sapi/servlet/servlet.java:1.13 php4/sapi/servlet/servlet.java:1.14
--- php4/sapi/servlet/servlet.java:1.13 Sun Jul 23 22:41:01 2000
+++ php4/sapi/servlet/servlet.java Sat Jul 29 21:50:30 2000
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: servlet.java,v 1.13 2000/07/24 05:41:01 david Exp $ */
+/* $Id: servlet.java,v 1.14 2000/07/30 04:50:30 rubys Exp $ */
package net.php;
@@ -102,7 +102,7 @@
e.printStackTrace(System.err);
}
} else {
- response.getWriter().println(data);
+ write(data);
}
}
} catch (IOException e) {
@@ -152,15 +152,13 @@
}
public void service(HttpServletRequest request,
- HttpServletResponse response)
+ HttpServletResponse response,
+ String contextPath)
throws ServletException
{
this.request=request;
this.response=response;
- String servletPath=request.getServletPath();
- String contextPath=getServletContext().getRealPath(servletPath);
-
send(request.getMethod(), request.getQueryString(),
request.getRequestURI(), contextPath,
request.getContentType(), request.getContentLength(),
@@ -171,6 +169,15 @@
} catch (IOException e) {
throw new ServletException(e.toString());
}
+ }
+
+ public void service(HttpServletRequest request,
+ HttpServletResponse response)
+ throws ServletException
+ {
+ String servletPath=request.getServletPath();
+ String contextPath=getServletContext().getRealPath(servletPath);
+ service(request, response, contextPath);
}
public void destroy() {