Author: jfrederic.clere(a)jboss.com
Date: 2008-01-17 10:38:46 -0500 (Thu, 17 Jan 2008)
New Revision: 396
Modified:
trunk/java/org/jboss/web/php/ScriptEnvironment.java
Log:
Fix JBWEB-97. So the phpservlet can be included (for Portal).
Modified: trunk/java/org/jboss/web/php/ScriptEnvironment.java
===================================================================
--- trunk/java/org/jboss/web/php/ScriptEnvironment.java 2008-01-17 15:37:06 UTC (rev 395)
+++ trunk/java/org/jboss/web/php/ScriptEnvironment.java 2008-01-17 15:38:46 UTC (rev 396)
@@ -564,9 +564,19 @@
this.context = context;
this.webAppRootDir = context.getRealPath("/");
this.tempDir = (File)context.getAttribute(Globals.WORK_DIR_ATTR);
- this.contextPath = req.getContextPath();
- this.servletPath = req.getServletPath();
+
+ this.contextPath = req.getParameter("context");
+ if (this.contextPath == null) {
+ this.contextPath = req.getContextPath();
+ }
+
+ this.servletPath = req.getParameter("servlet");
+ if (this.servletPath == null) {
+ this.servletPath = req.getServletPath();
+ }
+
this.pathInfo = req.getPathInfo();
+
// If getPathInfo() returns null, must be using extension mapping
// In this case, pathInfo should be same as servletPath
if (this.pathInfo == null) {
Show replies by date