Re: Using PHP language in Java/JSP files.
- From: "Mike Gaab" <mike-g@xxxxxxxxxxx>
- Date: Tue, 29 Nov 2005 17:21:50 -0700
<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 =----
.
- References:
- Using PHP language in Java/JSP files.
- From: cejohnson
- Using PHP language in Java/JSP files.
- Prev by Date: Re: Creating an object during runtime
- Next by Date: Re: Java Mustang - new type verifer
- Previous by thread: Re: Using PHP language in Java/JSP files.
- Next by thread: [ANN] AnthillPro 2.5 Build Management Server Released
- Index(es):
Relevant Pages
|