The Source for Java Technology Collaboration
User: Password:
Register | Login help    

Search

Online Books:
java.net on MarkMail:


GWS Deployer 1.9.17 : Reloaded : New Features Part 3 : PHP Support

Posted by survivant on September 11, 2009 at 10:45 AM PDT
In a previous post : PART2 I describe how to run JSP over Grizzly. Now I'll show you how to run PHP over Grizzly.

here a sample web.xml file for PHP support. (I'm using Quercus, but you could use native PHP too).

<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE web-app
    PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.2//EN"
    "http://java.sun.com/j2ee/dtds/web-app_2_2.dtd">

<web-app>
  <description>Caucho Technology's PHP Implementation</description>

  <servlet>
    <servlet-name>Quercus Servlet</servlet-name>
    <servlet-class>com.caucho.quercus.servlet.QuercusServlet</servlet-class>
  </servlet>

  <servlet-mapping>
    <servlet-name>Quercus Servlet</servlet-name>
    <url-pattern>*.php</url-pattern>
  </servlet-mapping>

  <welcome-file-list>
    <welcome-file>index.php</welcome-file>
  </welcome-file-list>

</web-app>


The last step is to put the required jars into the classpath.
You could put them in the command line with -cp or --classpath or you could use Deployer's param :

--libraryPath=[path]

Example : --libraryPath=/libs:/common_libs

With that you can have PHP support only if you want.

Follow us on Twitter

Related Topics >> Blogs      Community      Open Source      Servlets      
Comments
Comments are listed in date ascending order (oldest first)

awesomness

awesomness