InterviewQuestions.com

This is a web application used by user to post questions that they were asked in interviews. It also allows users to manager his/her own interview details and questions. A user can search for interview questions based on different fields. Normal operations like registration, forgot password, change password, unregistration etc. are provided.

Major Operations

The following are the major operations of this portal:

Technologies and Products used

The following table lists operations and associated objects and files.

Operation Files Associated Objects
Home page home.jsp, interviews.jsp UserBean,Database
Listing Interviews interviews.jsp UserBean,DataBase
Change Password changepassword.jsp UserBean,DataBase
Change Profile changeprofile.jsp, changeprofilefinal.jsp UserBean,DataBase
Modify Interview Details modifyinterview.jsp,modifyinterviewfinal.jsp UserBean,Database,InterviewBean
Adding interview details addinterview.html, addinterview.jsp UserBean,Database, InterviewBean
Searching for InterviewQuestions searchquestions.jsp UserBean,Database,QuestionBean,InterviewBean
Registration of a user register.html,register.jsp Member EJB
Forgot password forgotpassword.jsp
Unregistration of a user unregister.html,unregister.jsp UserBean,Member EJB

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

  1. Download iq.zip and unzip it into webapps directory of Tomcat5 installation directory.
  2. Make sure you copy classes111.zip ( after renaming it to classes111.jar) or classes12.jar or ojdbc14.jar into WEB-INF/lib directory
  3. Compile javabeans in WEB-INF/classes/beans directory. Run batch file s.bat before compiling javabeans. You may have to make necessary changes to batch file depending on the directory structure of your system.
  4. Create account iq with password iq in Oracle Database. If you cannot do this, you can still use SCOTT account with TIGER password.
  5. Create required tables in Oracle using TABLES.TXT file and also insert some sample data.
  6. Make sure Oracle and Tomcat5 are running.
  7. Copy classes111.jar (renamed classes111.zip) or classes12.jar into JBOSS_HOME\server\default\lib directory.
  8. Start JBOSS 4.x
  9. Build ejb in ejb directory of iq directory using build.bat. Make necessary changes to build.bat before you run it.
  10. Make sure EJB is deployed sucessfully.
  11. Copy member.jar into WEB-INF/lib directory of classmates
  12. Copy jbossall-client.jar from JBOSS_HOME/client into common/lib directory of Tomcat.
  13. Copy oracle-ds.xml from JBOSS_HOME\docs\examples\jca into JBOSS_HOME\server\default\deploy directory.
  14. Add a new local-tx-datasource as follows under datasources tag as shown below. Change values according to your system settings.
      <local-tx-datasource>
          <jndi-name>IqDS</jndi-name>
          <connection-url>jdbc:oracle:thin:@localhost:1521:oracle8i</connection-url>
          <driver-class>oracle.jdbc.driver.OracleDriver</driver-class>
          <user-name>iq</user-name>
          <password>iq</password>
          <exception-sorter-class-name>org.jboss.resource.adapter.jdbc.vendor.OracleExceptionSorter</exception-sorter-class-name>
            <metadata>
               <type-mapping>Oracle8</type-mapping>
            </metadata>
      </local-tx-datasource>
    
  15. Start Tomcat
  16. Run the application using the following url:
       http://localhost:8080/iq/login.jsp
     
  17. You should see login page of the application.

Deploying Web Application In Tomcat of JBoss

The following procedure explains how to deploy a web application iq, developed with Standalone Tomcat, into Tomcat that is embeded into JBoss. This eliminates the need to use two servers - JBOSS and TOMCAT. Instead by starting JBOSS, we can use Web applications and related EJBs.