Skip to content
This repository has been archived by the owner on Jan 17, 2021. It is now read-only.

Commit

Permalink
Release-6-2-1
Browse files Browse the repository at this point in the history
  • Loading branch information
jost_boekemeier committed Sep 25, 2010
1 parent c75156c commit 6714ae0
Show file tree
Hide file tree
Showing 12 changed files with 54 additions and 34 deletions.
8 changes: 5 additions & 3 deletions examples/php+jsp/PhpRenderTaskHTML.php
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
<?php

define ("JAVA_HOSTS", "127.0.0.1:8080");
define ("JAVA_SERVLET", "/JavaBridge/JavaBridge.phpjavabridge");
$pth = "https://" . $_SERVER["HTTP_HOST"] . $_SERVER["REQUEST_URI"];
if (!(get_cfg_var('java.web_inf_dir'))) {
define ("JAVA_HOSTS", "127.0.0.1:8080");
define ("JAVA_SERVLET", "/JavaBridge/JavaBridge.phpjavabridge");
}
$pth = "https://" . $_SERVER["HTTP_HOST"] . $_SERVER["PHP_SELF"];
$path_parts = pathinfo($pth);
$imageURLPrefix = $path_parts['dirname'] ."/sessionChartImages/";
require_once("java/Java.inc");
Expand Down
8 changes: 5 additions & 3 deletions examples/php+jsp/PhpRenderTaskHTMLOnePage.php
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
<?php

define ("JAVA_HOSTS", "127.0.0.1:8080");
define ("JAVA_SERVLET", "/JavaBridge/JavaBridge.phpjavabridge");
$pth = "https://" . $_SERVER["HTTP_HOST"] . $_SERVER["REQUEST_URI"];
if (!(get_cfg_var('java.web_inf_dir'))) {
define ("JAVA_HOSTS", "127.0.0.1:8080");
define ("JAVA_SERVLET", "/JavaBridge/JavaBridge.phpjavabridge");
}
$pth = "https://" . $_SERVER["HTTP_HOST"] . $_SERVER["PHP_SELF"];
$path_parts = pathinfo($pth);
$imageURLPrefix = $path_parts['dirname'] ."/sessionChartImages/";
require_once("java/Java.inc");
Expand Down
8 changes: 5 additions & 3 deletions examples/php+jsp/PhpRunAndRenderHTML.php
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
<?php

define ("JAVA_HOSTS", "127.0.0.1:8080");
define ("JAVA_SERVLET", "/JavaBridge/JavaBridge.phpjavabridge");
$pth = "https://" . $_SERVER["HTTP_HOST"] . $_SERVER["REQUEST_URI"];
if (!(get_cfg_var('java.web_inf_dir'))) {
define ("JAVA_HOSTS", "127.0.0.1:8080");
define ("JAVA_SERVLET", "/JavaBridge/JavaBridge.phpjavabridge");
}
$pth = "https://" . $_SERVER["HTTP_HOST"] . $_SERVER["PHP_SELF"];
$path_parts = pathinfo($pth);
$imageURLPrefix = $path_parts['dirname'] ."/sessionChartImages/";
require_once("java/Java.inc");
Expand Down
8 changes: 5 additions & 3 deletions examples/php+jsp/PhpRunAndRenderHTMLDrillDetail.php
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
<?php

define ("JAVA_HOSTS", "127.0.0.1:8080");
define ("JAVA_SERVLET", "/JavaBridge/JavaBridge.phpjavabridge");
$pth = "https://" . $_SERVER["HTTP_HOST"] . $_SERVER["REQUEST_URI"];
if (!(get_cfg_var('java.web_inf_dir'))) {
define ("JAVA_HOSTS", "127.0.0.1:8080");
define ("JAVA_SERVLET", "/JavaBridge/JavaBridge.phpjavabridge");
}
$pth = "https://" . $_SERVER["HTTP_HOST"] . $_SERVER["PHP_SELF"];
$path_parts = pathinfo($pth);
$imageURLPrefix = $path_parts['dirname'] ."/sessionChartImages/";
require_once("java/Java.inc");
Expand Down
8 changes: 5 additions & 3 deletions examples/php+jsp/PhpRunAndRenderHTMLDrillThrough.php
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
<?php

define ("JAVA_HOSTS", "127.0.0.1:8080");
define ("JAVA_SERVLET", "/JavaBridge/JavaBridge.phpjavabridge");
$pth = "https://" . $_SERVER["HTTP_HOST"] . $_SERVER["REQUEST_URI"];
if (!(get_cfg_var('java.web_inf_dir'))) {
define ("JAVA_HOSTS", "127.0.0.1:8080");
define ("JAVA_SERVLET", "/JavaBridge/JavaBridge.phpjavabridge");
}
$pth = "https://" . $_SERVER["HTTP_HOST"] . $_SERVER["PHP_SELF"];
$path_parts = pathinfo($pth);
$imageURLPrefix = $path_parts['dirname'] ."/sessionChartImages/";
$URLPrefix = $path_parts['dirname'] . "/PhpRunAndRenderHTMLDrillDetail.php";
Expand Down
8 changes: 5 additions & 3 deletions examples/php+jsp/PhpRunAndRenderHTMLEmbed.php
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
<?php

define ("JAVA_HOSTS", "127.0.0.1:8080");
define ("JAVA_SERVLET", "/JavaBridge/JavaBridge.phpjavabridge");
$pth = "https://" . $_SERVER["HTTP_HOST"] . $_SERVER["REQUEST_URI"];
if (!(get_cfg_var('java.web_inf_dir'))) {
define ("JAVA_HOSTS", "127.0.0.1:8080");
define ("JAVA_SERVLET", "/JavaBridge/JavaBridge.phpjavabridge");
}
$pth = "https://" . $_SERVER["HTTP_HOST"] . $_SERVER["PHP_SELF"];
$path_parts = pathinfo($pth);
$imageURLPrefix = $path_parts['dirname'] ."/sessionChartImages/";
require_once("java/Java.inc");
Expand Down
8 changes: 5 additions & 3 deletions examples/php+jsp/PhpRunAndRenderXLSToFile.php
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
<?php
define ("JAVA_HOSTS", "127.0.0.1:8080");
define ("JAVA_SERVLET", "/JavaBridge/JavaBridge.phpjavabridge");
if (!(get_cfg_var('java.web_inf_dir'))) {
define ("JAVA_HOSTS", "127.0.0.1:8080");
define ("JAVA_SERVLET", "/JavaBridge/JavaBridge.phpjavabridge");
}
require_once("java/Java.inc");

$pth = "https://" . $_SERVER["HTTP_HOST"] . $_SERVER["REQUEST_URI"];
$pth = "https://" . $_SERVER["HTTP_HOST"] . $_SERVER["PHP_SELF"];
$path_parts = pathinfo($pth);
$filePrefix = $path_parts['dirname'] ."/myreport.xls";

Expand Down
6 changes: 4 additions & 2 deletions examples/php+jsp/PhpRunTask.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
<?php
define ("JAVA_HOSTS", "127.0.0.1:8080");
define ("JAVA_SERVLET", "/JavaBridge/JavaBridge.phpjavabridge");
if (!(get_cfg_var('java.web_inf_dir'))) {
define ("JAVA_HOSTS", "127.0.0.1:8080");
define ("JAVA_SERVLET", "/JavaBridge/JavaBridge.phpjavabridge");
}

require_once("java/Java.inc");

Expand Down
8 changes: 5 additions & 3 deletions examples/php+jsp/PhpUseBirtLib.php
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
<?php

define ("JAVA_HOSTS", "127.0.0.1:8080");
define ("JAVA_SERVLET", "/JavaBridge/JavaBridge.phpjavabridge");
$pth = "https://" . $_SERVER["HTTP_HOST"] . $_SERVER["REQUEST_URI"];
if (!(get_cfg_var('java.web_inf_dir'))) {
define ("JAVA_HOSTS", "127.0.0.1:8080");
define ("JAVA_SERVLET", "/JavaBridge/JavaBridge.phpjavabridge");
}
$pth = "https://" . $_SERVER["HTTP_HOST"] . $_SERVER["PHP_SELF"];
$path_parts = pathinfo($pth);
$imageURLPrefix = $path_parts['dirname'] ."/sessionChartImages/";
require_once("java/Java.inc");
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*-*- mode: Java; tab-width:8 -*-*/

package php.java.script.servlet;

/*-*- mode: Java; tab-width:8 -*-*/

import java.io.IOException;
import java.io.OutputStream;
import java.io.Reader;
Expand All @@ -27,6 +27,8 @@
import php.java.script.PhpScriptContextDecorator;
import php.java.script.PhpScriptWriter;
import php.java.script.ResultProxy;
import php.java.script.servlet.HttpFastCGIProxy;
import php.java.script.servlet.PhpScriptLogWriter;
import php.java.servlet.ContextLoaderListener;
import php.java.servlet.ServletUtil;

Expand Down Expand Up @@ -67,14 +69,14 @@
* @author jostb
*
*/
public class PhpCompiledHttpScriptContext extends PhpScriptContextDecorator {
public class PhpHttpScriptContext extends PhpScriptContextDecorator {

/**
* Create a new PhpCompiledScriptContext using an existing
* PhpScriptContext
* @param ctx the script context to be decorated
*/
public PhpCompiledHttpScriptContext(ScriptContext ctx, Servlet servlet, ServletContext context, HttpServletRequest request, HttpServletResponse response) {
public PhpHttpScriptContext(ScriptContext ctx, Servlet servlet, ServletContext context, HttpServletRequest request, HttpServletResponse response) {
super((IPhpScriptContext)ctx);
this.request = request;
this.response = response;
Expand Down
4 changes: 2 additions & 2 deletions server/php/java/servlet/ContextLoaderListener.java
Original file line number Diff line number Diff line change
Expand Up @@ -327,7 +327,7 @@ private void createPhpFiles () {
} catch (Exception e) {
e.printStackTrace();
}

/* no longer part of the PHP/Java Bridge
File phpDebuggerFile = new File (javaDir, "PHPDebugger.php");
try {
if (!phpDebuggerFile.exists()) {
Expand All @@ -340,7 +340,7 @@ private void createPhpFiles () {
} catch (Exception e) {
e.printStackTrace();
}

*/
File javaProxyFile = new File (javaDir, "JavaProxy.php");
try {
if (!javaProxyFile.exists()) {
Expand Down
4 changes: 2 additions & 2 deletions server/php/java/servlet/PhpJavaServlet.java
Original file line number Diff line number Diff line change
Expand Up @@ -245,8 +245,8 @@ protected void handlePut (HttpServletRequest req, HttpServletResponse res)

if(Util.logLevel>3) Util.logDebug("doPut:"+req.getRequestURL());
boolean isLocal = LOCAL_ADDR.equals(req.getRemoteAddr());

if(contextServer!=null && contextServer.isAvailable(null) && (isLocal || (!isLocal && promiscuous)))
boolean isHttps = req.isSecure();
if(contextServer!=null && contextServer.isAvailable(null) && (isLocal || (!isLocal && promiscuous)) && !isHttps)
handleLocalConnection(req, res); /* re-direct */
else
handleHttpConnection(req, res);
Expand Down

0 comments on commit 6714ae0

Please sign in to comment.