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