Win a copy of Succeeding with AI this week in the Artificial Intelligence and Machine Learning forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Liutauras Vilda
  • Junilu Lacar
Sheriffs:
  • Tim Cooke
  • Jeanne Boyarsky
  • Knute Snortum
Saloon Keepers:
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Carey Brown
  • Piet Souris
Bartenders:
  • salvin francis
  • fred rosenberger
  • Frits Walraven

Local php-java-bridge problem

 
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
 
Ranch Hand
Posts: 820
IntelliJ IDE VI Editor Tomcat Server
  • 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?)
 
Ranch Hand
Posts: 71
PHP Linux 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.
 
If you settle for what they are giving you, you deserve what you get. Fight for this tiny ad!
Thread Boost feature
https://coderanch.com/t/674455/Thread-Boost-feature
    Bookmark Topic Watch Topic
  • New Topic