APTDC Accommodation Maintenance

This web application is used by AP Tourism Development Corporation to maintain the accommodataions (resorts and hotels) they have in different part of the country.

This application is used by staff of APTDC and each user is given a unique login name and password.

Technologies and Products used

Major Operations

The following are the major operations of this application:

Operation Description Related Files and Objects
Login page Allows user to log into the application using user name and password. login.jsp, UserBean Javabean
Home page Provides links to related operations. mainpage.jsp,home.jsp, links.jsp,UserBean Javabean
Change Password Allows user to change his/her password. changepassword.jsp, UserBean JavaBean
Log out Allows user to log out of the application. logout.jsp
Query Status of Rooms Finds out the availability of rooms based on the selected criteria search.jsp, Accommodations and RoomTypes custom tags
Booking room Books room based on the input. Takes information about customer. booking.jsp, bookfinal.jsp, Accommodations custom tag, CustomerBean Javabean
Vacating/Cancellation/Renewal of room Allows user to select accommodation and room number and display options. updateroomstatus.jsp, CustomerBean JavaBean, Accommodataions custom tag
Add Room Allows admin to add a new room addroom.jsp, RoomBean Javabean
Add Accommodation Allows a new accommodataion details to be added. addaccom.jsp, AccomBean JavaBean
Add Location Allows a new location details to be added addlocation.jsp, LocationBean JavaBean
Send News Letter Sends news letters to subscribers sendmessage.html, sendmessage.jsp

File Structure

The following is the directory structure of this application:

aptdc
 |- WEB-INF
 |    |-classes
 |    |    |-aptdc
 |    |       |- DBUtil.java
 |    |       |- CustomerBean.java
 |    |       |- UserBean.java
 |    |       |- RoomBean.java
 |    |       |- LocationBean.java
 |    |       |- AccomBean.java
 |    |       |- Accommodataion.java
 |    |       |- Locations.java
 |    |       |- RoomTypes.java
 |    |       |- Rooms.java
 |    |-lib
 |    |   |- classes111.jar
 |    |-web.xml
 |    |-aptdc.tld
 |- styles.css
 |- login.jsp
 |- home.jsp
 |- mainpage.jsp
 |- links.jsp
 |- addroom.jsp
 |- addaccom.jsp
 |- addlocation.jsp
 |- changepassword.jsp
 |- updateroomstatus.jsp
 |- search.jsp
 |- tables.sql
 |- getstatus.sql
 |- booking.jsp
 |- bookfinal.jsp
 |- sendmessage.html
 |- sendmessage.jsp

Steps To Run Application

The following are the steps to related to be taken to run this application :

  1. Download aptdc.zip and unzip it into webapps directory of Tomcat installation directory. A directory with the name aptdc is created.
  2. Make sure you copy classes111.zip ( after renaming it to classes111.jar) or classes12.jar into WEB-INF/lib directory
  3. Set the PATH and CLASSPATH using the batch file S.BAT that is placed in /WEB-INF/classes/aptdc directory. Make necessary changes to S.BAT according to location of JDK and TOMCAT in your system.
  4. Compile JavaBean in /WEB-INF/classes/aptdc directory as follows:
         javac *.java
       
  5. Create account aptdc with password aptdc in Oracle Database. If you cannot do this, you can still use SCOTT account with TIGER password. Then palce tables in SCOTT account instead of GROUPS account.
    Make sure you change username and password in DBUtil.java accordingly.
  6. Log onto Oracle using either aptdc account or scott account.
  7. Create required tables in Oracle using tables.sql file.
  8. Create stored function GETSTATUS by running GETSTATUS.SQL file from SQL*PLUS.
  9. Create files folder in webapps/groups directory.
  10. Make sure CMailServer is running and create email accounts for users in it.
  11. If you are using other than Tomcat 4.0 then copy JavaMail related jar files to WEB-INF/lib directory. You can down load JavaMail from java.sun.com.
  12. Run the application using the following url:
       http://localhost:8080/aptdc
     
  13. You should see login page of the application.

Deploying Application In Weblogic Server

Following the steps given below to deploy groups application in weblogic server 7.0 .
  1. Copy aptdc application to some directory inside Weblogic directory. This step is optional.
  2. Set PATH and CLASSPATH using ws.bat file that is in WEB-INF/classes/aptdc directory. Change PATH and CLASSPATH according to installation of Weblogic server in your system.
  3. Compile JavaBeans using
      javac *.java
     
  4. Start Weblogic server
  5. Goto Admin Console
  6. Select Web Applications Node in left side tree.
  7. Select Configure a new Web Application... from right side frame.
  8. Select directory where aptdc application is placed and click on Select link on the left of the directory.
  9. From available servers, select the server and click on right arrow.
  10. Click on Configure and Deploy button.
  11. Once Deployed columns shows True, you can access it as follows:

    http://localhost:7001/aptdc