Sei sulla pagina 1di 43

Library Managemen t java project This is a web application

used by librarians to handle typical operations in a library.

Technologie s and Products used NetBeans 5.0

Tomcat 5.5 embeded in NetBeans Oracle10g Express Edition Jboss 4.0.3

Java Server Pages (JSP) Java Beans Enterprise Java Beans The following are

the steps to related to be taken to run the existing part of the application :

Create lm account with password lm in Oracle10g Express Edition. This must be

done by after you log in as SYSTEM user. create user lm

identified by lm; grant connect,reso urce to lm;

Create required tables in lm account by using commands

in tables.sql file of lm.zip. Download lm.zip and unzip it into d:\lm directory.

You can substitue d:\ with another path if you like. Download library.zip

and unzip it into d:\library directory. You can substitue d:\ with another

path if you like. Start NetBeans 5.0 Add JBOSS Server with

NetBeans using Tools>Server Manager Copy ojdbc14.jar into

JBOSS_HOM E\server\def ault\lib directory. Configure Oracleds.xml in

default\depl oydirectory to add another local-txdatasource

entry as follows: <local-txdatasource> <jndiname>Libra

ryDS</jndiname> <connec tionurl>jdbc:ora cle:thin:@loc alhost:1521:

XE</connect ion-url> <driverclass>oracle .jdbc.driver. OracleDriver

</driverclass> <username>lm</ user-name>

<passwo rd>lm</pas sword> <excepti on-sorterclassname>org.j

boss.resourc e.adapter.jd bc.vendor.O racleExcepti onSorter</e xception-

sorter-classname> <meta data> <typ emapping>Or

acle9i</type -mapping> </meta data> </local-txdatasource>

Open library project in NetBeans using File>Open Project option.

Build library project. Copy library.jar of dist directory to server\defau

lt\deploy of JBoss. Start JBOSS 4.x Open lm project in NetBeans

using File>Open Project option. Add Oracle Library ojdbc14.jar,

Library Bean jar file library.jar and JOBSS_HOM E\client\jbos sall-client.jar

to this project. Build and deploy the project to embeded

Tomcat of NetBeans. Run this project - you must see index.jsp page.

Deploying Web Application In Tomcat of JBoss The following

procedure explains how to deploy a web application lm,

developed with Tomcat that is embeded with NetBeans to Tomcat

embeded in JBOSS application server. You better change port number at

which Tomcat in JBoss is running using JBOSS_HOM E\server\def

ault\deploy\j bosswebtomcat55.sa r\server.xml file. Change port number of HTTP

Container from 8080 to 9999. This is required as Oracle10g

also uses 8080. Copy lm.war from dist directory of lm project into

JBOSS_HOM E\server\def ault\deploy directory. Run the application

using the following url: http://local host:9999/l m

You should see login page of the application.

Potrebbero piacerti anche