Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Local php-java-bridge problem

 
James Hodgkiss
Ranch Hand
Posts: 401
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hiya,

I need to add some Java functionality to my php webapp, so am trying to set up php-java-bridge on my PC.

The problem I'm having it that I have my PHP server running on localhost:80, and Tomcat running on localhost:8084. And, presumably due to the different port numbers, this code...

require_once("http://localhost:8084/myPhpApp/java/Java.inc");

...does not succeed.

Does anyone have anytime for setting up php-java-bridge in this situation?

Many thanks,
James
 
Tim McGuire
Ranch Hand
Posts: 820
IntelliJ IDE Tomcat Server VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hard to answer because we don't know what you saw when it "did not succeed" -- it could be any number of things.

I'd like to know how your tomcat is setup and I'd like to know what you see when you point your browser at http://localhost:8084 (is Tomcat even running?)
 
Nick Charles
Ranch Hand
Posts: 71
Linux PHP Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The downloadable bridge WAR file is named JavaBridge.war, so did you rename it to myPhpApp.war? If not, what is in myPhpApp.war? (I assume you deployed a war by that name to Tomcat and that tomcat is running).

What happes in you access that URL from a browser? The browser should display the contents of the Java.inc file.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic