PageRenderTime 69ms CodeModel.GetById 28ms RepoModel.GetById 1ms app.codeStats 0ms

/ railoapacheportable/webapps/resin-doc/examples/quercus-hello/index.xtp

http://railoapacheportable.googlecode.com/
Unknown | 101 lines | 79 code | 22 blank | 0 comment | 0 complexity | 1f6deb2541e5943ac41af6038c853c22 MD5 | raw file
Possible License(s): BSD-2-Clause, Apache-2.0, EPL-1.0, LGPL-3.0, GPL-3.0, AGPL-1.0, LGPL-2.0, MPL-2.0-no-copyleft-exception, GPL-2.0, LGPL-2.1, BSD-3-Clause, AGPL-3.0, CC-BY-SA-3.0
  1. <document>
  2. <header>
  3. <title>Quercus: Hello, World installation</title>
  4. <description>
  5. <p>The Hello, World tutorial covers the basic steps to
  6. start Resin and run a trivial php script in Quercus.</p>
  7. </description>
  8. <type>tutorial</type>
  9. <tutorial-startpage>hello.php</tutorial-startpage>
  10. </header>
  11. <body>
  12. <summary/>
  13. <s1 title="Files in this tutorial">
  14. <deftable>
  15. <tr><td><viewfile-link file="WEB-INF/resin-web.xml"/>
  16. </td><td>web.xml configuration
  17. </td></tr><tr><td><viewfile-link file="hello.php"/>
  18. </td><td>The PHP Hello, World
  19. </td></tr></deftable>
  20. </s1>
  21. <s1 title="Introduction">
  22. <p>This short article is intended for PHP programers who are
  23. interested in trying Caucho's PHP implementation. The download and
  24. unzipping instructions are intended for windows users. However, the
  25. implementation will work just as well in UNIX.</p>
  26. </s1>
  27. <s1 title="Part I: Installing Resin">
  28. <s2 title="Downloading and unzipping Resin">
  29. <ol>
  30. <li>Navigate to http://www.caucho.com/download</li>
  31. <li>Download the latest Resin binary for your operating system.</li>
  32. <li>For purposes of this demo, I have downloaded the Windows .zip binary.
  33. The non-pro version is open-source.</li>
  34. <li>Save the file to your desktop.</li>
  35. <li>Double click the binary and unzip the file.</li>
  36. <li>For purposes of this demo, I have unzipped the contents to C:\resin-3.0.14</li>
  37. </ol>
  38. </s2>
  39. <s2 title="Running Resin for the first time">
  40. <ol>
  41. <li>Browse to the directory into which you unzipped the resin download (ie: C:\resin-3.0.14)</li>
  42. <li>Double-click httpd.exe. At this point the resin web server should start.</li>
  43. <li>Open your favorite browser and type in the following URL: http://localhost:8080</li>
  44. <li>You will now see Resin's Default Home Page</li>
  45. </ol>
  46. </s2>
  47. </s1>
  48. <s1 title="Part II: Configuring Resin to Serve PHP Pages">
  49. <ol>
  50. <li>Cut and paste the "resin-web.xml" into your favorite text editor.</li>
  51. <li>Save the file into C:\resin-3.0.14\webapps\ROOT\WEB-INF (NB: if you use
  52. Notepad, then be careful to either save as "all files" or just put the
  53. file name in double quotes. IE: "resin-web.xml").</li>
  54. <li>Cut and paste the "hello-world.php" into your text editor.</li>
  55. <li>Save the file into C:\resin-3.0.14\webapps\ROOT</li>
  56. <li>Open your favorite browser and type in the
  57. following URL: http://localhost:8080/hello-world.php.</li>
  58. </ol>
  59. <example title="WEB-INF/resin-web.xml">
  60. &lt;web-app xmlns="http://caucho.com/ns/resin"&gt;
  61. &lt;servlet-mapping url-pattern="*.php"
  62. servlet-class="com.caucho.quercus.servlet.QuercusServlet"&gt;
  63. &lt;/servlet-mapping&gt;
  64. &lt;/web-app&gt;
  65. </example>
  66. <example title="hello-world.php">
  67. &lt;?php
  68. echo "Hello World";
  69. ?&gt;
  70. </example>
  71. </s1>
  72. <s1 title="Conclusion">
  73. <p>If all went well with the above steps, you have installed
  74. Resin correctly. Congratulations!</p>
  75. <p>You can now create your own PHP pages and store them in the same
  76. directory as the hello-world.php file.</p>
  77. </s1>
  78. </body>
  79. </document>