"Quickening the Pace of JSP Development" Tuesday, March 09, 2010
Home Products Pricing Company Contact Us Samples Download Forums Javadoc Customers
    « Form Tags »
    « I/O Tags »
    « Format Tags »
    « Utility Tags »
Ad Rotator Tag Example

The <dotj:adrotator> tag can be used to rotate advertisements on refreshes of your page. The ads are specified by a standard Java properties file. Impression values can be specified to give weight to certain ads.

Ad1




The above banner will rotate every time you refresh the page. There are three ads that rotate according to the following ratios:

  • Ad 1 will display 50% of the time.
  • Ad 2 will display 30% of the time.
  • Ad 3 will display 20% of the time.
The <dotj:adrotator> tag uses a Properties file for its settings. The following is the ads.properties file used for this example.


##############################################
# Ad 1: Tutorial Find
##############################################
Ad.1.ImageUrl=../../images/ad2.gif
Ad.1.NavigateUrl=http://www.tutorialfind.com
Ad.1.AlternateText=Ad1
Ad.1.Keyword=Computers
Ad.1.Impressions=50

##############################################
# Ad 2: HostJSP.com
##############################################
Ad.2.ImageUrl=../../images/ad1.gif
Ad.2.NavigateUrl=http://www.hostjsp.com
Ad.2.AlternateText=Ad2
Ad.2.Keyword=Hosting
Ad.2.Impressions=30

##############################################
# Ad 3: Peoplesoft
##############################################
Ad.3.ImageUrl=../../images/ad3.gif
Ad.3.NavigateUrl=http://www.peoplesoft.com
Ad.3.AlternateText=Ad3
Ad.3.Keyword=Computers
Ad.3.Impressions=20






          Back to Samples page


home : products : pricing : company : contact us : samples : download : forums : customers

Copyright © 2000-2004 dotJ Software Inc. All rights reserved.