For a business website, the advertising system is essential. A good advertising system is the basis for a website to stabilize revenue. and banner Advertising (banner) is the site advertising accounted for the vast majority of advertising, so the development of a banner advertising system is very important. With the Java Servlet we can easily build our own banner advertising system.
We usually put some pictures on the Web page, set their links to the Advertiser's Web page, and then generate log files to store the number of visitors, the browser's IP and other information, this is the development of the banner advertising system general ideas.
Next, I want to combine an example to explain how to use the Java servlet to build a banner ad system. In the following example, you must use the tag in your HTML file.
There are three ways to use it:
1) banner?config_file or Banner?config=config_file
For example:
In this way you can display a different picture.
2 You can also set your own redirected URL for each picture. Just add a file description to your setup, see the example below, and the servlet needs more descriptive parameters:
So you can support the standard banner ads.
3 You can also have multiple banner ads on the same page. You just need to add "id= an integer value" to the parameter. This value must be a unique integer value on your page! For example, the description for the first banner is:
The second one is: