aspose file tools*
The moose likes Servlets and the fly likes php as a servlet Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "php as a servlet" Watch "php as a servlet" New topic
Author

php as a servlet

mahesh narayan
Ranch Hand

Joined: Aug 12, 2003
Posts: 41
Hi

I was trying to run php as a servlet in websphere application server. But hard luck... i am just not able to figure out how to go about it.... can anyone help me ?

rgds
Mahesh
Mark Spritzler
ranger
Sheriff

Joined: Feb 05, 2001
Posts: 17250
    
    6

a Servlet is Java, PHP is not.

Mark


Perfect World Programming, LLC - Two Laptop Bag - Tube Organizer
How to Ask Questions the Smart Way FAQ
William Brogden
Author and all-around good cowpoke
Rancher

Joined: Mar 22, 2000
Posts: 12769
    
    5
In tomcat we have the CGI servlet that lets you run PERL cgi scripts, seems to me you should be able to use it to run PHP scripts.
Bill
mahesh narayan
Ranch Hand

Joined: Aug 12, 2003
Posts: 41
Sorry Mark for being vague about my question.What i meant was to ask whether i can integrate PHP into a Java Servlet environment. Though i could find some doc on googling, but it couldnt help me how to do tht in websphere application server.It would be really helpful if someone can provide me pointers on how to do it.

thanks
Mahesh
Paul Sturrock
Bartender

Joined: Apr 14, 2004
Posts: 10336

You can call Java Code from PHP - there is a Servlet SAPI module, which you can get if you look on PHP's site. Or you can use the Java Extension stuff (again, look on PHP's site) but that's very definitely at the alpha stage. Take this all with a pinch of salt though - Java is a far richer language than PHP, so you are bound to fine some horrible gotchas trying to use them in the same app.


JavaRanch FAQ HowToAskQuestionsOnJavaRanch
mahesh narayan
Ranch Hand

Joined: Aug 12, 2003
Posts: 41
Thanks Paul.

I have used Java Bridge to call java from Php. And is seems to work fine.

rgds
Mahesh
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: php as a servlet