Wip Unit 3
Wip Unit 3
Disadvantages:
8) What is cookie?
A cookie is a piece of data from a website that is stored within a web browser that the
website can retrieve at a later time. Cookies are used to tell the server that users have returned
to a particular website.
10) What is the purpose of cookie?
Cookies make the interaction between users and websites faster and easier. Without
cookies, it would be very difficult for a website to allow a visitor to fill up a shopping cart or
to remember the user's preferences or registration details for a future visit.
Part B:(16m)
PROGRAM:
1)* Consider a database that has a table Employee with two columns Employee Id and Name.
Assume that the administrator user id and password to access to access the database table are
Scott and Tiger.Write a JDBC program that can query and print all entries in the
table employee. Make the database using type 2 driver database.driver and connection string
jdbc :db.oci.
3) Write a Java Servlet to display net salary of employee, use JDBC connectivity to get
employee details from database
4) Write a Java code for getting the details of the items to be purchased from a client and to
update the inventory of the shop after selling. Also bill should be prepared for the client.
Maintain the transaction table also just by inserting these purchase item details at the shop
use JDBC for transactions.
6) *Write a program that allows the user to select a favourite programming language and post
the choice to the server. The response is a web page in which the user can click a link to view
a list of book recommendations. The cookies previously stored on the client are read by the
servlet and form a web page containing the book recommendation. Use servlet cookies and
HTML.
6) Write a code to display the current and yesterday’s gold rate using session object