How to use tomcat for adf application -  · How to use Tomcat for ADF Application Software...

24
Created by Erich, Lorman 04 / 2009, Contact : [email protected] How to use Tomcat for ADF Application Software Requirements ............................................................................................................... 1 Application technology specification .......................................................................................... 1 Getting started ............................................................................................................................. 2 Create Model ............................................................................................................................... 5 Create View ............................................................................................................................... 11 Deploy on Tomcat ..................................................................................................................... 21 Setup tomcat .............................................................................................................................. 22 Software Requirements Oracle JDeveloper 11g Java 1.6.xxx Apache Tomcat 6.0.18 Based on HR Demo databáze (hr/hr) Application technology specification Fussion Web Application ADF Bussines Components 1

Transcript of How to use tomcat for adf application -  · How to use Tomcat for ADF Application Software...

Page 1: How to use tomcat for adf application -  · How to use Tomcat for ADF Application Software Requirements ... Deploy on Tomcat ...  Project name model, adf bussines komponent

Created by Erich, Lorman 04 / 2009, Contact : [email protected]

How to use Tomcat for ADF Application

Software Requirements ............................................................................................................... 1 Application technology specification .......................................................................................... 1 Getting started ............................................................................................................................. 2 Create Model ............................................................................................................................... 5 Create View ............................................................................................................................... 11 Deploy on Tomcat ..................................................................................................................... 21 Setup tomcat .............................................................................................................................. 22

Software RequirementsOracle JDeveloper 11gJava 1.6.xxxApache Tomcat 6.0.18

Based on HR Demo databáze (hr/hr)

Application technology specificationFussion Web ApplicationADF Bussines Components

1

Page 2: How to use tomcat for adf application -  · How to use Tomcat for ADF Application Software Requirements ... Deploy on Tomcat ...  Project name model, adf bussines komponent

Created by Erich, Lorman 04 / 2009, Contact : [email protected]

Getting startedClick on New application, Choose Fussion Web Application

Application name -> ADFTomcatDemoPrefix -> demo.fussion

<next>

Project name model, adf bussines komponent

<next>

2

Page 3: How to use tomcat for adf application -  · How to use Tomcat for ADF Application Software Requirements ... Deploy on Tomcat ...  Project name model, adf bussines komponent

Created by Erich, Lorman 04 / 2009, Contact : [email protected]

Keep as it is

<next>

Project viewcontroller , adf bussines komponent

<next>

3

Page 4: How to use tomcat for adf application -  · How to use Tomcat for ADF Application Software Requirements ... Deploy on Tomcat ...  Project name model, adf bussines komponent

Created by Erich, Lorman 04 / 2009, Contact : [email protected]

Keep as it is

<finish>

Now your screen should look like this

4

Page 5: How to use tomcat for adf application -  · How to use Tomcat for ADF Application Software Requirements ... Deploy on Tomcat ...  Project name model, adf bussines komponent

Created by Erich, Lorman 04 / 2009, Contact : [email protected]

Create Model

Add Entity

Right click Model, new

Bussines tier, adf bussines components, bussines components from tables

<ok>

5

Page 6: How to use tomcat for adf application -  · How to use Tomcat for ADF Application Software Requirements ... Deploy on Tomcat ...  Project name model, adf bussines komponent

Created by Erich, Lorman 04 / 2009, Contact : [email protected]

Connection, + (create databáze connection)

Setup as on screen

<ok>

Back on screen initialize bussines components object

<ok>

6

Page 7: How to use tomcat for adf application -  · How to use Tomcat for ADF Application Software Requirements ... Deploy on Tomcat ...  Project name model, adf bussines komponent

Created by Erich, Lorman 04 / 2009, Contact : [email protected]

Entity objects, nextUpdatable view object, next

Read-only view objectsQuery, select Countries

<next>

Application module

<next>

7

Page 8: How to use tomcat for adf application -  · How to use Tomcat for ADF Application Software Requirements ... Deploy on Tomcat ...  Project name model, adf bussines komponent

Created by Erich, Lorman 04 / 2009, Contact : [email protected]

Diagram<next>

Summary

<finish>

Click on Web.xml, open source view and comment out JpsFilter filter and mapping node as described on picture below

8

Page 9: How to use tomcat for adf application -  · How to use Tomcat for ADF Application Software Requirements ... Deploy on Tomcat ...  Project name model, adf bussines komponent

Created by Erich, Lorman 04 / 2009, Contact : [email protected]

Click on AppModule in project inspector

in settings window click edit for Appmodule Local

9

Page 10: How to use tomcat for adf application -  · How to use Tomcat for ADF Application Software Requirements ... Deploy on Tomcat ...  Project name model, adf bussines komponent

Created by Erich, Lorman 04 / 2009, Contact : [email protected]

Set connection type as JDBC DataSource, name it java:comp/env/jdbc/hr

Proceed same steps for AppModuleShared, then click OK

Model part of our application is now ready.

10

Page 11: How to use tomcat for adf application -  · How to use Tomcat for ADF Application Software Requirements ... Deploy on Tomcat ...  Project name model, adf bussines komponent

Created by Erich, Lorman 04 / 2009, Contact : [email protected]

Create View

Open from ViewController faces-config.xml, your screen should look like this

From komponent patlete / components / JSF Page grap to view

Name it demo.jspx

11

Page 12: How to use tomcat for adf application -  · How to use Tomcat for ADF Application Software Requirements ... Deploy on Tomcat ...  Project name model, adf bussines komponent

Created by Erich, Lorman 04 / 2009, Contact : [email protected]

Right click on demo.jspx, create page

<ok>

From data controls / appmoduleDataControl / CoutriesView1 drag on center screenCreate ADF read-only table, enable row selection, sorting

<ok>

12

Page 13: How to use tomcat for adf application -  · How to use Tomcat for ADF Application Software Requirements ... Deploy on Tomcat ...  Project name model, adf bussines komponent

Created by Erich, Lorman 04 / 2009, Contact : [email protected]

Build project,your screen should look like this

Setup ApplicationView controller, project properties, deployment

Edit

13

Page 14: How to use tomcat for adf application -  · How to use Tomcat for ADF Application Software Requirements ... Deploy on Tomcat ...  Project name model, adf bussines komponent

Created by Erich, Lorman 04 / 2009, Contact : [email protected]

General

War Options

14

Page 15: How to use tomcat for adf application -  · How to use Tomcat for ADF Application Software Requirements ... Deploy on Tomcat ...  Project name model, adf bussines komponent

Created by Erich, Lorman 04 / 2009, Contact : [email protected]

web files

web files - contributors

15

Page 16: How to use tomcat for adf application -  · How to use Tomcat for ADF Application Software Requirements ... Deploy on Tomcat ...  Project name model, adf bussines komponent

Created by Erich, Lorman 04 / 2009, Contact : [email protected]

web files - filters

Web – Inf/ classes

16

Page 17: How to use tomcat for adf application -  · How to use Tomcat for ADF Application Software Requirements ... Deploy on Tomcat ...  Project name model, adf bussines komponent

Created by Erich, Lorman 04 / 2009, Contact : [email protected]

Web – Inf/ classes / contributors

Web – Inf/ classes / filters

17

Page 18: How to use tomcat for adf application -  · How to use Tomcat for ADF Application Software Requirements ... Deploy on Tomcat ...  Project name model, adf bussines komponent

Created by Erich, Lorman 04 / 2009, Contact : [email protected]

Web – inf / Lib

Web – inf / Lib / contributors (nothing to do)

18

Page 19: How to use tomcat for adf application -  · How to use Tomcat for ADF Application Software Requirements ... Deploy on Tomcat ...  Project name model, adf bussines komponent

Created by Erich, Lorman 04 / 2009, Contact : [email protected]

Web – inf / Lib / filters (remove all)

Profile Dependencies

19

Page 20: How to use tomcat for adf application -  · How to use Tomcat for ADF Application Software Requirements ... Deploy on Tomcat ...  Project name model, adf bussines komponent

Created by Erich, Lorman 04 / 2009, Contact : [email protected]

Platform

Tomcat 6.x

<ok><ok>

20

Page 21: How to use tomcat for adf application -  · How to use Tomcat for ADF Application Software Requirements ... Deploy on Tomcat ...  Project name model, adf bussines komponent

Created by Erich, Lorman 04 / 2009, Contact : [email protected]

Deploy on Tomcat

• Add context.xml to /adftomcatdemo/viewcontroller/public_html/META-INF/• Setup in context.xml connection• url, user, password, databasename, port• Create war

Right click on view controller, deploy, adftomcat … , to War file

Copy war to webapps directory

21

Page 22: How to use tomcat for adf application -  · How to use Tomcat for ADF Application Software Requirements ... Deploy on Tomcat ...  Project name model, adf bussines komponent

Created by Erich, Lorman 04 / 2009, Contact : [email protected]

Setup tomcat

Copy libraries from list to Tomcat lib directory

adf-controller-api.jaradf-controller.jaradf-controller-rt-common.jaradf-faces-databinding-rt.jaradflibfilter.jaradflogginghandler.jaradfm.jaradfmweb.jaradf-pageflow-dtrt.jaradf-pageflow-fwk.jaradf-pageflow-impl.jaradf-pageflow-rc.jaradf-richclient-api-11.jaradf-richclient-impl-11.jaradf-share-base.jaradf-share-ca.jaradf-share-support.jarannotations-api.jarcache.jarcatalina-ant.jarcatalina-ha.jarcatalina.jarcatalina-tribes.jarcommons-el.jardb-ca.jardms.jardvt-faces.jardvt-jclient.jardvt-utils.jarel-api.jarfmw_audit.jaridentitystore.jarinspect4.jarjasper-el.jarjasper.jarjasper-jdt.jarjavatools-nodeps.jarjavax.management.j2ee_1.0.jarjewt4.jarjmxframework.jarjmxspi.jarjps-api.jarjps-common.jarjps-ee.jarjps-internal.jarjps-unsupported-api.jarjsf-api.jarjsf-ri.jar

22

Page 23: How to use tomcat for adf application -  · How to use Tomcat for ADF Application Software Requirements ... Deploy on Tomcat ...  Project name model, adf bussines komponent

Created by Erich, Lorman 04 / 2009, Contact : [email protected]

jsp-api.jarjstl.jarkniznice.txtmdsrt.jarojdbc6.jaroracle-el.jaroraclepki.jaroracle.xdb_11.1.0.6.0.jarorg.apache.commons.beanutils_1.6.jarorg.apache.commons.collections_3.1.jarorg.apache.commons.logging_1.0.4.jarosdt_cert.jarosdt_core.jarservlet-api.jarshare.jarstandard.jartomcat-coyote.jartomcat-dbcp.jartomcat-i18n-es.jartomcat-i18n-fr.jartomcat-i18n-ja.jartrinidad-api.jartrinidad-impl.jarwls-api.jarxercesImpl.jarxmlef.jarxml.jarxmlparserv2.jar

Edit /conf/server.xml

Add data ressource node

<GlobalNamingResources> <Resource name="UserDatabase" auth="Container"

type="org.apache.catalina.UserDatabase" description="User database that can be updated and saved" factory="org.apache.catalina.users.MemoryUserDatabaseFactory" pathname="conf/tomcat-users.xml"/>

<Resource name="jdbc/hr" auth="Container" type="oracle.jdbc.pool.OracleDataSource" driverClassName="oracle.jdbc.driver.OracleDriver" factory="oracle.jdbc.pool.OracleDataSourceFactory" url="jdbc:oracle:thin:@localhost:1521:xe" user="hr" password="hr" maxActive="20" maxIdle="10" maxWait="-1"/>

</GlobalNamingResources>

23

Page 24: How to use tomcat for adf application -  · How to use Tomcat for ADF Application Software Requirements ... Deploy on Tomcat ...  Project name model, adf bussines komponent

Created by Erich, Lorman 04 / 2009, Contact : [email protected]

Edit /conf/context.xml

add resource link

<ResourceLink global="jdbc/hr" name="jdbc/hr" type="oracle.jdbc.pool.OracleDataSource"/>

Start tomcat

/bin/startup.sh

Application should be visible at <<warname>>/faces/demo.jspx

24