您可以将Adsense中的javascript代码放在GWT开头的单个HTML页面中。这样,广告将不会显示在与GTW相同的区域中,而是在GWT代码上方/下方显示。对于广告来说可以。
此示例将横幅放在应用程序上方:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"><html> <head> <meta http-equiv="content-type" content="text/html; charset=UTF-8"> <title>www.javaoracleblog.com</title> <script type="text/javascript" language="javascript" src="com.javaoracleblog.aggregator.nocache.js"></script> </head> <body><script type="text/javascript"..ADsense pre here </script> <!-- OPTIONAL: include this if you want history support --> <iframe src="javascript:''" id="__gwt_historyframe" tabIndex='-1' ></iframe> </body></html>
为了向Google WT指示可以信任Google adsense的站点,您需要在-whitelist命令行参数中添加一个正则表达式匹配的URL。
请注意,这可能无法解决上述“我为什么转储GWT”文章中描述的问题。



