© 2001 BEA Systems, Inc.

com.bea.commerce.platform.ad
Class AdClickThruServlet

com.bea.commerce.platform.ad.AdClickThruServlet
All Implemented Interfaces:
AdConstants, AdContentProvider

public class AdClickThruServlet
implements AdContentProvider, AdConstants

This servlet tracks ad click thru events. It will create an AdClickThruEvent and then redirect to the target URL for the ad.

The ULR for the click thru must contain two parameters:

There are a set of metadata variables stored in the content manager which are used to control how the Ad is rendered.

adTarget may be set to 'newwindow' if the ad is to be displayed in a new browser window. Otherwise the adTarget will be displayed on the page where the request for the content is made.

The target of the click thru operation is defined either by the adTargetUrl or the adTargetContent depending upon source of the content.

An image map may be defined. It requires both the adMapName and the adMap attributes be defined.

If the adWinClose attribute is defined, the rendering will add a 'close window' link for the new window.


Fields inherited from interface com.bea.commerce.platform.ad.AdContentProvider
NEW_WINDOW, PREVIEW
 
Fields inherited from interface com.bea.commerce.platform.ad.AdConstants
AD_EVENT_TRACKING, AD_RENDERING, AD_SERVICE_NAME, ADBUCKET_DB_NAME, ADBUCKET_SERVICE_NAME, ADCOUNT_DB_NAME, CONFLICT_RESOLVER_NAME, EVENT_SERVICE_NAME, GLOBAL_ADBUCKET_NAME
 
Constructor Summary
AdClickThruServlet()
           
 
Method Summary
 void doGet(javax.servlet.http.HttpServletRequest request, com.bea.commerce.platform.ad.HttpServletResponse response)
          The doGet handles two types of content depending upon the 'type' parameter to the URL.
 java.lang.String renderContent(Content c, long identifier, java.lang.String servletBase, int height, int width, int options)
          return the XHTML content for the specified content
 

Constructor Detail

AdClickThruServlet

public AdClickThruServlet()
Method Detail

renderContent

public java.lang.String renderContent(Content c,
                                      long identifier,
                                      java.lang.String servletBase,
                                      int height,
                                      int width,
                                      int options)
                               throws AdContentException
return the XHTML content for the specified content
Specified by:
renderContent in interface AdContentProvider
Parameters:
c - The content element to render
identifier - Identifier ID for the record generating the ad
servletBase - The web app base on the server
height - The suggested height
width - The suggested width
options - The options for the renderer
Returns:
a String representing the XHTML content
Throws:
AdContentException - when there is a problem rendering the content

doGet

public void doGet(javax.servlet.http.HttpServletRequest request,
                  com.bea.commerce.platform.ad.HttpServletResponse response)
           throws com.bea.commerce.platform.ad.ServletException,
                  java.io.IOException
The doGet handles two types of content depending upon the 'type' parameter to the URL. If type='newwindow' then we create a new window and display the ad content there. Otherwise we do the ad click thru functionality.
Parameters:
request - The HTTP request object
response - the HTTP response object

© 2001 BEA Systems, Inc.

Copyright © 2001 BEA Systems, Inc. All Rights Reserved