All Questions


  1. 1st question.
    1. Explain the use of PreparedStatement with an appropriate example. (07 marks)
    2. List the types of drivers used in JDBC. Explain Thin driver. (03 marks)
  2. 2nd question.
    1. What is the purpose of HttpServletRequest and HttpServletResponse? Illustrate their usage using suitable code. (06 marks)
    2. Explain the purpose of RequestDispatcher using the methods forward() and include(). (04 marks)
  3. Third question.
    1. Explain JSP Object scope: (i) Page (ii) Request (iii) Session (iv) Application with example. (04 marks)
    2. Write short notes on JSTL- SQL tag library. (06 marks)
  4. Fourth question.
    1. What is OR mapping? Explain the components of the hibernate.cfg.xml file. (06 marks)
    2. What is HQL? How is it different from SQL? List its advantages. (04 marks)
  5. Fifth question.
    1. What are cookies? Demonstrate the use of cookies in Servlet. (07 marks)
    2. Discuss the use of execute(), executeUpdate() and executeQuery() methods. (03 marks)
  6. Sixth question.
    1. Create an XML file, document tree and DTD for a catalog of four-stroke motorbikes, where each motorbike has the following child-elements:
      1. make, model, year, color, engine, chassis number, accessories
      2. The engine element has the child elements engine number, number of cylinders, type of fuel
      3. The accessories element has the attributes disc brake, auto-start & radio, each of which is required and has the possible values yes and no
      4. Entities must be declared for the names of the popular motorbike make(05 marks)
    2. Explain the various components of well-formed XML. (05 marks)
  7. Seventh question.
    1. Write a servlet program for init method. Set the parameter value in the deployment descriptor. (06 marks)
    2. b. Differentiate ServletConfig and ServletContext objects. (04 marks)