diff options
| author | Sam Ruby <rubys@php.net> | 2000-01-30 20:48:33 +0000 |
|---|---|---|
| committer | Sam Ruby <rubys@php.net> | 2000-01-30 20:48:33 +0000 |
| commit | 54259250e5016d53314fc6ed5c3eca95af7160e6 (patch) | |
| tree | 04511ca63ed22d0a6e076a7d7dd960d8b2904e83 /sapi/servlet/servlet.java | |
| parent | 430571d62c90e2f81dc4909b43e300ff1e2edc13 (diff) | |
| download | php-git-54259250e5016d53314fc6ed5c3eca95af7160e6.tar.gz | |
PHP can install and run as a servlet again on Unix.
Still todo: allow access to ext/java functionality from within servlet.
Diffstat (limited to 'sapi/servlet/servlet.java')
| -rw-r--r-- | sapi/servlet/servlet.java | 18 |
1 files changed, 5 insertions, 13 deletions
diff --git a/sapi/servlet/servlet.java b/sapi/servlet/servlet.java index 648a425cf0..71071072e4 100644 --- a/sapi/servlet/servlet.java +++ b/sapi/servlet/servlet.java @@ -106,8 +106,12 @@ public class servlet extends HttpServlet { { this.request=request; this.response=response; + + String servletPath=request.getServletPath(); + String contextPath=getServletContext().getRealPath(servletPath); + send(request.getMethod(), request.getQueryString(), - request.getPathInfo(), getPathTranslated(), + request.getPathInfo(), contextPath, request.getContentType(), request.getContentLength(), request.getRemoteUser()); @@ -123,16 +127,4 @@ public class servlet extends HttpServlet { super.destroy(); } - /******************************************************************/ - /* utility function */ - /******************************************************************/ - - String getPathTranslated() { - /* I have no idea why this has to be this hard... */ - String servletPath=request.getServletPath(); - String contextPath=getServletContext().getRealPath(servletPath); - servletPath=servletPath.replace('/',slash); - contextPath=contextPath.substring(0,contextPath.lastIndexOf(slash)); - return contextPath+servletPath; - } } |
