Re: Using PHP language in Java/JSP files.




<cejohnson@xxxxxxxxx> wrote in message
news:1133292697.026613.187690@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
> OK...I inherited a Java based app that I assume is coded completely in
> Java (isn't that what jsp files are?). I needed to make an addition to
> it, so rather than learning Java (since I'm trying to phase away from
> it) I am wanting to make additions in php (as I know php, this was the
> best thought to me).
>
> Here's my problem. The Java app (at least all the jsp files) are in the
> tomcat directory, so that Java/tomcat interprets them. Unfortunately,
> any php code that is dropped into the tomcat file is ignored by the php
> parser and spit out as html code. As Html doesn't know php from a hole
> in the ground, I get some neato errors.
>
> So...what do I need to change (and where please) so that a) php is
> parsed within the tomcat directory; b) I can make a call to a php
> script outside the tomcat directory or c) copy, rename, and open the
> renamed copy using Java (if this is my only option...)
>
> for PHP in the jsp files I've been trying one of the following (with no
> success)
>
> <script language="php">blah blah blah</script>
> and
> <?php blah blah blah ?>
>
> Thoughts?

Might look at this.

http://php-java-bridge.sourceforge.net/

A quote from the link.

"Since PHP/Java Bridge version 3.0 it is also possible to use java as an
"execution environment" for php scripts, java code can allocate and invoke
php scripts from an external or internal pool. The script instances can be
allocated from an external HTTP (e.g.: Apache/IIS) pool, from a internal php
FastCGI pool or directly using the php CGI interface. Java 6 or an external
javax.script package is required to use this functionality, please see the
javax.script package for details. "

If it works let us know.

Mike



----== Posted via Newsfeeds.Com - Unlimited-Unrestricted-Secure Usenet News==----
http://www.newsfeeds.com The #1 Newsgroup Service in the World! 120,000+ Newsgroups
----= East and West-Coast Server Farms - Total Privacy via Encryption =----
.



Relevant Pages

  • Re: HTML "scrape" causes loss of query string in URL
    ... in PHP with several PHP scripts interacting with one Java servlet, ... which interacted with several Java classes. ... so now I have to translate all of the PHP scripts into ... PHP to JSP, figuring that while not very "Java guru cool" to do so, ...
    (comp.lang.java.help)
  • Using PHP language in Java/JSP files.
    ... Java (isn't that what jsp files are?). ... it) I am wanting to make additions in php (as I know php, ... tomcat directory, ...
    (comp.lang.java.programmer)
  • Re: HTML "scrape" causes loss of query string in URL
    ... >> in PHP with several PHP scripts interacting with one Java servlet, ... >> which interacted with several Java classes. ... > process to go from PHP to JSP. ...
    (comp.lang.java.help)
  • Re: Using PHP language in Java/JSP files.
    ... > Java. ... > it) I am wanting to make additions in php (as I know php, ... The Java app (at least all the jsp files) are in the ...
    (comp.lang.java.programmer)
  • Re: e-commerce portal
    ... haven't had a single site that sees a need for this sort of hardening. ... Java anymore. ... PHP is a technology that has gotten a harsh rap due to large security ... Marketing at its worse, eh? ...
    (comp.databases.pick)