tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Costin Manolache <cmanola...@yahoo.com>
Subject Re: PHP from Tomcat , some news from JFC :)
Date Thu, 08 Apr 2004 06:12:08 GMT
Mark Roth wrote:
>  From what I hear, the current PHPServlet is okay for simple things, but 
> the integration you're looking for is not quite there yet.
> 
> There's some work going on to let Java and scripting languages act more 
> friendly with each other.  For those who are interested, check out 
> JSR-223, Scripting Pages in Java Web Applications.
> 
>     http://jcp.org/en/jsr/detail?id=223
> 
> This JSR focuses on tight integration between PHP (or other scripting 
> languages) and Java webapps.  Zend is an active participant on the 
> expert group and is interested in such integration.
> 
> I believe they're building their RI on top of Tomcat.
> 
> Cool stuff!

Yes, but it's actually the reverse of what I'm interested in :-)

 From what I've read the JSR is more about allowing scripting languages 
to access and use java objects. It may look cool - but there
are already plenty of scripting languages targeting the JVM - jython,
mozilla's javascript, bsh, etc. There are 2 great things about scripting
languages, one is the simplicity of syntax and the ease of developing
code. This is IMO covered well enough by the variants targeting the VM.
( I believe cocoon is using javascript already ).

The other great thing about scripting languages is the large collection 
of existing extensions and scripts.

To use Apache as example - having Apache call native java modules for 
auth is interesting, but using the existing collection of apache modules 
  is IMO the real value :-).
Apache is more than the HTTP stack ( and while we have a very good http
implementation in tomcat, I'm not sure we can match the amount of 
testing and review and stability apache's got ). And Python/PHP/etc are 
more than a syntax to use in a page.



Costin





> 
> ---
> Mark Roth, Java Software
> JSP 2.0 Specification Lead
> Sun Microsystems, Inc.
> 
> 
> Costin Manolache wrote:
> 
>> Nice :-)
>>
>> Did you try it ? I'm curious, could you run a quick helo world 
>> benchmark ( helo.jsp / help.php ) ?
>>
>> The big question is the level of integration - i.e. if you can call java
>> objects from php or use some of the nice PHP features from java.
>>
>>
>> Costin
>>
>> Henri Gomez wrote:
>>
>>> Hi to all,
>>>
>>> Mladen discussed about using PHP from Tomcat.
>>>
>>> Jean-Frederic Clere make some tests during his vacation
>>> and send me the following mail to be forwarded to the list :
>>>
>>> ....
>>>
>>> Good news, tomcat+php it's easy, php allready have support for.
>>> I make a simple try and here's the resulting 'readme' :
>>> ++++
>>> Using php in Tomcat5: Easy a servlet is available in php (I have 
>>> tried with
>>> php-4.3.5)
>>>
>>> configure the php with:
>>> ./configure --with-servlet=$TOMCAT_HOME --with-java=$JAVA_HOME
>>> a jarfile and dynamic library are produced:
>>> - sapi/servlet/phpsrvlt.jar
>>> - libs/libphp4.so
>>>
>>> Copy jarfile and arrange web.xml:
>>> cp $PHP_HOME/sapi/servlet/phpsrvlt.jar $TOMCAT_HOME/common/lib
>>> copy the $PHP_HOME/sapi/servlet/web.xml servlet and servlet-mapping 
>>> in the
>>> $TOMCAT_HOME/conf/web.xml
>>>
>>> Start the Tomcat:
>>> LD_LIBRARY_PATH=$PHP_HOME/libs
>>> export LD_LIBRARY_PATH
>>> $TOMCAT_HOME/bin/catalina.sh start
>>>
>>> Try it:
>>> Create a file named ./webapps/ROOT/test.php containing:
>>> +++
>>> <?php phpinfo(); ?>
>>> +++
>>> Call it:
>>> http://localhost:8080/test.php
>>>
>>> Patch for the configure of php:
>>>
>>> --- configure.org       2004-04-07 11:20:24.000000000 +0200
>>> +++ configure   2004-04-07 11:22:50.000000000 +0200
>>>      if test "$withval" = "yes"; then
>>>        SERVLET_CLASSPATH=.
>>>      else
>>> +      if test -f $withval/common/lib/servlet-api.jar; then
>>> +        SERVLET_CLASSPATH=$withval/common/lib/servlet-api.jar
>>> +      fi
>>> +
>>>        if test -f $withval/lib/servlet.jar; then
>>>          SERVLET_CLASSPATH=$withval/lib/servlet.jar
>>>       fi
>>> ++++
>>
>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
>> For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org
>>


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org


Mime
View raw message