The color test example below demonstrates how to use Java scripting elements in JSP.
The example allows the user to select a color from a list which sets the background color of the output page.
The online gas purchase store example below demonstrates how to use session in servlets.
This example accepts purchase details from user and adds them into the current purchases table.
The random redirector example below demonstrates how to redirect the servlet to other sites.
The example randomly redirects to other site, each time the servlet is invoked.