Cost per Impression (CPM)


Web tier: servlets, JSP, Web frameworks: Cost per Impression (CPM)

  1. Cost per Impression (CPM) (1 messages)

    I would like to know how to design a programme(.jsp file), so that when a banner from any company is displayed to the user in a website, I can count the Impressions. When the Impressions are 1,000, I need to substract USD 0.01 from USD 100.

    I see this programme in Can any one help me? Can any one give me some source code for this?


    Threaded Messages (1)

  2. Cost per Impression (CPM)[ Go to top ]

    If yours is the code sending the image, I would recommend you use a servlet and not JSP. Set the content type on the response to image/gif (or whatever the format) and stream the image, but before you do, increment a counter. The code to do it is not complex. I recommend you seek out a tutorial on servlets and streaming out files other than typical html and text.