Chapter 6 Generating Persistent Objects for Java and JSF Pages


Testing JSF pages

You can deploy a JSF Web application in a Web server or an application server that supports JSP. For example, Apache Tomcat, JBoss.

You can use an IDE like Eclipse to edit the generated Java classes, and use the Eclipse WTP (Web Tools Project) to edit JSF pages and face config files.

Steps To test JSF pages with Eclipse WTP:

  1. Install a Web server such as Tomcat or an application server such as JBoss.
  2. Generate Java code
  3. Import the JSF project into Eclipse. The project is built.
  4. Configure your Web server or application server.
  5. Start the database.
  6. Start the Web server or application server using the WTP Servers view.
  7. Right-click the index.jsp under the webroot folder and select Run As(Run on Server.
  8. Select the server you want to use in the list.

Steps To test JSF pages with Apache Tomcat:

  1. Install a Web server such as Tomcat or an application server such as JBoss.
  2. Generate Java code
  3. Import the JSF project into Eclipse. The project is built.
  4. Copy the <ProjectName> folder under the .deployables folder into the Apache Tomcat webapps folder.
    Where <ProjectName> is the Eclipse project name.
  5. Start the database.
  6. Start Apache Tomcat server.
  7. Run the Web application using the URL: http://<hostname>:8080/<ProjectName>/index.jsp.
    If Apache Tomcat is installed locally, <hostname> is localhost.

 


Copyright (C) 2008. Sybase Inc. All rights reserved.