Visual-JSF

From Resin 3.0

(Difference between revisions)
Jump to: navigation, search
m (Step by Step (Deploying Visual JSF Demo Application))
m
 
(2 intermediate revisions by one user not shown)
Line 1: Line 1:
==Deploying Corporate Travel Center Application==
+
== Step by Step (Deploying Visual JSF Application) ==
 +
 
 +
''[Tested with Resin 3.1.6]''
 +
 
 +
===Deploying Corporate Travel Center Application===
 
<ol>
 
<ol>
 
<li>Download Resin from http://caucho.com/download
 
<li>Download Resin from http://caucho.com/download
 
<li>Unzip Resin into /usr/local/share/resin
 
<li>Unzip Resin into /usr/local/share/resin
 
<li>Change into /usr/local/share/resin/webapps directory and create directory TravelCenter
 
<li>Change into /usr/local/share/resin/webapps directory and create directory TravelCenter
<li>If you already have a deployable Corporate Travel Center Application you can skip to deploying the app
 
 
<li>Start Netbeans IDE6.0.1 and go to the File menu and choose New Project
 
<li>Start Netbeans IDE6.0.1 and go to the File menu and choose New Project
 
<li>In the New Project dialog open Samples -> Web -> Visual JSF and choose Corporate Travel Center, click Next
 
<li>In the New Project dialog open Samples -> Web -> Visual JSF and choose Corporate Travel Center, click Next
Line 28: Line 31:
 
</web-app>
 
</web-app>
 
</pre></code>
 
</pre></code>
<li>the application uses database, so in the next two steps we will start Derby database provided with NetBeans IDE and configure resin connection pool
+
<li>The application uses database, so in the next two steps we will start Derby database provided with NetBeans IDE and configure resin connection pool
 
<li>In NetBeans IDE open Tools menu and start the database via following path Java DB Database -> Start Server
 
<li>In NetBeans IDE open Tools menu and start the database via following path Java DB Database -> Start Server
 
<li>Locate derbyclient.jar and copy it into /usr/local/share/resin/lib directory. The derbyclient.jar can be downloaded as part of Derby Database package version 10.2.2.0 at http://db.apache.org/derby/releases/release-10.2.2.0.html  
 
<li>Locate derbyclient.jar and copy it into /usr/local/share/resin/lib directory. The derbyclient.jar can be downloaded as part of Derby Database package version 10.2.2.0 at http://db.apache.org/derby/releases/release-10.2.2.0.html  
<li>insert the following snippet into resin.conf, which is located at /usr/local/share/resin/conf
+
<li>Insert the following snippet into resin.conf, which is located at /usr/local/share/resin/conf
 
<code>
 
<code>
 
<pre>
 
<pre>
Line 50: Line 53:
 
<li>Browse to http://localhost:8080/TravelCenter/faces/Page1.jsp
 
<li>Browse to http://localhost:8080/TravelCenter/faces/Page1.jsp
 
</ol>
 
</ol>
 +
 
==Known Issues==
 
==Known Issues==

Latest revision as of 03:40, 26 April 2008

Step by Step (Deploying Visual JSF Application)

[Tested with Resin 3.1.6]

Deploying Corporate Travel Center Application

  1. Download Resin from http://caucho.com/download
  2. Unzip Resin into /usr/local/share/resin
  3. Change into /usr/local/share/resin/webapps directory and create directory TravelCenter
  4. Start Netbeans IDE6.0.1 and go to the File menu and choose New Project
  5. In the New Project dialog open Samples -> Web -> Visual JSF and choose Corporate Travel Center, click Next
  6. Optionally, change project's name. It will be referred to as TravelCenter in the steps below
  7. Select the project in NetBeans Projects Navigator pane (left pane of the IDE) and choose "Clean and Build" from contextual drop down menu (mouse - right button on windows)
  8. Deploy the exploded application via copying contents of web folder that was created by the Build process. The folder is located in build folder of the TravelCenter home directory
  9. A successfully deployed application will have the following structure under the webapps folder of Resin
    webapps
                     -> TravelCenter
                                                    ->META-INF
                                                    ->resources
                                                    ->WEB-INF
                                                    ->Details.jsp
                                                    ->..
                                                    ->readme.html
    
  10. change into WEB-INF directory and create resin-web.xml file with the following content
    <?xml version="1.0" encoding="UTF-8"?>
    <web-app>
      <jsp validate-taglib-schema="false" fast-jsf="false"/>
    </web-app>
    
  11. The application uses database, so in the next two steps we will start Derby database provided with NetBeans IDE and configure resin connection pool
  12. In NetBeans IDE open Tools menu and start the database via following path Java DB Database -> Start Server
  13. Locate derbyclient.jar and copy it into /usr/local/share/resin/lib directory. The derbyclient.jar can be downloaded as part of Derby Database package version 10.2.2.0 at http://db.apache.org/derby/releases/release-10.2.2.0.html
  14. Insert the following snippet into resin.conf, which is located at /usr/local/share/resin/conf
    <database>
         <jndi-name>jdbc/TRAVEL_ApacheDerby</jndi-name>
         <driver type="org.apache.derby.jdbc.ClientDriver">
                <url>jdbc:derby://localhost:1527/travel</url>
                <user>travel</user>
                <password>travel</password>
          </driver>
          <prepared-statement-cache-size>8</prepared-statement-cache-size>
          <max-connections>20</max-connections>
          <max-idle-time>30s</max-idle-time>
    </database>
    

  15. cd into /usr/local/share/resin/bin directory and start Resin with ./httpd.sh
  16. Browse to http://localhost:8080/TravelCenter/faces/Page1.jsp

Known Issues

Personal tools