Menu

Sunday, May 8, 2011

Programming Skills – VII (WTAD) 640012 p3


  1. Create a Java class called Product with the following properties: name, description,price. Create a listener that notifies (through System.out) whenever a user adds aproduct to a shopping cart (i.e. adds an object to the session object) or removes itagain. Hint: check out the class HttpSessionAttributeListener. Make it print the name and price of the object (hint: access the session through the HttpBindingEventobject). Also, let the listener print the total price of all objects saved in the session sofar (one way to accomplish this could be to keep a collection of all objects saved to the session – or just their keys – in the listener or an associated class).

  2. Create a servlet filter that logs all access to and from servlets in an application and prints the following to System.out:

    a. the time the request was received
    b. the time the response was sent
    c. how much time it took to process the request
    d. the URL of the resource requested
    e. the IP address of the visitor.

  3. Devlop a interest Calculation application in which user will provide all information in HTML form and that will be processed by servlet and response will be generated back to the user.

  4. Develop an application to demonstrate how the client (browser) can remember the last time it visited a page and displays the duration of time since its last visit. (Hint: use Cookie).


  5. Develop An application to write a “page – composite” JSP that includes other pages or passes control to another page.

  6. You want to reduce the amount of java coding in your JSP Using Java Bean component.

  7. Develop a program to perform the database driven operation like insert, Delete,
    Update and select. To perform the above operations create one table named
    Employee.
    Field Name Field Type
    EmpId Integer
    Empname Varchar
    Emp_desig Varchar
    Emp_J_Date Varchar
    Emp_Salary Numeric


  8. Develop a Java application to perform the database driven operation like insert, Delete, Update and selection using PreparedStatement. To perform the above operations use the table from exercise 28.

  9. Write a Java application to invoke a stored procedure using a CallableStatement. For this a stored procedure called incrementSalary may be developed to increase all the employees salary by a percentage specified in the parameter.


BACKNEXT



Prepared By:

Student of B. H. Gardi College of Eng. & Tech., MCA Department

(Nisarg Juthani, Kajal Savjani, Desai Paresh, Ramoliya Nilesh, Thanki Ravi.....)

No comments:

Post a Comment