Friday, May 30, 2014

How To Install IBM WebSphere Application Server

---
How To Install IBM WebSphere Application Server
STEPS
1) Insert Installation CD.
2) Select WebSphere Application Server Installation.
3) Wait for InstallShield Wizard to run.
4) Start the Installation Wizard.
5) Agree to terms.
6) Check pre-requisites.
7) Set Installation Directory.
8) Select Full Installation.
9) Review Installation Summary.
10) Extraction starts.
11) Installation starts.
12) Installation completed.
13) Installation verification.
14) First Steps Output.
15) Administer Server.
16) Check the pre-installed Application.
17) Browse the Samples Gallery.

STEPS

1) Insert Installation CD.

2) Select WebSphere Application Server 6 Installation.

3) Wait for InstallShield Wizard to run.

4) Start the Installation Wizard.

5) Agree to terms.

6) Check pre-requisites.

7) Set Installation Directory.

8) Select Full Installation.

9) Review Installation Summary.

10) Extraction starts.

11) Installation starts.

12) Installation completed.

13) Installation verification.

a) The First steps page.
b) You can also access First Steps Page from the Start Menu.

14) First Steps Output.

15) Administer Server.

a) Administer page.
b) You can also access the Administer Page from the Start Menu.

16) Check the pre-installed Application.

E.g., SamplesGallery.

17) Browse the Samples Gallery.

Go back to the WebSphere startup wizard page, click Samples Gallery.
---

Monday, May 26, 2014

Java EE 109 GitHub and EGit Eclipse Plugin

---
Java EE 109 GitHub and EGit Eclipse Plugin
STEPS
1) Install Eclipse Git Team Provider.
2) Share Project.

STEPS

1) Install Eclipse Git Team Provider.

2) Share Project

2.1) Right-click project name, select Team/Share Project…
2.2) Select Git
2.3) Enter Project Name and Directory.
2.4) Click Finish.
2.5) Click Commit.
2.6) Select Files to be committed.
2.7) (if you haven’t got a remote directory on GitHub) Create a remote directory.
2.8) Copy the path.
2.9) Back in Eclipse, paste the path and click Next.
2.10) Set Details.
2.11) Add All Branches.
2.12) Click Next.
2.13) Confirm.
2.14) Done.
2.15) Check in Remote Directory that project files and folder have been synchronized.
---

Java EE 109 Maven Dependencies

---
Java EE 109 Maven Dependencies
This tutorial is based on http://www.youtube.com/watch?v=PM-f8ROIhTU 
STEPS
1) Run Eclipse.
2) Open “J2eeapplication” Project.
3) Add New Maven Dependency item.
4) Troubleshooting Dependency Problem.

STEPS

1) Run Eclipse.

2) Open “J2eeapplication” Project.

3) Add New Maven Dependency item.

3.1) Right-click project name, select Mave/Add Dependency.
3.2) Type “hibernate-core”
Select 4.1.8-Final[jar]
3.3) Outcome:
3.3) Add Dependency “hibernate-validator”.
Select 4.2.0.Final[jar]
3.4) Outcome:
3.5) Manual Entry.
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0http://maven.apache.org/xsd/maven-4.0.0.xsd">
  <modelVersion>4.0.0</modelVersion>
  <groupId>com.example.j2eeapp</groupId>
  <artifactId>j2eeapplication</artifactId>
  <version>0.0.1-SNAPSHOT</version>
  <packaging>war</packaging>
  <name>J2EE Applications Example</name>
  <dependencies>
          <dependency>
                  <groupId>org.hibernate</groupId>
                  <artifactId>hibernate-core</artifactId>
                  <version>4.1.8.Final</version>
          </dependency>
          <dependency>
                  <groupId>org.hibernate</groupId>
                  <artifactId>hibernate-validator</artifactId>
                  <version>4.2.0.Final</version>
          </dependency>
          <dependency>
                  <groupId>junit</groupId>
                  <artifactId>junit</artifactId>
                  <version>4.8.2</version>
                  <scope>test</scope>
          </dependency>
          <dependency>
                  <groupId>org.springframework.webflow</groupId>
                  <artifactId>spring-webflow</artifactId>
                  <version>2.3.0.RELEASE</version>
          </dependency>
          <dependency>
                  <groupId>org.springframework.webflow</groupId>
                  <artifactId>spring-faces</artifactId>
                  <version>2.3.0.RELEASE</version>
          </dependency>
          <dependency>
                  <groupId>org.springframework</groupId>
                  <artifactId>spring-orm</artifactId>
                  <version>3.1.1</version>
          </dependency>
          <dependency>
                  <groupId>com.oracle</groupId>
                  <artifactId>ojdbc14</artifactId>
                  <version>10.2.0.1.0</version>
          </dependency>
          <dependency>
                  <groupId>log4j</groupId>
                  <artifactId>log4j</artifactId>
                  <version>1.2.16</version>
          </dependency>
          <dependency>
                  <groupId>com.sun.faces</groupId>
                  <artifactId>jsf-impl</artifactId>
                  <version>2.1.10</version>
          </dependency>
          <dependency>
                  <groupId>com.sun.facelets</groupId>
                  <artifactId>jsf-facelets</artifactId>
                  <version>1.1.14</version>
          </dependency>
          <dependency>
                  <groupId>com.sun.faces</groupId>
                  <artifactId>jsf-api</artifactId>
                  <version>2.1.10</version>
          </dependency>
          <dependency>
                  <groupId>commons-dbcp</groupId>
                  <artifactId>commons-dbcp</artifactId>
                  <version>20030825.184428</version>
          </dependency>
          <dependency>
                  <groupId>javax.servlet</groupId>
                  <artifactId>slf4j-log4j12</artifactId>
                  <version>1.6.4</version>
          </dependency>
          <dependency>
                  <groupId>org.springframework</groupId>
                  <artifactId>spring-tx</artifactId>
                  <version>3.0.5.RELEASE</version>
          </dependency>
          <dependency>
                  <groupId>xml-apis</groupId>
                  <artifactId>xml-apis</artifactId>
                  <version>1.3.02</version>
          </dependency>
          <dependency>
                  <groupId>org.springframework.security</groupId>
                  <artifactId>spring-security-web</artifactId>
                  <version>3.1.0.RELEASE</version>
          </dependency>
          <dependency>
                  <groupId>org.springframework.security</groupId>
                  <artifactId>spring-security-config</artifactId>
                  <version>3.1.0.RELEASE</version>
          </dependency>
          <dependency>
                  <groupId>org.primefaces</groupId>
                  <artifactId>primefaces</artifactId>
                  <version>3.4</version>
          </dependency>
          <dependency>
                  <groupId>cglib</groupId>
                  <artifactId>cglib</artifactId>
                  <version>2.2.2</version>
                  <scope>runtime</scope>
          </dependency>          
          <dependency>
                  <groupId>org.hibernate</groupId>
                  <artifactId>hibernate-entitymanager</artifactId>
                  <version>4.1.8.Final</version>
          </dependency>
</dependencies>
</project>

4) Troubleshooting Dependency Problem

4.1) primefaces could not be found
Solution: add external repositories on top of <dependencies> tag.
<repositories>
        <repository>
                <id>prime-repo<id>
                <name>PrimeFaces Maven Repository</name>
                <url>http://repository.primefaces.org</url>
        </repository>
</repositories>
4.2) Oracle ojdbc could not be found
Solution: download the ojdbc jar file from Oracle website and install manually using the following codes:
mvn install:install-file -DgroupId=com.oracle -DartifactId=ojdbc14 -Dversion=10.2.0.1.0 -Dpackaging=jar -Dfile=ojdbc14.jar -DgeneratePom=true
---