[PHP4BETA] cvs: /php4/sapi/servlet Makefile.in servlet.java From: Sam Ruby (rubys <email protected>)
Date: 01/30/00

rubys Sun Jan 30 21:49:03 2000 EDT

  Modified files:
    /php4/sapi/servlet Makefile.in servlet.java
  Log:
  PHP can install and run as a servlet again on Unix.
  Still todo: allow access to ext/java functionality from within servlet.
  
  
Index: php4/sapi/servlet/Makefile.in
diff -u php4/sapi/servlet/Makefile.in:1.6 php4/sapi/servlet/Makefile.in:1.7
--- php4/sapi/servlet/Makefile.in:1.6 Sat Jan 29 18:53:55 2000
+++ php4/sapi/servlet/Makefile.in Sun Jan 30 21:48:32 2000
@@ -19,8 +19,8 @@
 phpsrvlt.jar : servlet.java ../../ext/java/reflect.java
          <email protected> -e net || mkdir net
          <email protected> -e net/php || mkdir net/php
-  <email protected> library=sapi>net/php/reflect.properties
-  <email protected> library=sapi>net/php/servlet.properties
+  <email protected> library=php4>net/php/reflect.properties
+  <email protected> library=php4>net/php/servlet.properties
          <email protected> servlet.java net/php
          <email protected> ../../ext/java/reflect.java net/php
         javac net/php/reflect.java
Index: php4/sapi/servlet/servlet.java
diff -u php4/sapi/servlet/servlet.java:1.2 php4/sapi/servlet/servlet.java:1.3
--- php4/sapi/servlet/servlet.java:1.2 Sat Jan 1 02:32:04 2000
+++ php4/sapi/servlet/servlet.java Sun Jan 30 21:48:32 2000
@@ -106,8 +106,12 @@
     {
        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 @@
       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;
- }
 }

-- 
PHP 4.0 Beta Mailing List <http://www.php.net/version4/>
To unsubscribe, e-mail: php4beta-unsubscribe <email protected>
For additional commands, e-mail: php4beta-help <email protected>
To contact the list administrators, e-mail: php4beta-admin <email protected>