Git cleanup.

This commit is contained in:
Erik C. Thauvin 2017-06-07 14:45:06 -07:00
parent 3937236341
commit 324f5b1005
142 changed files with 0 additions and 204 deletions

View file

@ -0,0 +1,64 @@
Google Tag Library Examples README
==================================
Overview
========
This README file describes the Google Tag Library Examples web application.
This web application contains a collection of examples demonstrating the
usage of the Google JSP Tag Library. For more information about using the
custom tag library in your own web applications, point your browser to:
http://google-taglib.sourceforge.net/
See the "LICENSE.txt" file for licensing details.
The Google Tag Library uses the Google Web APIs, but is not associated with
or sponsored by Google, Inc.
Google Web APIs
===============
The Google Web APIs Java library is required in order to use the Google Tag
Library. The library's JAR file (googleapi.jar) should be placed into the
application's WEB-INF/lib directory.
http://www.google.com/apis/download.html
You must also register with Google (free) in order to obtain a license key.
The license key is required to access Google's Web Services.
https://www.google.com/accounts/NewAccount
Google License Key
==================
The license key can be specified as a context parameter in the web
application deployment descriptor (web.xml) as follows:
<context-param>
<param-name>google_key</param-name>
<param-value>000000000000000000000000</param-value>
</context-param>
The license key can also be temporarily specified from the index page of
the web application.
Examples
========
The following examples are included:
- Perform a simple Google search
- Perform an advanced Google search
- View a page cached by Google
- Perform a Google spelling suggestion
===========================================================================
$Id$

View file

@ -0,0 +1,38 @@
<?xml version="1.0"?>
<!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.2//EN" "http://java.sun.com/j2ee/dtds/web-app_2_2.dtd">
<web-app>
<display-name>google-examples</display-name>
<description>Google Examples Web Application</description>
<context-param>
<param-name>google_key</param-name>
<param-value/>
<description>The Google Web APIs client authorization key.</description>
</context-param>
<context-param>
<param-name>google_proxy_host</param-name>
<param-value/>
<description>The host to use as an HTTP proxy.</description>
</context-param>
<context-param>
<param-name>google_proxy_port</param-name>
<param-value/>
<description>The port to use as an HTTP proxy.</description>
</context-param>
<context-param>
<param-name>google_proxy_username</param-name>
<param-value/>
<description>The username required for the HTTP proxy.</description>
</context-param>
<context-param>
<param-name>google_proxy_password</param-name>
<param-value/>
<description>The password required for the HTTP proxy.</description>
</context-param>
<welcome-file-list>
<welcome-file>index.html</welcome-file>
</welcome-file-list>
<taglib>
<taglib-uri>/google-taglib</taglib-uri>
<taglib-location>/WEB-INF/google.tld</taglib-location>
</taglib>
</web-app>

View file

@ -0,0 +1,113 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Search Google</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<!--
Copyright (c) 2002-2003, Erik C. Thauvin
All rights reserved.
-->
<body bgcolor="#FFFFFF" text="#000000">
<form action="advanced.jsp" method="get">
<table cellspacing="0" cellpadding="3" border="0" width="99%">
<tr bgcolor="#cbdced">
<td>
<table width="100%" cellspacing="0" cellpadding="0" border="0">
<tr bgcolor="#cbdced">
<td>
<table width="100%" cellspacing="0" cellpadding="2">
<tr>
<td width="15%"><font size="-1"><b>Find results</b></font> </td>
<td width="85%">
<table width="100%" cellpadding="2" cellspacing="0">
<tr>
<td><font size="-1">with <b>all</b> of the words</font></td>
<td><input type="text" value="" name="q" size="25"></td>
<td valign="top" rowspan="4"><font size="-1">
<select name="maxResults">
<option value="1">1 result</option>
<option value="2">2 results</option>
<option value="5">5 results</option>
<option value="8">8 results</option>
<option value="10" selected>10 results</option>
</select>
<input type="submit" name="btnG" value="Google Search"></font>
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
<tr bgcolor="#ffffff">
<td>
<table width="100%" cellspacing="0" cellpadding="2">
<tr>
<td width="15%"><font size="-1"><b>Language</b></font></td>
<td width="40%"><font size="-1">Return pages written in</font></td>
<td><font size="-1">
<select name="lr">
<option value="">any language</option>
<option value="lang_ar">Arabic</option>
<option value="lang_bg">Bulgarian</option>
<option value="lang_ca">Catalan</option>
<option value="lang_zh-CN">Chinese&nbsp;(Simplified)</option>
<option value="lang_zh-TW">Chinese&nbsp;(Traditional)</option>
<option value="lang_hr">Croatian</option>
<option value="lang_cs">Czech</option>
<option value="lang_da">Danish</option>
<option value="lang_nl">Dutch</option>
<option value="lang_en">English</option>
<option value="lang_et">Estonian</option>
<option value="lang_fi">Finnish</option>
<option value="lang_fr">French</option>
<option value="lang_de">German</option>
<option value="lang_el">Greek</option>
<option value="lang_iw">Hebrew</option>
<option value="lang_hu">Hungarian</option>
<option value="lang_is">Icelandic</option>
<option value="lang_id">Indonesian</option>
<option value="lang_it">Italian</option>
<option value="lang_ja">Japanese</option>
<option value="lang_ko">Korean</option>
<option value="lang_lv">Latvian</option>
<option value="lang_lt">Lithuanian</option>
<option value="lang_no">Norwegian</option>
<option value="lang_pl">Polish</option>
<option value="lang_pt">Portuguese</option>
<option value="lang_ro">Romanian</option>
<option value="lang_ru">Russian</option>
<option value="lang_sr">Serbian</option>
<option value="lang_sk">Slovak</option>
<option value="lang_sl">Slovenian</option>
<option value="lang_es">Spanish</option>
<option value="lang_sv">Swedish</option>
<option value="lang_tr">Turkish</option>
</select>
</font>
</td>
</tr>
</table>
</td>
</tr>
<tr bgcolor="#ffffff">
<td>
<table width="100%" cellspacing="0" cellpadding="2">
<tr>
<td width="15%"><font size="-1"><b>SafeSearch</b></font></td>
<td colspan="2" nowrap><font size="-1"><input type="radio" checked name="safeSearch" value="">No filtering&nbsp;&nbsp;<input type="radio" value="true" name="safeSearch">Filter using SafeSearch</font></td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
</form>
</body>
</html>

View file

@ -0,0 +1,52 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<%@ taglib uri="/google-taglib" prefix="google" %>
<google:search/>
<html>
<head>
<title>Google Search: <google:searchQuery/></title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css">
<!--
body,td,div,.p,a{font-family:arial,sans-serif}
div,td{color:#000}
.f,.fl:link{color:#6f6f6f}
a:link,.w,a.w:link,.w a:link{color:#00c}
a:visited,.fl:visited{color:#551a8b}
a:active,.fl:active{color:#f00}
.b{font-size: 12pt; color:#00c; font-weight:bold}
//-->
</style>
</head>
<!--
Copyright (c) 2002-2003, Erik C. Thauvin
All rights reserved.
-->
<body bgcolor="#FFFFFF" text="#000000">
<table width="100%" border="0" cellpadding="2" cellspacing="0">
<tr>
<td bgcolor="#3366cc"><font size="-1" color="#ffffff">Searched the web for <b><google:searchQuery/></b>. &nbsp; </font></td>
<td bgcolor="#3366cc" align="right"><font size="-1" color="#ffffff">Results <b><google:startIndex/></b> - <b><google:endIndex/></b> of about <b><google:estimatedTotal/></b>. Search took <b><google:searchTime/></b> seconds.</font>
</table>
<google:searchResult>
<p><google:element name="title-url" target="_blank"/><br>
<font size="-1"><google:element name="snippet"/></font>
<br>
<span class="f"><font size="-1">Description:</font></span> <font size="-1"><google:element name="summary"/></font><br>
<span class="f"><font size="-1">Category:</font></span> <font size="-1"><a class="fl" href="http://directory.google.com/<google:element name="directoryCategoryName"/>" target="_blank"><google:element name="directoryCategoryName"/></a></font><br>
<font size="-1" color="#008000"><google:element name="staticQuery"/> - <a class="fl" href="cache.jsp?q=<google:element name="cachedQuery"/>" target="_blank">Cached</a> - <google:element name="cachedSize"/> - <a class="fl" href="advanced.jsp?q=<google:element name="relatedQuery"/>">Similar Pages</a></font>
</google:searchResult>
<p>
<table width="100%">
<tr>
<td align="left">
<google:previous css="b">Previous</google:previous>
&nbsp;
</td>
<td align="right">
&nbsp;
<google:next css="b">Next</google:next>
</td>
</tr>
</table>
</body>
</html>

View file

@ -0,0 +1,17 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Google Cached Page</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<!--
Copyright (c) 2002-2003, Erik C. Thauvin
All rights reserved.
-->
<body bgcolor="#FFFFFF" text="#000000">
<form action="cache.jsp" method="get">
<input maxLength="256" size="35" name="q" value="">&nbsp;
<input type="submit" value="Cached Page" name="btnG">
</form>
</body>
</html>

View file

@ -0,0 +1,2 @@
<%@ taglib uri="/google-taglib" prefix="google" %>
<google:cachedPage/>

View file

@ -0,0 +1,83 @@
<!doctype HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Google Tag Library Examples</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css">
<!--
body {font-family:arial,sans-serif}
-->
</style>
</head>
<!--
Copyright (c) 2002-2003, Erik C. Thauvin
All rights reserved.
-->
<body bgcolor="#FFFFFF" text="#000000">
<b><font size="+2">Google Tag Library Examples</font></b>
<p>
This is a collection of examples demonstrating the usage of the <a href="http://google-taglib.sourceforge.net">Google
JSP Tag Library</a>.
</p>
<p>
The Google Web APIs Java library is required in order to use the Google Tag
Library. The library's JAR file (<code>googleapi.jar</code>) should be placed
into the application's <code>WEB-INF/lib</code> directory.
</p>
<ul>
<li>
<a href="http://www.google.com/apis/download.html"><b>Download the Google Web
APIs developer's kit</b></a>
</li>
</ul>
<p>
You must also register with Google (free) in order to obtain a license key. The
license key is required to access Google's Web Services.
</p>
<ul>
<li>
<a href="https://www.google.com/accounts/NewAccount"><b>Sign up for a Google
account</b></a>
</ul>
<p>
The license key can be specified as a context parameter in the web application
deployment descriptor (<code>web.xml</code>) as follows:
</p>
<blockquote>
<pre>&lt;context-param&gt;<br> &lt;param-name&gt;google_key&lt;/param-name&gt;<br> &lt;param-value&gt;000000000000000000000000&lt;/param-value&gt;<br>&lt;/context-param&gt;</pre>
</blockquote>
<p>
The license key can also be temporarily specified using the following:
</p>
<ul>
<li>
<a href="key.html"><b>Set the Google Web APIs license key</b></a>
</li>
</ul>
<p>
The included examples will allow you to:
</p>
<ul>
<li>
<a href="search.html"><b>Perform a simple Google search</b></a>
</li>
<li>
<a href="advanced.html"><b>Perform an advanced Google search</b></a>
</li>
<li>
<a href="cache.html"><b>View a page cached by Google</b></a>
</li>
<li>
<a href="spelling.html"><b>Perform a Google spelling suggestion</b></a>
</li>
</ul>
<p>&nbsp;</p>
<p>
<small>The Google Tag Library uses the Google Web APIs, but is not associated with
or sponsored by Google, Inc.
<br>
Click <a href="LICENSE.txt">here</a> for licensing information.
</small>
</p>
</body>
</html>

16
google-examples/key.html Normal file
View file

@ -0,0 +1,16 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Set Google Key</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<!--
Copyright (c) 2002-2003, Erik C. Thauvin
All rights reserved.
-->
<body bgcolor="#FFFFFF" text="#000000">
<form action="key.jsp" method="post">
<input size="35" name="key" value="">&nbsp;<input type="submit" value="Set Google Key" name="btnG">
</form>
</body>
</html>

21
google-examples/key.jsp Normal file
View file

@ -0,0 +1,21 @@
<%
// Copyright (c) 2002-2003, Erik C. Thauvin
// All rights reserved.
String key = request.getParameter("key");
if ((key != null)&& (key.trim().length() > 0))
{
pageContext.setAttribute("google_key", key, PageContext.APPLICATION_SCOPE);
%>
<%@include file="advanced.html"%>
<%
}
else
{
%>
<%@include file="key.html"%>
<%
}
%>

View file

@ -0,0 +1,16 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Search Google</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<!--
Copyright (c) 2002-2003, Erik C. Thauvin
All rights reserved.
-->
<body bgcolor="#FFFFFF" text="#000000">
<form action="search.jsp" method="get">
<input type="hidden" name="maxResults" value="5"><input maxLength="255" size="35" name="q" value="">&nbsp;<input type="submit" value="Google Search" name="btnG">
</form>
</body>
</html>

View file

@ -0,0 +1,20 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<%@ taglib uri="/google-taglib" prefix="google" %>
<google:search/>
<html>
<head>
<title>Google Search: <google:searchQuery/></title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<!--
Copyright (c) 2002-2003, Erik C. Thauvin
All rights reserved.
-->
<body bgcolor="#FFFFFF" text="#000000">
<ol>
<google:searchResult>
<li><google:element name="title-url" target="_blank"/></li>
</google:searchResult>
</ol>
</body>
</html>

View file

@ -0,0 +1,16 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Google Spelling Suggestion</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<!--
Copyright (c) 2002-2003, Erik C. Thauvin
All rights reserved.
-->
<body bgcolor="#FFFFFF" text="#000000">
<form action="spelling.jsp" method="get">
<input maxLength="255" size="35" name="q" value="">&nbsp;<input type="submit" value="Spelling Suggestion" name="btnG">
</form>
</body>
</html>

View file

@ -0,0 +1,15 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<%@ taglib uri="/google-taglib" prefix="google" %>
<html>
<head>
<title>Google Spelling Suggestion</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<!--
Copyright (c) 2002-2003, Erik C. Thauvin
All rights reserved.
-->
<body bgcolor="#FFFFFF" text="#000000">
<google:spelling/>
</body>
</html>