CodeCharge Studio Java Deployment Guide Table of contents

Similar documents
Web Application Architecture (based J2EE 1.4 Tutorial)

Writing Servlets and JSPs p. 1 Writing a Servlet p. 1 Writing a JSP p. 7 Compiling a Servlet p. 10 Packaging Servlets and JSPs p.

Directory structure and development environment set up

COPYRIGHTED MATERIAL

Supplement IV.E: Tutorial for Tomcat For Introduction to Java Programming By Y. Daniel Liang

DEPLOYING WDK APPLICATIONS ON JBOSS APPLICATION SERVER AND APACHE WEB SERVER VIA MOD_JK PROXY

xpression Documentum Edition Installation Guide Version 3.5

Tutorial: Developing a Simple Hello World Portlet

servlets and Java JSP murach s (Chapter 2) TRAINING & REFERENCE Mike Murach & Associates Andrea Steelman Joel Murach

PHP Development for ClearPath. Session 3028, Tuesday, May 15, 2012, 10:30AM Ron Neubauer, Principal Engineer, Unisys Corporation

Cisco CVP VoiceXML 3.1. Installation Guide

Open Application Architecture Platform Administration Guide

web.xml Deployment Descriptor Elements

Installation and Setup Guide Oracle FLEXCUBE Universal Banking Release 12.0 [May] [2012] Oracle Part Number E

EuroGeoSource. EU Information and Policy Support System for Sustainable Supply of Europe with Energy and Mineral Resources WP 5

MODEM on HP-UX. Guy Van Sanden.

Live Data Connection to SAP Universes

Analysis Engine Installation Guide

AutoVue Integration SDK & Sample Integration for Filesys DMS

Setting Up the Development Environment

FUEGO 5.5 WORK PORTAL. (Using Tomcat 5) Fernando Dobladez

Rumba+ Server 1.1. Administrator Guide

BlueDragon TM 7.0 Deploying CFML on J2EE Application Servers

MapXtreme Java Edition Install Guide

CA Open Space. Implementation Guide. Release

KonaKart Portlet Installation for Liferay. 2 nd January DS Data Systems (UK) Ltd., 9 Little Meadow Loughton, Milton Keynes Bucks MK5 8EH UK

BlueDragon TM 3.0 Deploying CFML on J2EE Servers

Abstract. Avaya Solution & Interoperability Test Lab

Chapter 2 WEBLOGIC SERVER DOMAINS. SYS-ED/ Computer Education Techniques, Inc.

J2EE Development. Course Detail: Audience. Duration. Course Abstract. Course Objectives. Course Topics. Class Format.

7.1. RELEASE-NOTES-2.0-M1.TXT

Servlets. How to use Apache FOP in a Servlet $Revision: $ Table of contents

IBM Operational Decision Manager Version 8 Release 5. Configuring Operational Decision Manager on Tomcat

SUN Enterprise Development with iplanet Application Server

Readme File. Hyperion System 9 BI+ Application Builder.NET Release 9.2 Readme. Hyperion System 9 BI+ Application Builder.NET Release 9.

Bedework Calendar Deployment Manual

Signicat Connector for Java Version 2.6. Document version 3

Jakarta Struts: An MVC Framework

FuegoBPM TM Enterprise Process Orchestration Engine Configuration Instructions for a JVM Engine

Welcome to the JReport Server Monitor User's Guide

UIMA Simple Server User Guide

Kewill Customs Installations Guide

Enhydra 6.2 Application Architecture. Tanja Jovanovic

Configuring Apache HTTP Server as a Reverse Proxy Server for SAS 9.2 Web Applications Deployed on BEA WebLogic Server 9.2

Installation. Alessandro Taurelli 2010/06/15 13:39

SAS AppDev Studio TM 3.4 Eclipse Plug-ins. Migration Guide

Kewill Customs Installations Guide

DB2. Web Services Object Runtime Framework: Implementing DB2 Web Services

AquaLogic BPM Enterprise Configuration Guide

Configuration in Enhydra 6.2

App Studio 4.1 Deployment Guide

MyLEAD Release V1.3 Installation Guide

Bedework Calendar Deployment Manual

This page discusses topic all around using FOP in a servlet environment. 2. Example Servlets in the FOP distribution

Hotfix 913CDD03 Visual Data Explorer and SAS Web OLAP Viewer for Java

EUSurvey Installation Guide

System Administrator Manual

Dspace Installation Guide (Windows 2003 Server)

Setup of HELIO Components Definition of Required Capabilities V0.8

Administering the JBoss 5.x Application Server

ZK Mobile The Quick Start Guide

SSO Plugin. Installation for BMC AR System. J System Solutions. Version 5.1

Oracle Fusion Middleware. 1 Oracle Team Productivity Center Server System Requirements. 2 Installing the Oracle Team Productivity Center Server

Installing and Configuring the Runtime Processes 2

FlowLIMS Installation Guide. Bioinformatics Facility at Fox Chase Cancer Center

Anno Accademico Laboratorio di Tecnologie Web Introduzione ad Eclipse e Tomcat

Servlets. How to use Apache FOP in a Servlet $Revision: $ Table of contents

Kewill Customs Installations Guide

11-15 DECEMBER ANTWERP BELGIUM

Artix for J2EE. Version 4.2, March 2007

Arcot RiskFort Quick Installation Guide

idashboards Administrator s Manual Version 7.5

1. Configuring Azure and EBP for a simple demo

Location Intelligence Component

BEAWebLogic Server. Introduction to BEA WebLogic Server and BEA WebLogic Express

Hyperion Application Builder for.net. Readme. Release

IBM. IBM WebSphere Application Server Migration Toolkit. WebSphere Application Server. Version 9.0 Release

JReport Enterprise Viewer for JREntServer Manual

Kewill Customs Installations Guide

Run Syncope in real environments

GlassFish Survival Guide. Alexis Moussine-Pouchkine GlassFish Team Sun Microsystems

The team that wrote this redbook

EUSurvey OSS Installation Guide

Rumba+ Server 1.3. Administrator Guide

McMaster Service-Based ehealth Integration Environment (MACSeie) Installation Guide July 24, 2009

How To Guide Using and Developing Custom Phases in IKAN ALM

How to Publish Any NetBeans Web App

JBoss SOAP Web Services User Guide. Version: M5

Dspace on Windows. Pre-requisite Software: 1. Java Development Kit. 2. PostgreSQL 3. Apache Tomcat 4. Apache Maven 5. Apache ANT 6.

Web Applications and Database Connectivity using JDBC (Part II)

Licensing Installation Instructions for WebLM 4.6

Life Without NetBeans

QuarkXPress Server ReadMe

Installation & Configuration of OASIS- Module and Reference Signature Solution

Web Collaborative Reviewer Installation Guide. Small Business Edition

ByggSøk plan Project Structure And Build Process

ZK Mobile for Android The Quick Start Guide

INSTALLING AND DEPLOYING ADOBE EXPERIENCE MANAGER FORMS ON JEE FOR WEBLOGIC

Sentences Installation Guide. Sentences Version 4.0

EMC Documentum External Viewing Services for SAP

Transcription:

CodeCharge Studio Java Deployment Guide Table of contents CodeCharge Studio requirements for Java deployment... 2 Class Path requirements (compilation-time and run-time)... 3 Tomcat 4.0 deployment... 4 Tomcat 4.0 + Apache deployment... 5 Resin 2.0 deployment... 6 WebLogic 7.0 deployment... 7 WebLogic 5.1 deployment (JSP)... 8 WebSphere 4.0 deployment... 9 Project folder structure... 10 WAR file vs. application folder vs. plain JSP... 11 Class Path... 12 How Controller Servlet finds Action classes... 13 Troubleshooting - JSP deployment... 14 1

CodeCharge Studio requirements for Java deployment Environment: Setup: JDK 1.3 or 1.4 (JDK Home) Servlet 2.2 and JSP 1.1 (Servlet Home) Ant 1.4 (Ant Home) JAVA_HOME environment variable should indicate path to JDK that should be used to build project. ANT_HOME environment variable or Ant Home site property should indicate path to Ant build tool installation directory. Optional: JDBC 2.0 Optional package (JDBC Home) if you choose to use DataSource extension JAXP 1.1 and SAX 2.0 if you choose to generate JSP (Apache XML) (Sun XML) Jakarta ORO if you want regexp validations for e-mail, phone, zip code, etc... 2

Class Path requirements (compilation-time and run-time) JSP Class Path should contain: Servlet 2.2 API library JAXP 1.1 library SAX 2.0 parser (such as crimson or xerces) JDBC 2.0 extensions library if you use Data Sources Jakarta ORO if you use regexp for validations Servlets with Templates Class Path should contain: Servlet 2.2 API library JDBC 2.0 extensions library if you want to use Data Sources Jakarta ORO if you use regexp for validations 3

Tomcat 4.0 deployment Check that the DB drivers are in the class path of your server. Choose from one of the following scenarios: Scenario 1 Auto-deployment from webapps directory (DataSource extension is not used) Before generating the code, ensure that the Use Data Source site property is set to No. This is in the Project Explorer window. Fill in connection properties to indicate Driver class name, Database url, user login and password. Ensure that your database driver is in your application server class path. Place the generated war file at the location where the appbase attribute of the Virtual Host configuration element points. Usually, it is <TOMCAT_HOME>/webapps. Scenario 2 Deployment through Context configuration (DataSource extension is not used) Add Context element as a child to Host element in your server.xml configuration file. <Context path="/jspportal" docbase="jspportal.war"> </Context> The path is the context path of your application. docbase is the absolute path to the war file, or relative to the appbase path. Scenario 3 Deployment through Context configuration (DataSource extension is used) Before code generation, verify that the Use Data Source site property is set to Yes. Set the connection DataBase URL property to java:comp/env/jdbc/connection1 where Connection1 is the name of your connection. Define Context element as described in the previous scenario. Add a Resource child element with ResourceParams to the Context element: <Resource name="jdbc/connection1" auth="container" type="javax.sql.datasource"/> <ResourceParams name="jdbc/connection1"> <parameter> <name>user</name> <value>user Name</value> </parameter> <parameter> <name>password</name> <value>user Password</value> </parameter> <parameter> <name>driverclassname</name> <value>driver Class Name</value> </parameter> <parameter> <name>drivername</name> <value>database Connection URL</value> </parameter> </ResourceParams> name is Connection name as indicated in your CCS project with jdbc/ prefix prepended. 4

Tomcat 4.0 + Apache deployment Scenario 1. MOD_JK connector. 1. Download mod_jk.dll and libapr.dll and copy them to the apache/modules directory. 2. Create workers.properties file in the $CATALINA_HOME/conf/jk/ directory. workers.tomcat_home=$(catalina_home) workers.java_home=$(java_home) ps=\ worker.list=ajp13 worker.ajp13.port=8009 worker.ajp13.host=localhost worker.ajp13.type=ajp13 3. At the end of httpd.conf LoadModule section add the following line: LoadModule jk_module modules/mod_jk.dll 4. At the end of httpd.conf AddModule section add the following line: AddModule mod_jk.c 5. At the end of httpd.conf add the following: JkWorkersFile "$CATALINA_HOME/conf/jk/workers.properties" JkLogFile "$CATALINA_HOME/logs/mod_jk.log" JkLogLevel info <VirtualHost localhost> ServerName localhost DocumentRoot $CATALINA_HOME/webapps/ JkMount /*.jsp ajp13 JkMount /*.do ajp13 </VirtualHost> 6. If needed uncomment the following declarations in Tomcat server.xml config file: <Connector classname="org.apache.ajp.tomcat4.ajp13connector" port="8009" minprocessors="5" maxprocessors="75" acceptcount="10" debug="0"/> 7. In CCS set publishing path to $CATALINA_HOME/webapps/ and publish your project. 8. Start Tomcat and then Apache. Scenario 2. WARP connector. 1. Download mod_webapp.so and libapr.dll and copy them to the apache/modules directory. 2. At the end of httpd.conf LoadModule section add the following line: LoadModule webapp_module modules/mod_webapp.so 3. At the end of httpd.conf AddModule section add the following line: AddModule mod_webapp.c 4. At the end of httpd.conf add the following: WebAppConnection warpconnection warp localhost:8008 WebAppDeploy JSPPortal warpconnection /Portal/ 5. If needed uncomment Tomcat-Apache service configuration in Tomcat server.xml config file. 6. In CCS set publishing path to $CATALINA_HOME/webapps/ and publish your project. 7. Start Tomcat and then Apache. 5

Resin 2.0 deployment Check that DB drivers are in class path of your server. Choose the appropriate scenario below. Scenario 1 Auto-deployment from webapps directory (DataSource extension is not used) Before code generation, verify that the Use Data Source site property is set to No. Fill in connection properties to indicate Driver class name, Database url, user login and password. Ensure that your database driver is in your application server class path. Place the generated war file at the location where the war-dir element of the Virtual Host configuration element points. Usually, it is <RESIN_HOME>/webapps. Scenario 2 Deployment through web-app configuration (DataSource extension is not used) Add Context element as a child to Host element in your resin.conf configuration file. <web-app id="/jspportal" app-dir="c:/projects/portal/jspportal.war"/> The id attribute is the context path of your application while app-dir is the absolute or relative path to the war file from the app-dir. Scenario 3 Deployment through web-app configuration (DataSource extension is used) Before code generation, verify that the Use Data Source site property is set to Yes. Set the connection DataBase URL property to java:comp/env/jdbc/connection1, where Connection1 is name of your connection. Add the resource-ref element as the child of the web-app element: <resource-ref> <res-ref-name>jdbc/connection1</res-ref-name> <res-type>javax.sql.datasource</res-type> <init-param driver-name="driver Class Name"/> <init-param url="database connection URL"/> <init-param user="user Name"/> <init-param password="user Password"/> <init-param max-connections="20"/> <init-param max-idle-time="30"/> <init-param enable-transaction="false"/> </resource-ref> The res-ref-name attribute is the Connection name as indicated in your project with the jdbc/ prefix prepended 6

WebLogic 7.0 deployment Check that DB drivers are in class path of your server. Choose the appropriate scenario below. Scenario 1 Auto-deployment from applications directory (DataSource extention is not used) Before code generation, verify that the Use Data Source site property is set to No. Fill in connection properties to indicate Driver class name, Database url, user login and password. You can quickly deploy your application on the administration server if auto-deploy is enabled by copying the war file into the \applications directory of the administration server. Scenario 2 Deployment through Administration Console Set the Use Data Source site property appropriately to indicate whether you want to use a Data Sources in your code. If you want to work with Data sources and you have not configured it already, add and configure the JDBC Pool and DataSource to your server as described in (http://e-docs.bea.com/wls/docs70/consolehelp/jdbc.html#1104939). Bear in mind that the WebLogic JNDIName property should be equal to the DataBase URL property of your CodeCharge Studio connection. Install your application as described in (http://e-docs.bea.com/wls/docs70/consolehelp/applications.html#1104914). 7

WebLogic 5.1 deployment (JSP) WebLogic 5.1 requires SAX 2.0 and the JAXP 1.1 libraries in order to work with the JSP generated by CodeCharge Studio. WebLogic has its own SAX and JAXP classes located in lib/weblogicaux.jar. Your xml libraries must be referenced earlier in the class path before weblogicaux.jar. To accomplish this, we recommend that you prepend the classpath with the xml libaries using the wlconfig.exe utility located in the weblogic/bin directory. An example command would be: wlconfig.exe -classpath c:\java\xerces-2_0_1\xercesimpl.jar;c:\java\xerces-2_0_1\xmlparserapis.jar This will reference the SAX and JAXP classes before your JVM class path. You will also need to restart WebLogic before your new class path can be used. 8

WebSphere 4.0 deployment Begin by clicking on the Project name in the Project Explorer window then under the Data tab of the Properties window, configure the Site properties including the Server side connection properties. Make sure that JDBC drivers are in the application class path. 1. Get the latest version of JAXP 1.1 and SAX 2.0 for compilation and runtime execution of JSP files. You can get them from the Ant installation. 2. For the 'Runtime libs' Site property, enter in semicolon-delimited format the absolute paths to the jar files corresponding to JAXP and SAX e.g. "c:\ant\lib\jaxp.jar;c:\ant\lib\crimson.jar". These files will be copied to the WEB-INF\lib directory of the application. 3. Select 'WebSphere 4.0' in 'Target server' Site property. 4. Specify 'Publishing/Server Path' property and publish your project. 5. Use the WebSphere console to install your application. On the second screen of the Application Installation Wizard select 'No' for the 'Precompile JSPs' property of your web module. 6. Start the new application from WebSphere Admin console (if needed, restart the server). 9

Project folder structure The structure of a generated Java project is as follows: /YourProject - /CCSBuild - /src - all java source code - /config - web.xml, CCStags.tld, properties etc. - build.xml - makefile for Ant - *.jsp - *.xml - *.ccp - *.html - YourProject.ccs - /images - /Themes - /Manually created folders The Ant tool can create four more folders relative to the CCSBuild folder, based on the target you build: - /app - application ready to be jared or copied to the directory configured as context root in application server. - /appwar - war file for your application - /bin - all compiled classes - /doc - javadoc 10

WAR file vs. application folder vs. plain JSP CodeCharge Studio always creates and publishes WAR file, which is a standard method for all servers. To work with the un-archived version of the application you can perform the following steps: 1. Right click on your Project in Project Explorer and select Generate Code 2. Save All 3. Got to the directory YourProject/CCSBuild 4. Run Ant. It will find the build.xml file then compile and build your project. 5. You will then find your project ready to be configured in the YourProject/CCSBuild/app folder. You may also need to edit the application properties in your servers config file, such as context path etc. 11

Class Path The Class Path for your application can be specified using the Class Path property of the Site. This should be a list of directories and jar files separated by semicolon, and will be added to classpath at the time of compilation. For example: c:\java\xerces\xercesimpl.jar;c:\java\xerces\xmlparserapis.jar;c:\java\lib\servlet.jar Note that to set classpath for run-time, you will need to configure your application server. 12

How Controller Servlet finds Action classes ControllerServlet serves all *.do HTTP queries. This is defined in web.xml file of the application: <servlet> <servlet-name>controller</servlet-name> <servlet-class>com.codecharge.controllerservlet</servlet-class> </servlet> <servlet-mapping> <servlet-name>controller</servlet-name> <url-pattern>/*.do</url-pattern> </servlet-mapping> After receiving query, ControllerServlet needs to determine from query which Action class to call. Correspondence between page URL and Action classes is of the way: all folders in application context correspond to packages names Page name corresponds to Class name (without.do) For example the URL http://server:port/appname/foldername/pagename.do?parameters corresponds to FolderName.PageName class (PageName class in FolderName package) in AppName application. 13

Troubleshooting - JSP deployment WAR file is not being created Symptom: WAR file is absent in target folder and the following error message appears in CodeCharge Studio s message window: [copy] Could not find file C:\WINNT\Profiles\ADMINI~1\LOCALS~1\Temp\~aim0\CCSBuild\config\CCStags.tld to copy Reason: Wrong publishing settings prevent the file CCStags.tld from being copied to the temporary directory for publishing. Solution: In Project -> Settings -> Publishing change one of the following: 1. Check Files to Publish -> All files with extensions. And add tld extension to the list. or 2. Check Files to Publish -> All files excluding extensions 14