cvs: /php4/sapi/servlet Makefile.in servlet.java
| From: | Sam Ruby | Date: | Sun, 30 Jan 2000 20:49:03 +0000 |
| Subject: | cvs: /php4/sapi/servlet Makefile.in servlet.java | ||
| Groups: | php.version4 | ||
| Request: | Send a blank email to php-version4+get-9570@lists.php.net to get a copy of this message | ||
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
@test -e net || mkdir net
@test -e net/php || mkdir net/php
- @echo library=sapi>net/php/reflect.properties
- @echo library=sapi>net/php/servlet.properties
+ @echo library=php4>net/php/reflect.properties
+ @echo library=php4>net/php/servlet.properties
@cp servlet.java net/php
@cp ../../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;
- }
}