[PHP-DEV] PHP urlencode() - JAVA

2002-11-27 Thread Robert Strohmaier
Hi
I nedd to know, what command matches best with urlencode() from PHP.
Is it encodeURL() or encodeRedirectURL() or something else.

thx for your help

mfg Robert



-- 
PHP Development Mailing List http://www.php.net/
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP-DEV] PHP and Java

2002-10-24 Thread Marc Richards
Hi,

I am looking for any info or documentation on using PHP in a servlet
environment.  I read what I could find on php.net, and found a couple things
using google, but not enough to answer my questions.  If someone could tell
me where to look that would be great.  I am very interested in seing PHP
more tightly integrated with J2EE as I think that it would add the
reliabilty and scalability of the J2EE platform to the ease of use of PHP,
and allow a smooth transition for the existing PHP user base, who need to do
things with Java.

These are the type of questions I have right now:

1) Is this a pure Java version of PHP?
2) What functionality is available? (only core functions?  Some extention
libraries)
3) How does it all work? (pass thru mechanism? are pages compiled as
classes?)
4) Does this make it eiasier to access Java servlets or EJBs? Does it
increse performance?
5) Who is responsible for development of this extension?
6) When do you expect a non experimental version will be available

Any help would be appreciated.

Marc



-- 
PHP Development Mailing List http://www.php.net/
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP-DEV] PHP and Java

2002-10-24 Thread Brad LaFountain

--- Marc Richards [EMAIL PROTECTED] wrote:
 Hi,
 
 I am looking for any info or documentation on using PHP in a servlet
 environment.  I read what I could find on php.net, and found a couple things
 using google, but not enough to answer my questions.  If someone could tell
 me where to look that would be great.  I am very interested in seing PHP
 more tightly integrated with J2EE as I think that it would add the
 reliabilty and scalability of the J2EE platform to the ease of use of PHP,
 and allow a smooth transition for the existing PHP user base, who need to do
 things with Java.
 
 These are the type of questions I have right now:
 
 1) Is this a pure Java version of PHP?
 No. And why would there be ;)

 2) What functionality is available? (only core functions?  Some extention
 libraries)
 There are 2 things you can do with ext/java
 1) create instances of java objects thru the php's java class, You should have
access of all the methods available for that object
ex.
$java = new Java(java.util.Hashtable);
$java-put(Key, Value);
echo $java-toString();

 2) php will run as a servlet engine, meaning you can run php scripts inside
Tomcat. This is done all thru native methods.

 3) How does it all work? (pass thru mechanism? are pages compiled as
 classes?)

 Pages are not compiled as classes they still exists as php scripts.

 4) Does this make it eiasier to access Java servlets or EJBs? Does it
 increse performance?

 Well not sure exactly what you mean by accessing java servlets, You can
access a java servlet by simply
file(http://someserver.com/servlet/SomeJava.jsp?param=go;); That would make
the servelet execute but I might not know what you mean by access. I guess if
you wanted to you could use the Java() class to create an instance of a servlet
class and invoke its methods directly.

Accessing a EJB from a php script should be fine, (this is purely theory never
tried it or even fully thought it thru). If you take the steps that you would
to create a refrence of an EJB from java and replicate it using ext/java it
should work.
Here is a quick example from OpenEJB HelloWorld example

http://openejb.sourceforge.net/hello-world.html
?
$p = new Java(java.utils.Properties);

//The JNDI properties you set depend
//on which server you are using.
$p-put(java.naming.factory.initial, org.openejb.client.JNDIContext);
$p-put(java.naming.provide.url, 127.0.0.1:4201);
$p-put(java.naming.security.principal, myuser);
$p-put(java.naming.security.credentials, mypass);


//Now use those properties to create
//a JNDI InitialContext with the server.
$ctx = new Java(javax.naming.InitialContext, $p );

//Lookup the bean using it's deployment id
$obj = $ctx-lookup(/Hello);

//Be good and use RMI remote object narrowing
//as required by the EJB specification.

//** This may not work with ext/java extension ***
$pro = new Java(javax.rmi.PortableRemoteObject);
$helloHome = new Java(HelloHome);
$ejbHome = $pro-narrow( $obj, $helloHome-class);
//** This may not work with ext/java extension ***

//Use the HelloHome to create a HelloObject
$ejbObject = $ejbHome-create();

//The part we've all been wainting for...
$message = $ejbObject-sayHello();

//A drum roll please.
echo $message;
?

 So except for the static access to class from helloHome It should work.
Maybe if I get borred some time i'll try it.

 5) Who is responsible for development of this extension?

 Sam Ruby was the orig developer. I've played with it. I don't think anyone has
done any new development in awhile.

 6) When do you expect a non experimental version will be available

 When more intrest becomes of it and someone wants to claim any new
development.


 - Brad


__
Do you Yahoo!?
Y! Web Hosting - Let the expert host your web site
http://webhosting.yahoo.com/

-- 
PHP Development Mailing List http://www.php.net/
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP-DEV] PHP and Java

2002-10-24 Thread Dan Kalowsky

On Thursday, October 24, 2002, at 09:46 PM, Marc Richards wrote:

5) Who is responsible for development of this extension?


Sam Ruby wrote it originally, but alas he seems to have disappeared 
from maintaining it.  A few people have done matiaince on it, you can 
see the bonzai tree, or cvs logs for this.

---
Dan KalowskyI've learned to fake it,
http://www.deadmime.org/~dankand just smile along.
[EMAIL PROTECTED]- Candy,
[EMAIL PROTECTED]  Iggy Pop


--
PHP Development Mailing List http://www.php.net/
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-DEV] PHP and JAVA

2001-12-02 Thread Steve Haemelinck

Hi all

Does anyone got any experience with JAVA in PHP?
I tried to rebuild php with java support. Everything worked well but when I
try to initiate Java in PHP, I get cannot instantiate Virtual machine.
I use kaffe and I believe I have configured PHP correctly.

See http://www.haemelinck.be:8080/phpinfo.phtml

Thx


-- 
PHP Development Mailing List http://www.php.net/
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DEV] PHP vs. JAVA

2001-02-01 Thread Hzta Internet

I'd like to have informations about PHP vs. JAVA.

Can someone help me ?

Cludio.

--
_

Cludio Roberto T. Coelho - Diretor de Sistemas
HZTA INTERNET - Solues em Marketing Digital
Telefone: (11) 5072.2446 // Fax: 5072.3114
E-mail: [EMAIL PROTECTED] // Web Site: www.hzta.com.br
So Paulo - SP - Brasil
_



-- 
PHP Development Mailing List http://www.php.net/
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]