Compare commits
1 commit
Author | SHA1 | Date | |
---|---|---|---|
7d63945d58 |
15
CHANGES.txt
|
@ -1,15 +0,0 @@
|
|||
Version 1.0.1 (released 20-Oct-2003)
|
||||
* Added a "type" attribute to the Search tag.
|
||||
- It can be used to specify the type of documents (e.g.: pdf) to be
|
||||
searched.
|
||||
* Changed the behavior of the SearchQuery Tag.
|
||||
- By default only the specified search keywords (or phrase) are
|
||||
returned. To return the full query (including preset site and
|
||||
file type options) the "type" attribute should be set to "full".
|
||||
|
||||
Version 1.0 (released 10-Oct-2003)
|
||||
* This is the first public release.
|
||||
* Added support for various HTTP Proxy configuration context parameters.
|
||||
|
||||
===========================================================================
|
||||
$Id$
|
|
@ -1,64 +0,0 @@
|
|||
Google Tag Library README (BUILD)
|
||||
=================================
|
||||
|
||||
|
||||
Overview
|
||||
========
|
||||
|
||||
This README file describes the Google Tag Library source distribution.
|
||||
|
||||
With the Google JSP Tag Library, developers and designers can easily
|
||||
incorporate Google queries, search results, cached pages and spelling
|
||||
suggestions into any web site or application.
|
||||
|
||||
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 build the Google
|
||||
Tag Library. The library's JAR file (googleapi.jar) should be placed into
|
||||
the lib directory.
|
||||
|
||||
http://www.google.com/apis/download.html
|
||||
|
||||
|
||||
Building the Source
|
||||
===================
|
||||
|
||||
The Google Tag Library is built using Ant.
|
||||
|
||||
http://ant.apache.org/
|
||||
|
||||
|
||||
To build the JAR, to do the following:
|
||||
|
||||
ant
|
||||
|
||||
To build the TLDs, do the following:
|
||||
|
||||
ant tlds
|
||||
|
||||
To build the release archives, do the following:
|
||||
|
||||
ant release
|
||||
|
||||
To build the Examples WAR, do the following:
|
||||
|
||||
ant examples
|
||||
|
||||
To list all available build targets, do the following:
|
||||
|
||||
ant -projecthelp
|
||||
|
||||
|
||||
===========================================================================
|
||||
$Id$
|
181
build.xml
|
@ -1,181 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project name="google" default="jar" basedir=".">
|
||||
<description>Google Tag Library</description>
|
||||
<!-- Load the properties -->
|
||||
<property file="build.properties"/>
|
||||
<!-- Build Locations -->
|
||||
<property name="build.library" value="${build.dir}/${project.name}"/>
|
||||
<property name="build.ex" value="${build.dir}/${ex.dir}"/>
|
||||
<property name="build.unit" value="${build.dir}/${unit.dir}"/>
|
||||
<property name="build.release" value="${build.dir}/${release.name}"/>
|
||||
<!-- Jar excludes directories and files -->
|
||||
<patternset id="jar.excludes">
|
||||
<exclude name="**/*.java"/>
|
||||
<exclude name="**/*.xml"/>
|
||||
<exclude name="**/*.html"/>
|
||||
<exclude name="**/.dependency-info/**"/>
|
||||
</patternset>
|
||||
<!-- Classpath -->
|
||||
<path id="classpath">
|
||||
<pathelement location="."/>
|
||||
<fileset dir="${lib.dir}">
|
||||
<include name="**/*.jar"/>
|
||||
<include name="**/*.zip"/>
|
||||
</fileset>
|
||||
</path>
|
||||
<!-- Prepare target -->
|
||||
<target name="prepare">
|
||||
<mkdir dir="${build.dir}"/>
|
||||
<mkdir dir="${dist.dir}"/>
|
||||
<mkdir dir="${javadoc.dir}"/>
|
||||
<mkdir dir="${tlddoc.dir}"/>
|
||||
</target>
|
||||
<!-- Compile target -->
|
||||
<target name="compile" depends="prepare" description="Compiles sources">
|
||||
<mkdir dir="${build.library}"/>
|
||||
<javac srcdir="${src.dir}" destdir="${build.library}" target="1.1">
|
||||
<classpath refid="classpath"/>
|
||||
</javac>
|
||||
</target>
|
||||
<!-- JAR target -->
|
||||
<target name="jar" depends="compile" description="Builds the JAR">
|
||||
<!-- Create the JAR -->
|
||||
<jar jarfile="${dist.dir}/${project.name}.jar">
|
||||
<fileset dir="${build.library}">
|
||||
<patternset refid="jar.excludes"/>
|
||||
</fileset>
|
||||
</jar>
|
||||
</target>
|
||||
<!-- TLDs target -->
|
||||
<target name="tlds" description="Builds the TLDs">
|
||||
<!-- Copy the TLDs -->
|
||||
<filter token="version" value="${version}"/>
|
||||
<copy file="${tlds.dir}/${project.name}.tld" todir="${dist.dir}" filtering="true"/>
|
||||
<copy file="${tlds.dir}/${project.name}-1.2.tld" todir="${dist.dir}" filtering="true"/>
|
||||
</target>
|
||||
<!-- Examples target -->
|
||||
<target name="examples" depends="jar,tlds" description="Builds the Examples WAR">
|
||||
<!-- Copy the WAR dir -->
|
||||
<copy todir="${build.ex}">
|
||||
<fileset dir="${ex.dir}"/>
|
||||
</copy>
|
||||
<!-- Copy the TLD -->
|
||||
<copy file="${dist.dir}/${project.name}.tld" todir="${build.ex}/WEB-INF"/>
|
||||
<!-- Copy the license -->
|
||||
<copy file="${licenses.dir}/${doc.license}" todir="${build.ex}"/>
|
||||
<!-- Copy the JAR -->
|
||||
<copy file="${dist.dir}/${project.name}.jar" todir="${build.ex}/WEB-INF/lib/"/>
|
||||
<!-- Freeze the mod dates -->
|
||||
<touch>
|
||||
<fileset dir="${build.ex}"/>
|
||||
</touch>
|
||||
<!-- Create the web archive -->
|
||||
<jar jarfile="${dist.dir}/${ex.dir}-${version}.war" basedir="${build.ex}"/>
|
||||
</target>
|
||||
<!-- TagUnit target -->
|
||||
<target name="tagunit" depends="jar,tlds" description="Builds the TagUnit WAR">
|
||||
<!-- Copy the WAR dir -->
|
||||
<copy todir="${build.unit}">
|
||||
<fileset dir="${unit.dir}"/>
|
||||
</copy>
|
||||
<!-- Copy the TLD -->
|
||||
<copy file="${dist.dir}/${project.name}.tld" todir="${build.unit}/WEB-INF"/>
|
||||
<!-- Copy the license -->
|
||||
<copy file="${licenses.dir}/${doc.license}" todir="${build.unit}"/>
|
||||
<!-- Copy the JAR -->
|
||||
<copy file="${dist.dir}/${project.name}.jar" todir="${build.unit}/WEB-INF/lib/"/>
|
||||
<!-- Copy the TagUnit lib -->
|
||||
<copy file="${lib.dir}/${unit.lib}" todir="${build.unit}/WEB-INF/lib/"/>
|
||||
<!-- Freeze the mod dates -->
|
||||
<touch>
|
||||
<fileset dir="${build.unit}"/>
|
||||
</touch>
|
||||
<!-- Create the web archive -->
|
||||
<jar jarfile="${dist.dir}/${unit.dir}-${version}.war" basedir="${build.unit}"/>
|
||||
</target>
|
||||
<!-- Release target -->
|
||||
<target name="release" depends="jar,tlds" description="Builds the release archives">
|
||||
<mkdir dir="${build.release}"/>
|
||||
<!-- Copy the TLD -->
|
||||
<filter token="version" value="${version}"/>
|
||||
<copy file="${tlds.dir}/${project.name}.tld" todir="${build.release}" filtering="true"/>
|
||||
<!-- Copy the license -->
|
||||
<copy file="${licenses.dir}/${doc.license}" todir="${build.release}"/>
|
||||
<!-- Copy the readme -->
|
||||
<copy file="${doc.readme}" todir="${build.release}"/>
|
||||
<!-- Copy the changes -->
|
||||
<copy file="${doc.changes}" todir="${build.release}"/>
|
||||
<!-- Copy the JAR -->
|
||||
<copy file="${dist.dir}/${project.name}.jar" todir="${build.release}"/>
|
||||
<!-- Freeze the mod dates -->
|
||||
<touch>
|
||||
<fileset dir="${build.release}"/>
|
||||
</touch>
|
||||
<!-- Create the ZIP archive -->
|
||||
<zip destfile="${dist.dir}/${release.name}.zip" basedir="${build.dir}" includes="${release.name}/**"/>
|
||||
<!-- Create the TAR archive -->
|
||||
<tar tarfile="${dist.dir}/${release.name}.tar.gz" compression="gzip">
|
||||
<tarfileset dir="${build.release}" prefix="${release.name}" mode="644"/>
|
||||
</tar>
|
||||
</target>
|
||||
<!-- Src target -->
|
||||
<target name="src" description="Builds the source archive">
|
||||
<!-- Create the TAR archive -->
|
||||
<tar tarfile="${dist.dir}/${release.name}-src.tar.gz" compression="gzip">
|
||||
<tarfileset dir="${basedir}" prefix="${release.name}">
|
||||
<include name="${src.dir}/**"/>
|
||||
<include name="${tlds.dir}/**"/>
|
||||
<include name="${lib.dir}/**"/>
|
||||
<include name="${licenses.dir}/**"/>
|
||||
<include name="${ex.dir}/**"/>
|
||||
<include name="${unit.dir}/**"/>
|
||||
<include name="${doc.readme}"/>
|
||||
<include name="${doc.changes}"/>
|
||||
<include name="${doc.src}"/>
|
||||
<include name="${doc.dir}/**"/>
|
||||
<include name="build.*"/>
|
||||
<exclude name="${src.excludes}"/>
|
||||
</tarfileset>
|
||||
</tar>
|
||||
</target>
|
||||
<!-- Javadoc target -->
|
||||
<target name="javadoc" depends="prepare" description="Builds the Javadoc">
|
||||
<delete quiet="true" includeEmptyDirs="true">
|
||||
<fileset dir="${javadoc.dir}" includes="*,*/**"/>
|
||||
</delete>
|
||||
<javadoc sourcepath="${src.dir}" destdir="${javadoc.dir}" packagenames="${javadoc.packages}" windowtitle="${javadoc.title}" verbose="false" failonerror="true" additionalparam="-breakiterator -tag created:Xt:"Created:"">
|
||||
<classpath refid="classpath"/>
|
||||
</javadoc>
|
||||
</target>
|
||||
<!-- TLDDoc target -->
|
||||
<target name="tlddoc" depends="prepare,tlds" description="Builds the TLD documentation">
|
||||
<delete quiet="true" includeEmptyDirs="true">
|
||||
<fileset dir="${tlddoc.dir}" includes="*,*/**"/>
|
||||
</delete>
|
||||
<java jar="${lib.dir}/tlddoc.jar" failonerror="true" fork="true">
|
||||
<arg line="-windowtitle "${javadoc.title}" -doctitle "${javadoc.title}" -d ${tlddoc.dir} ${dist.dir}/${project.name}-1.2.tld"/>
|
||||
</java>
|
||||
</target>
|
||||
<!-- DocCheck target -->
|
||||
<target name="doccheck" depends="prepare" description="Checks the Javadoc">
|
||||
<delete quiet="true" includeEmptyDirs="true">
|
||||
<fileset dir="${javadoc.dir}" includes="*,*/**"/>
|
||||
</delete>
|
||||
<javadoc sourcepath="${src.dir}" packagenames="${javadoc.packages}" destdir="${javadoc.dir}" verbose="false" failonerror="true" doclet="com.sun.tools.doclets.doccheck.DocCheck" docletpath="${lib.dir}/doccheck.jar">
|
||||
<classpath refid="classpath"/>
|
||||
</javadoc>
|
||||
</target>
|
||||
<!-- Clean Build target -->
|
||||
<target name="clean-build" description="Cleans the build directory">
|
||||
<delete quiet="true" includeEmptyDirs="true">
|
||||
<fileset dir="${build.dir}" includes="*,*/**"/>
|
||||
</delete>
|
||||
<mkdir dir="${build.library}"/>
|
||||
</target>
|
||||
<!-- Clean target -->
|
||||
<target name="clean" depends="clean-build" description="Cleans the build and dist directories">
|
||||
<delete quiet="true" includeEmptyDirs="true">
|
||||
<fileset dir="${dist.dir}" includes="*,*/**"/>
|
||||
</delete>
|
||||
</target>
|
||||
</project>
|
|
@ -1,38 +0,0 @@
|
|||
<?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>
|
|
@ -1,7 +1,5 @@
|
|||
build
|
||||
dist
|
||||
javadoc
|
||||
tlddoc
|
||||
*.bat
|
||||
key.txt
|
||||
ChangeLog
|
||||
key.txt
|
|
@ -1,7 +1,7 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<module version="4" relativePaths="false">
|
||||
<component name="LvcsConfiguration">
|
||||
<option name="LOCAL_VCS_ENABLED" value="false" />
|
||||
<option name="LOCAL_VCS_ENABLED" value="true" />
|
||||
<option name="LOCAL_VCS_PURGING_PERIOD" value="259200000" />
|
||||
</component>
|
||||
<component name="NewModuleRootManager">
|
|
@ -7,7 +7,7 @@
|
|||
</component>
|
||||
<component name="ProjectModuleManager">
|
||||
<modules>
|
||||
<module filepath="C:\projects\sourceforge\google-taglib\GoogleTagLib.iml" />
|
||||
<module filepath="$PROJECT_DIR$/GoogleTagLib.iml" />
|
||||
</modules>
|
||||
</component>
|
||||
<component name="libraryTable" />
|
||||
|
@ -80,15 +80,15 @@
|
|||
<root url="file://$PROJECT_DIR$/google-examples" name="google-examples" validate="false" />
|
||||
</component>
|
||||
<component name="DataSourceManager" />
|
||||
<component name="J2EEManager">
|
||||
<integrations />
|
||||
</component>
|
||||
<component name="ImportConfiguration">
|
||||
<option name="VENDOR" value="erik" />
|
||||
<option name="RELEASE_TAG" value="start" />
|
||||
<option name="LOG_MESSAGE" value="Initial import" />
|
||||
<option name="CHECKOUT_AFTER_IMPORT" value="false" />
|
||||
</component>
|
||||
<component name="Timestamp">
|
||||
<Timestamp type="block" place="atCaret" userText="Edited by ${user.name}:" timeFormat="dd-MMM-yyyy hh:mm:ss aa zz" />
|
||||
</component>
|
||||
<component name="uidesigner-configuration">
|
||||
<option name="INSTRUMENT_CLASSES" value="true" />
|
||||
</component>
|
|
@ -16,7 +16,6 @@
|
|||
<property name="MemberChooser.showClasses" value="true" />
|
||||
<property name="MemberChooser.sorted" value="false" />
|
||||
<property name="GoToFile.includeJavaFiles" value="false" />
|
||||
<property name="last_opened_file_path" value="C:\projects\Test" />
|
||||
<property name="GoToClass.toSaveIncludeLibraries" value="false" />
|
||||
</component>
|
||||
<component name="ToolWindowManager">
|
||||
|
@ -25,20 +24,19 @@
|
|||
<layout>
|
||||
<window_info id="BeanShell" active="false" anchor="bottom" auto_hide="true" internal_type="sliding" type="sliding" visible="false" weight="0.32972136" order="8" />
|
||||
<window_info id="JavaSig" active="false" anchor="bottom" auto_hide="false" internal_type="docked" type="docked" visible="false" weight="0.33" order="11" />
|
||||
<window_info id="CVS" active="false" anchor="bottom" auto_hide="false" internal_type="docked" type="docked" visible="false" weight="0.32970452" order="11" />
|
||||
<window_info id="Web" active="false" anchor="left" auto_hide="false" internal_type="docked" type="docked" visible="false" weight="0.31519508" order="2" />
|
||||
<window_info id="CVS" active="false" anchor="bottom" auto_hide="false" internal_type="docked" type="docked" visible="false" weight="0.32972136" order="11" />
|
||||
<window_info id="Web" active="false" anchor="left" auto_hide="false" internal_type="docked" type="docked" visible="false" weight="0.24948665" order="2" />
|
||||
<window_info id="Javadoc" active="false" anchor="right" auto_hide="true" internal_type="sliding" type="sliding" visible="false" weight="0.33028457" order="3" />
|
||||
<window_info id="TODO" active="false" anchor="bottom" auto_hide="false" internal_type="docked" type="docked" visible="false" weight="0.33126935" order="6" />
|
||||
<window_info id="Project" active="false" anchor="left" auto_hide="false" internal_type="docked" type="docked" visible="true" weight="0.26283368" order="0" />
|
||||
<window_info id="App Server" active="false" anchor="bottom" auto_hide="false" internal_type="docked" type="docked" visible="false" weight="0.33" order="11" />
|
||||
<window_info id="Project" active="false" anchor="left" auto_hide="false" internal_type="docked" type="docked" visible="false" weight="0.3059548" order="0" />
|
||||
<window_info id="Find" active="false" anchor="bottom" auto_hide="false" internal_type="docked" type="docked" visible="false" weight="0.32972136" order="1" />
|
||||
<window_info id="Structure" active="false" anchor="left" auto_hide="false" internal_type="docked" type="docked" visible="false" weight="0.28131416" order="1" />
|
||||
<window_info id="Find" active="false" anchor="bottom" auto_hide="false" internal_type="docked" type="docked" visible="false" weight="0.32970452" order="1" />
|
||||
<window_info id="Aspects" active="false" anchor="right" auto_hide="false" internal_type="docked" type="docked" visible="false" weight="0.33" order="4" />
|
||||
<window_info id="Messages" active="false" anchor="bottom" auto_hide="true" internal_type="sliding" type="sliding" visible="false" weight="0.33490565" order="9" />
|
||||
<window_info id="Inspection" active="false" anchor="bottom" auto_hide="false" internal_type="docked" type="docked" visible="false" weight="0.3993808" order="5" x="20" y="255" width="984" height="258" />
|
||||
<window_info id="DocBrowser" active="false" anchor="left" auto_hide="true" internal_type="sliding" type="sliding" visible="false" weight="1.0" order="3" />
|
||||
<window_info id="Ant Build" active="false" anchor="right" auto_hide="false" internal_type="docked" type="docked" visible="false" weight="0.20225872" order="1" />
|
||||
<window_info id="Run" active="false" anchor="bottom" auto_hide="false" internal_type="docked" type="docked" visible="false" weight="0.5209953" order="2" />
|
||||
<window_info id="Run" active="false" anchor="bottom" auto_hide="false" internal_type="docked" type="docked" visible="false" weight="0.52167183" order="2" />
|
||||
<window_info id="Hierarchy" active="false" anchor="right" auto_hide="false" internal_type="docked" type="docked" visible="false" weight="0.25" order="2" />
|
||||
<window_info id="CVS File View" active="false" anchor="right" auto_hide="false" internal_type="docked" type="docked" visible="false" weight="0.33" order="4" />
|
||||
<window_info id="Commander" active="false" anchor="right" auto_hide="false" internal_type="sliding" type="sliding" visible="false" weight="0.4004065" order="0" />
|
||||
|
@ -64,11 +62,18 @@
|
|||
<option name="HIDE_NOT_PUBLIC" value="false" />
|
||||
</component>
|
||||
<component name="ProjectViewSettings">
|
||||
<navigator currentView="ProjectPane" flattenPackages="false" showMembers="false" showModules="false" showLibraryContents="false" hideEmptyPackages="false" showStructure="false" autoscrollToSource="false" splitterProportion="0.5" />
|
||||
<navigator currentView="SourcepathPane" flattenPackages="false" showMembers="false" showStructure="false" autoscrollToSource="false" splitterProportion="0.5" />
|
||||
<view id="ProjectPane">
|
||||
<expanded_node type="directory" url="file://$PROJECT_DIR$" />
|
||||
</view>
|
||||
<view id="PackagesPane" />
|
||||
<view id="SourcepathPane">
|
||||
<expanded_node type="directory" url="file://$PROJECT_DIR$/src/net/thauvin/google/taglibs" />
|
||||
<expanded_node type="directory" url="file://$PROJECT_DIR$/src/net/thauvin/google" />
|
||||
<expanded_node type="directory" url="file://$PROJECT_DIR$/src/net" />
|
||||
<expanded_node type="directory" url="file://$PROJECT_DIR$/src" />
|
||||
<expanded_node type="directory" url="file://$PROJECT_DIR$/src/net/thauvin" />
|
||||
</view>
|
||||
<view id="ClasspathPane" />
|
||||
</component>
|
||||
<component name="Commander">
|
||||
<leftPanel view="Project" />
|
||||
|
@ -94,115 +99,19 @@
|
|||
<is-autoscroll-to-source value="true" />
|
||||
</todo-panel>
|
||||
</component>
|
||||
<component name="FileEditorManager" split-orientation="horizontal" split-proportion="0.5">
|
||||
<first-group selected-file="file://$PROJECT_DIR$/build.properties">
|
||||
<entry file="file://$PROJECT_DIR$/build.xml" pinned="false">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state line="12" column="34" selection-start="600" selection-end="600" vertical-scroll-proportion="-4.050934">
|
||||
<folding />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/build.properties" pinned="false">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state line="0" column="0" selection-start="0" selection-end="0" vertical-scroll-proportion="0.0">
|
||||
<folding />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
</first-group>
|
||||
<second-group />
|
||||
</component>
|
||||
<component name="editorHistoryManager">
|
||||
<entry file="file://$PROJECT_DIR$/src/net/thauvin/google/taglibs/EstimatedTotal.java">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state line="48" column="13" selection-start="1970" selection-end="1970" vertical-scroll-proportion="0.4025501">
|
||||
<folding />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/src/net/thauvin/google/taglibs/Spelling.java">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state line="52" column="13" selection-start="2053" selection-end="2053" vertical-scroll-proportion="0.21311475">
|
||||
<folding />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/src/net/thauvin/google/taglibs/CachedPage.java">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state line="87" column="8" selection-start="2437" selection-end="2989" vertical-scroll-proportion="0.6643234">
|
||||
<folding />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/src/net/thauvin/google/taglibs/StyleSupport.java">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state line="49" column="22" selection-start="1996" selection-end="1996" vertical-scroll-proportion="0.032786883">
|
||||
<folding />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/src/net/thauvin/google/TagUtility.java">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state line="147" column="53" selection-start="4211" selection-end="4211" vertical-scroll-proportion="1.010929">
|
||||
<folding>
|
||||
<element signature="imports" expanded="true" />
|
||||
</folding>
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/src/net/thauvin/google/taglibs/KeySupport.java">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state line="63" column="22" selection-start="2477" selection-end="2477" vertical-scroll-proportion="0.7741348">
|
||||
<folding />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/src/net/thauvin/google/taglibs/QuerySupport.java">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state line="55" column="45" selection-start="2226" selection-end="2226" vertical-scroll-proportion="0.54826957">
|
||||
<folding />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/tlds/google.tld">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state line="183" column="8" selection-start="5123" selection-end="5123" vertical-scroll-proportion="0.41086587">
|
||||
<folding />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/src/net/thauvin/google/taglibs/SearchResultSupport.java">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state line="114" column="16" selection-start="3167" selection-end="3167" vertical-scroll-proportion="0.3327674">
|
||||
<folding />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<component name="FileEditorManager" selected-file="file://$PROJECT_DIR$/src/net/thauvin/google/taglibs/Search.java">
|
||||
<entry file="file://$PROJECT_DIR$/src/net/thauvin/google/taglibs/Search.java">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state line="52" column="13" selection-start="2062" selection-end="2062" vertical-scroll-proportion="0.32088286">
|
||||
<state line="53" column="13" selection-start="2004" selection-end="2004" vertical-scroll-proportion="0.40202704">
|
||||
<folding />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
</component>
|
||||
<component name="editorHistoryManager">
|
||||
<entry file="file://$PROJECT_DIR$/src/net/thauvin/google/taglibs/SearchQuery.java">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state line="47" column="10" selection-start="1951" selection-end="1951" vertical-scroll-proportion="0.12563667">
|
||||
<folding />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/../../Test/Test.iws">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state line="0" column="0" selection-start="0" selection-end="20534" vertical-scroll-proportion="0.0">
|
||||
<folding />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/src/net/thauvin/google/GoogleSearchBean.java">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state line="52" column="36" selection-start="2150" selection-end="2150" vertical-scroll-proportion="0.31748727">
|
||||
<state line="47" column="13" selection-start="1930" selection-end="1930" vertical-scroll-proportion="0.2394636">
|
||||
<folding />
|
||||
</state>
|
||||
</provider>
|
||||
|
@ -216,7 +125,93 @@
|
|||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/build.xml">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state line="12" column="34" selection-start="600" selection-end="600" vertical-scroll-proportion="-4.050934">
|
||||
<state line="31" column="73" selection-start="982" selection-end="982" vertical-scroll-proportion="0.7162162">
|
||||
<folding />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/src/net/thauvin/google/taglibs/EndIndex.java">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state line="47" column="13" selection-start="1868" selection-end="1868" vertical-scroll-proportion="0.3445946">
|
||||
<folding />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/tlds/google.tld">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state line="0" column="43" selection-start="43" selection-end="43" vertical-scroll-proportion="-0.8006757">
|
||||
<folding />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/src/net/thauvin/google/taglibs/CachedPage.java">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state line="100" column="19" selection-start="2710" selection-end="2710" vertical-scroll-proportion="0.6612319">
|
||||
<folding />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/src/net/thauvin/google/taglibs/QuerySupport.java">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state line="60" column="16" selection-start="2207" selection-end="2207" vertical-scroll-proportion="-0.38586956">
|
||||
<folding />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/src/net/thauvin/google/taglibs/SearchResultSupport.java">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state line="183" column="19" selection-start="4595" selection-end="4595" vertical-scroll-proportion="0.6612319">
|
||||
<folding />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/src/net/thauvin/google/taglibs/Spelling.java">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state line="107" column="19" selection-start="2855" selection-end="2855" vertical-scroll-proportion="0.6612319">
|
||||
<folding />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/src/net/thauvin/google/taglibs/Element.java">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state line="61" column="22" selection-start="2144" selection-end="2144" vertical-scroll-proportion="0.17391305">
|
||||
<folding />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/src/net/thauvin/google/taglibs/KeySupport.java">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state line="76" column="22" selection-start="2632" selection-end="2632" vertical-scroll-proportion="0.17391305">
|
||||
<folding />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/src/net/thauvin/google/taglibs/StyleSupport.java">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state line="91" column="22" selection-start="2572" selection-end="2572" vertical-scroll-proportion="0.17391305">
|
||||
<folding />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/src/net/thauvin/google/TagUtility.java">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state line="62" column="31" selection-start="2215" selection-end="2215" vertical-scroll-proportion="-10.371622">
|
||||
<folding>
|
||||
<element signature="imports" expanded="true" />
|
||||
</folding>
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/src/net/thauvin/google/GoogleSearchBean.java">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state line="634" column="22" selection-start="17548" selection-end="17548" vertical-scroll-proportion="17.028717">
|
||||
<folding />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/src/net/thauvin/google/taglibs/Search.java">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state line="53" column="13" selection-start="2004" selection-end="2004" vertical-scroll-proportion="0.40202704">
|
||||
<folding />
|
||||
</state>
|
||||
</provider>
|
||||
|
@ -334,9 +329,6 @@
|
|||
<Port>5050</Port>
|
||||
<LaunchServer>false</LaunchServer>
|
||||
</configuration>
|
||||
<configuration name="<template>" type="WebLogic Instance" default="true" selected="false">
|
||||
<option name="WEBLOGIC_INSTANCE_CONFIGURATION_NAME" />
|
||||
</configuration>
|
||||
<configuration name="Main" type="Application" default="false" selected="true">
|
||||
<option name="MAIN_CLASS_NAME" value="net.thauvin.google.GoogleSearchBean" />
|
||||
<option name="VM_PARAMETERS" />
|
||||
|
@ -411,13 +403,6 @@
|
|||
<component name="WebViewSettings">
|
||||
<webview flattenPackages="false" showMembers="false" autoscrollToSource="false" />
|
||||
</component>
|
||||
<component name="J2EEViewSettings">
|
||||
<option name="SHOW_MEMBERS" value="false" />
|
||||
<option name="AUTOSCROLL" value="false" />
|
||||
<expandedElements>
|
||||
<node type="Project" info="" />
|
||||
</expandedElements>
|
||||
</component>
|
||||
<component name="AppServerRunManager" />
|
||||
<component name="Cvs2Configuration">
|
||||
<option name="REQUEST_FOR_COMMENTS" value="true" />
|
||||
|
@ -458,8 +443,13 @@
|
|||
<component name="JavadocPlugin.JavadocProjectComponent">
|
||||
<JavadocEntries>
|
||||
<JavadocEntry>
|
||||
<option name="path" value="$PROJECT_DIR$/../../../jdk1.3.1_09/docs/api/" />
|
||||
<option name="name" value="C/jdk1.3.1_09/docs/api/" />
|
||||
<option name="path" value="$PROJECT_DIR$/../../../../jdk1.3.1_08/docs/api/" />
|
||||
<option name="name" value="C/jdk1.3.1_08/docs/api/" />
|
||||
<option name="indexed" value="false" />
|
||||
</JavadocEntry>
|
||||
<JavadocEntry>
|
||||
<option name="path" value="$PROJECT_DIR$/../../../jdk1.3.1_08/docs/api/" />
|
||||
<option name="name" value="C/jdk1.3.1_08/docs/api/" />
|
||||
<option name="indexed" value="false" />
|
||||
</JavadocEntry>
|
||||
</JavadocEntries>
|
|
@ -1,5 +1,5 @@
|
|||
# Version
|
||||
version=1.0.1
|
||||
version=1.0
|
||||
|
||||
# Project
|
||||
project.name=google
|
||||
|
@ -12,28 +12,13 @@ dist.dir=dist
|
|||
lib.dir=lib
|
||||
tlds.dir=tlds
|
||||
licenses.dir=licenses
|
||||
|
||||
# Examples
|
||||
ex.dir=${project.name}-examples
|
||||
|
||||
# Source
|
||||
src.excludes=${lib.dir}/googleapi.jar
|
||||
|
||||
# TagUnit
|
||||
unit.lib=tagunit.jar
|
||||
unit.dir=${project.name}-tagunit
|
||||
war.dir=${project.name}-examples
|
||||
|
||||
# Javadoc
|
||||
javadoc.dir=javadoc
|
||||
javadoc.title=Google Tag Library
|
||||
javadoc.packages=net.thauvin.google.*
|
||||
|
||||
# TLDDoc
|
||||
tlddoc.dir=tlddoc
|
||||
|
||||
# Docs
|
||||
doc.dir=htdocs
|
||||
doc.license=LICENSE.txt
|
||||
doc.readme=README.txt
|
||||
doc.src=README-BUILD.txt
|
||||
doc.changes=CHANGES.txt
|
||||
doc.readme=README.txt
|
|
@ -1,11 +1,11 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project name="google-rss" default="jar" basedir=".">
|
||||
<description>Google RSS Tag Library</description>
|
||||
<project name="google" default="jar" basedir=".">
|
||||
<description>Google Tag Library</description>
|
||||
<!-- Load the properties -->
|
||||
<property file="build.properties"/>
|
||||
<!-- Build Locations -->
|
||||
<property name="build.library" value="${build.dir}/${project.name}"/>
|
||||
<property name="build.ex" value="${build.dir}/${ex.dir}"/>
|
||||
<property name="build.war" value="${build.dir}/${war.dir}"/>
|
||||
<property name="build.release" value="${build.dir}/${release.name}"/>
|
||||
<!-- Jar excludes directories and files -->
|
||||
<patternset id="jar.excludes">
|
||||
|
@ -17,7 +17,6 @@
|
|||
<!-- Classpath -->
|
||||
<path id="classpath">
|
||||
<pathelement location="."/>
|
||||
<pathelement location="${google.jar}"/>
|
||||
<fileset dir="${lib.dir}">
|
||||
<include name="**/*.jar"/>
|
||||
<include name="**/*.zip"/>
|
||||
|
@ -25,14 +24,14 @@
|
|||
</path>
|
||||
<!-- Prepare target -->
|
||||
<target name="prepare">
|
||||
<ant dir="${google.dir}" inheritAll="false" inheritRefs="false" target="${google.target}"/>
|
||||
<mkdir dir="${build.dir}"/>
|
||||
<mkdir dir="${dist.dir}"/>
|
||||
<mkdir dir="${javadoc.dir}"/>
|
||||
</target>
|
||||
<!-- Compile target -->
|
||||
<target name="compile" depends="prepare" description="Compiles sources">
|
||||
<mkdir dir="${build.library}"/>
|
||||
<javac srcdir="${src.dir}" destdir="${build.library}" target="1.2">
|
||||
<javac srcdir="${src.dir}" destdir="${build.library}" target="1.1">
|
||||
<classpath refid="classpath"/>
|
||||
</javac>
|
||||
</target>
|
||||
|
@ -45,79 +44,60 @@
|
|||
</fileset>
|
||||
</jar>
|
||||
</target>
|
||||
<!-- TLD target -->
|
||||
<target name="tld" description="Builds the TLD">
|
||||
<!-- Copy the TLDs -->
|
||||
<!-- WAR target -->
|
||||
<target name="war" depends="jar" description="Builds the WAR">
|
||||
<!-- Copy the WAR dir -->
|
||||
<copy todir="${build.war}">
|
||||
<fileset dir="${war.dir}"/>
|
||||
</copy>
|
||||
<!-- Copy the TLD -->
|
||||
<filter token="version" value="${version}"/>
|
||||
<copy file="${tlds.dir}/${project.name}.tld" todir="${dist.dir}" filtering="true"/>
|
||||
<copy file="${tlds.dir}/${project.name}.tld" todir="${build.war}/WEB-INF" filtering="true"/>
|
||||
<!-- Copy the license -->
|
||||
<copy file="${licenses.dir}/${doc.license}" todir="${build.war}"/>
|
||||
<!-- Copy the JAR -->
|
||||
<copy file="${dist.dir}/${project.name}.jar" todir="${build.war}/WEB-INF/lib/"/>
|
||||
<!-- Create the web archive -->
|
||||
<jar jarfile="${dist.dir}/${war.dir}-${version}.war" basedir="${build.war}"/>
|
||||
</target>
|
||||
<!-- Release target -->
|
||||
<target name="release" depends="jar,tld" description="Builds the release archives">
|
||||
<target name="release" depends="jar" description="Builds the release distribution">
|
||||
<mkdir dir="${build.release}"/>
|
||||
<!-- Copy the TLD -->
|
||||
<filter token="version" value="${version}"/>
|
||||
<copy file="${tlds.dir}/${project.name}.tld" todir="${build.release}" filtering="true"/>
|
||||
<!-- Copy the license -->
|
||||
<copy file="${licenses.dir}/${doc.license}" todir="${build.release}"/>
|
||||
<!-- Copy the readme -->
|
||||
<copy file="${doc.readme}" todir="${build.release}"/>
|
||||
<!-- Copy the license -->
|
||||
<copy file="${doc.license}" todir="${build.release}"/>
|
||||
<!-- Copy the JAR -->
|
||||
<copy file="${dist.dir}/${project.name}.jar" todir="${build.release}"/>
|
||||
<!-- Freeze the mod dates -->
|
||||
<touch>
|
||||
<fileset dir="${build.release}"/>
|
||||
</touch>
|
||||
<!-- Create the ZIP archive -->
|
||||
<zip destfile="${dist.dir}/${release.name}.zip" basedir="${build.dir}" includes="${release.name}/**"/>
|
||||
<!-- Create the TAR archive -->
|
||||
<tar tarfile="${dist.dir}/${release.name}.tar.gz" compression="gzip">
|
||||
<tarfileset dir="${build.release}" prefix="${release.name}" mode="644"/>
|
||||
</tar>
|
||||
<zip destfile="${dist.dir}/${release.name}.zip" basedir="${build.release}"/>
|
||||
</target>
|
||||
<!-- Examples target -->
|
||||
<target name="examples" depends="jar,tld" description="Builds the Examples WAR">
|
||||
<!-- Copy the WAR dir -->
|
||||
<copy todir="${build.ex}">
|
||||
<fileset dir="${ex.dir}"/>
|
||||
</copy>
|
||||
<!-- Copy the TLD -->
|
||||
<copy file="${dist.dir}/${project.name}.tld" todir="${build.ex}/WEB-INF"/>
|
||||
<!-- Copy the license -->
|
||||
<copy file="${doc.license}" todir="${build.ex}"/>
|
||||
<!-- Copy the JAR -->
|
||||
<copy file="${dist.dir}/${project.name}.jar" todir="${build.ex}/WEB-INF/lib/"/>
|
||||
<!-- Copy the Google JAR -->
|
||||
<copy file="${google.jar}" todir="${build.ex}/WEB-INF/lib/"/>
|
||||
<!-- Copy the Google TLD -->
|
||||
<copy file="${google.tld}" todir="${build.ex}/WEB-INF/"/>
|
||||
<!-- Freeze the mod dates -->
|
||||
<touch>
|
||||
<fileset dir="${build.ex}"/>
|
||||
</touch>
|
||||
<!-- Create the web archive -->
|
||||
<jar jarfile="${dist.dir}/${ex.dir}-${version}.war" basedir="${build.ex}"/>
|
||||
<!-- Javadoc target -->
|
||||
<target name="javadoc" depends="prepare" description="Builds the Javadoc">
|
||||
<delete quiet="true" includeEmptyDirs="true">
|
||||
<fileset dir="${javadoc.dir}" includes="*,*/**"/>
|
||||
</delete>
|
||||
<javadoc sourcepath="${src.dir}" destdir="${javadoc.dir}" packagenames="${javadoc.packages}" windowtitle="${javadoc.title}" verbose="false" failonerror="true" additionalparam="-breakiterator -tag created:Xt:"Created:"">
|
||||
<classpath refid="classpath"/>
|
||||
</javadoc>
|
||||
</target>
|
||||
<!-- Src target -->
|
||||
<target name="src" description="Builds the source archive">
|
||||
<!-- Create the TAR archive -->
|
||||
<tar tarfile="${dist.dir}/${release.name}-src.tar.gz" compression="gzip">
|
||||
<tarfileset dir="${basedir}" prefix="${release.name}">
|
||||
<include name="${src.dir}/**"/>
|
||||
<include name="${tlds.dir}/**"/>
|
||||
<include name="${ex.dir}/**"/>
|
||||
<include name="${doc.readme}"/>
|
||||
<include name="${doc.license}"/>
|
||||
<include name="${doc.src}"/>
|
||||
<include name="build.*"/>
|
||||
</tarfileset>
|
||||
</tar>
|
||||
<!-- DocCheck target -->
|
||||
<target name="doccheck" depends="prepare" description="Checks the Javadoc">
|
||||
<delete quiet="true" includeEmptyDirs="true">
|
||||
<fileset dir="${javadoc.dir}" includes="*,*/**"/>
|
||||
</delete>
|
||||
<javadoc sourcepath="${src.dir}" packagenames="${javadoc.packages}" destdir="${javadoc.dir}" verbose="false" failonerror="true" doclet="com.sun.tools.doclets.doccheck.DocCheck" docletpath="${lib.dir}\doccheck.jar">
|
||||
<classpath refid="classpath"/>
|
||||
</javadoc>
|
||||
</target>
|
||||
<!-- Clean Build target -->
|
||||
<target name="clean-build" description="Cleans the build directory">
|
||||
<delete quiet="true" includeEmptyDirs="true">
|
||||
<fileset dir="${build.dir}" includes="*,*/**"/>
|
||||
</delete>
|
||||
<mkdir dir="${build.library}"/>
|
||||
</target>
|
||||
<!-- Clean target -->
|
||||
<target name="clean" depends="clean-build" description="Cleans the build and dist directories">
|
18
google-taglib/google-examples/WEB-INF/web.xml
Normal file
|
@ -0,0 +1,18 @@
|
|||
<?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>
|
||||
<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>
|
|
@ -9,7 +9,7 @@ body,td,font,p,a{font-family:arial,sans-serif}
|
|||
<body class="siteowners" bgcolor="#ffffff" text="#000000" link="#0000CC" vlink="#800080" alink="#ff0000" topmargin="2">
|
||||
<table width="95%" border="0" cellspacing="0" cellpadding="2">
|
||||
<tr>
|
||||
<td width="1%"><a href="index.html"><img src="images/google_sm.gif" border="0" width="143" height="37" alt="Return to the Google Tag Library homepage." vspace="5"></a>
|
||||
<td width="1%"><a href="index.html"><img src="images/google-logo.png" border="0" width="143" height="37" alt="Return to Google homepage." vspace="5"></a>
|
||||
</td>
|
||||
<td valign="middle" bgcolor="#eeeeee"><h1 style="margin-top:10px">
|
||||
<table width="100%">
|
||||
|
@ -23,39 +23,35 @@ body,td,font,p,a{font-family:arial,sans-serif}
|
|||
<table border="0" cellpadding="0" cellspacing="0" width="95%">
|
||||
<tr>
|
||||
<td width="143" valign="top">
|
||||
<p>
|
||||
<small><br>
|
||||
<a href="index.html">Overview</a> <br>
|
||||
<a href="http://sourceforge.net/project/showfiles.php?group_id=90444">Download</a> <br>
|
||||
<a href="docs.html">Documentation</a> <br>
|
||||
<a href="howto.html">HowTo</a> <br>
|
||||
<a href="javadoc/index.html">Javadoc</a> <br>
|
||||
<a href="tlddoc/index.html">TLD</a><br>
|
||||
<a href="uml.html">UML</a></br>
|
||||
<img src="images/yellowarrow.gif" alt="arrow" width="4" height="8"><b> <font color="#cc9900">About</font></b>
|
||||
</small>
|
||||
</p>
|
||||
<img width="145" height="0" alt="">
|
||||
<p>
|
||||
<table cellpadding="1" width="120">
|
||||
<tr>
|
||||
<td style="background-color: #efefef"><small>
|
||||
<div class="sidesearch">
|
||||
<form action="http://www.thauvin.net/gtlib-search/search.jsp" method="post">
|
||||
<!-- <div class="sidesearch">
|
||||
<form action="http://googlesite.google.com/search" method="get">
|
||||
<div align="center">
|
||||
<font size="-2">
|
||||
<font size="-2"><input type="hidden" name="output" value="googleabout"><input type="hidden" name="site" value="googlesite">
|
||||
<i>Find on this site:</i><br>
|
||||
<input type="text" name="q" size="10"><br><input type="submit" value="Search" name="submit">
|
||||
<br>
|
||||
</font>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div> -->
|
||||
</small>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<p>
|
||||
<a href="http://sourceforge.net/projects/google-taglib"><img src="http://sourceforge.net/sflogo.php?group_id=9044&type=1" width="88" height="31" border="0" alt="SourceForge.net Logo"/></a>
|
||||
</p>
|
||||
</td>
|
||||
<td style="background-color: #cccccc" width="1" valign="top"><img alt="" width="1" height="1"></td>
|
||||
<td style="background-color: #ffffff" width="10" valign="top"><img alt="" width="1" height="1"></td>
|
||||
|
@ -78,9 +74,6 @@ body,td,font,p,a{font-family:arial,sans-serif}
|
|||
<li>
|
||||
<a href="http://www.dynamicobjects.com/d2r/">Diego Doval</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="http://www.jroller.com/page/arjunram/">Arjun Ram</a>
|
||||
</li>
|
||||
</ul>
|
||||
</font>
|
||||
<p>
|
|
@ -11,7 +11,7 @@ code {font-size:10pt}
|
|||
<body class="siteowners" bgcolor="#ffffff" text="#000000" link="#0000CC" vlink="#800080" alink="#ff0000" topmargin="2">
|
||||
<table width="95%" border="0" cellspacing="0" cellpadding="2">
|
||||
<tr>
|
||||
<td width="1%"><a href="index.html"><img src="images/google_sm.gif" border="0" width="143" height="37" alt="Return to the Google Tag Library homepage." vspace="5"></a></td>
|
||||
<td width="1%"><a href="index.html"><img src="images/google_sm.gif" border="0" width="143" height="37" alt="Return to Google homepage." vspace="5"></a></td>
|
||||
<td valign="middle" bgcolor="#eeeeee"><h1 style="margin-top:10px">
|
||||
<table width="100%">
|
||||
<tr>
|
||||
|
@ -28,38 +28,35 @@ code {font-size:10pt}
|
|||
<table border="0" cellpadding="0" cellspacing="0" width="95%">
|
||||
<tr>
|
||||
<td width="143" valign="top">
|
||||
<p>
|
||||
<small><br>
|
||||
<a href="index.html">Overview</a> <br>
|
||||
<a href="http://sourceforge.net/project/showfiles.php?group_id=90444">Download</a> <br>
|
||||
<img src="images/yellowarrow.gif" alt="arrow" width="4" height="8"><b> <font color="#CC9900">Documentation</font></b><br>
|
||||
<img src="images/yellowarrow.gif" alt="arrow" width="4" height="8"><b> <font color="#CC9900">Documentation</font></b>
|
||||
<br>
|
||||
<a href="howto.html">HowTo</a> <br>
|
||||
<a href="javadoc/index.html">Javadoc</a> <br>
|
||||
<a href="tlddoc/index.html">TLD</a><br>
|
||||
<a href="uml.html">UML</a></br>
|
||||
<a href="about.html">About</a> </small>
|
||||
</p>
|
||||
<img width="145" height="0" alt="">
|
||||
<p>
|
||||
<table cellpadding="1" width="120">
|
||||
<tr>
|
||||
<td style="background-color: #efefef"><small>
|
||||
<div class="sidesearch">
|
||||
<form action="http://www.thauvin.net/gtlib-search/search.jsp" method="post">
|
||||
<!-- <div class="sidesearch">
|
||||
<form action="http://googlesite.google.com/search" method="get">
|
||||
<div align="center">
|
||||
<font size="-2">
|
||||
<font size="-2"><input type="hidden" name="output" value="googleabout"><input type="hidden" name="site" value="googlesite">
|
||||
<i>Find on this site:</i><br>
|
||||
<input type="text" name="q" size="10"><br><input type="submit" value="Search" name="submit">
|
||||
<br>
|
||||
</font>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div> -->
|
||||
</small>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<p>
|
||||
<a href="http://sourceforge.net/projects/google-taglib"><img src="http://sourceforge.net/sflogo.php?group_id=9044&type=1" width="88" height="31" border="0" alt="SourceForge.net Logo"/></a>
|
||||
</p>
|
||||
</td>
|
||||
<td style="background-color: #cccccc" width="1" valign="top"><img alt="" width="1" height="1"></td>
|
||||
<td style="background-color: #ffffff" width="10" valign="top"><img alt="" width="1" height="1"></td>
|
||||
|
@ -78,8 +75,7 @@ code {font-size:10pt}
|
|||
<blockquote>
|
||||
<font size="-1">1.1 <a href="#1_1">Installation</a><br>
|
||||
1.2 <a href="#1_2">Google API Library</a><br>
|
||||
1.3 <a href="#1_3">TagLib Directive </a><br>
|
||||
1.4 <a href="#1_4">HTTP Proxy</a></font>
|
||||
1.3 <a href="#1_3">TagLib Directive </a></font>
|
||||
</blockquote>
|
||||
<p>
|
||||
<font size="-1"><b> 2. <a href="#search">Search Tags </a></b></font>
|
||||
|
@ -210,31 +206,6 @@ code {font-size:10pt}
|
|||
<blockquote>
|
||||
<pre><%@taglib uri="/google-taglib" prefix="google"%></pre>
|
||||
</blockquote>
|
||||
<p>
|
||||
<a name="1_4"></a>
|
||||
<table bgcolor="#fff9e4" cellpadding="2" width="100%" border="0">
|
||||
<tr>
|
||||
<td style="background-color: #fff9e4" width="80%"><b>1.4 HTTP Proxy</b></td>
|
||||
<td style="background-color: #fff9e4" width="20%" nowrap><font size="-1"><a href="#top">Back
|
||||
to top</a> </font></td>
|
||||
</tr>
|
||||
</table>
|
||||
<p>
|
||||
<font size="-1">An HTTP Proxy server can be specified using context parameters in your
|
||||
web application deployment descriptor (<code>web.xml</code>) as follows:</font>
|
||||
<blockquote>
|
||||
<pre><context-param><br> <param-name>google_proxy_host</param-name><br> <param-value>proxy.example.com</param-value><br></context-param></pre>
|
||||
<pre><context-param><br> <param-name>google_proxy_port</param-name><br> <param-value>3128</param-value><br></context-param></pre>
|
||||
</blockquote>
|
||||
<p>
|
||||
<font size="-1">Similarly, the HTTP Proxy user name and password (if any) may be specified using:</font>
|
||||
<blockquote>
|
||||
<pre><context-param><br> <param-name>google_proxy_username</param-name><br> <param-value>john</param-value><br></context-param></pre>
|
||||
<pre><context-param><br> <param-name>google_proxy_password</param-name><br> <param-value>opensesame</param-value><br></context-param></pre>
|
||||
</blockquote>
|
||||
<p>
|
||||
<font size="-1">Please note that the Google Web APIs automatically check the standard <code>http.proxyHost</code>
|
||||
and <code>http.proxyPort</code> Java system properties.</font>
|
||||
</blockquote>
|
||||
<p>
|
||||
<a name="search" id="search"></a>
|
||||
|
@ -375,7 +346,7 @@ code {font-size:10pt}
|
|||
<tr>
|
||||
<td>
|
||||
<div align="center">
|
||||
<font size="-1"><b>restrict</b></font>
|
||||
<font size="-1"><b>restricts</b></font>
|
||||
</div>
|
||||
</td>
|
||||
<td><font size="-1">Restricts the search to a subset of the Google web index,
|
||||
|
@ -430,22 +401,13 @@ code {font-size:10pt}
|
|||
<tr>
|
||||
<td>
|
||||
<div align="center">
|
||||
<font size="-1"><a name="2_1_site"><b>site</b></a></font>
|
||||
<font size="-1"><b>site</b></font>
|
||||
</div>
|
||||
</td>
|
||||
<td><font size="-1">Restricts the search to documents within the specified
|
||||
<td><font size="-1">Restricts the search to documents within the specfied
|
||||
site.</font></td>
|
||||
<td> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<div align="center">
|
||||
<font size="-1"><a name="2_1_filetype"><b>type</b></a></font>
|
||||
</div>
|
||||
</td>
|
||||
<td><font size="-1">Specifies the <a href="http://www.google.com/help/faq_filetypes.html">file type</a> to be searched. (e.g.: pdf)</font></td>
|
||||
<td> </td>
|
||||
</tr>
|
||||
</table>
|
||||
<p>
|
||||
<font size="-1">For detailed information on the above Google search options,
|
||||
|
@ -678,9 +640,12 @@ code {font-size:10pt}
|
|||
</table>
|
||||
<p>
|
||||
<font size="-1">The <code><google:next/></code> tag is used to
|
||||
|
||||
|
||||
used to display a link to more search results.<br>
|
||||
The <code><google:previous/></code> tag is used to used to display a link
|
||||
to previous search results.</font>
|
||||
|
||||
<p>
|
||||
<font size="-1"><strong>Tag Syntax</strong></font>
|
||||
<p>
|
||||
|
@ -739,8 +704,11 @@ code {font-size:10pt}
|
|||
</tr>
|
||||
</table>
|
||||
<p>
|
||||
<font size="-1">The <code><google:searchComments/></code>
|
||||
tag is used to display the comments (if any) included with the current result set.</font>
|
||||
<font size="-1"></font> <font size="-1">The <code><google:searchComments/></code>
|
||||
tag is used to
|
||||
|
||||
|
||||
display the comments (if any) included with the current result set.</font>
|
||||
<p>
|
||||
<a name="2_8" id="2_8"></a>
|
||||
|
||||
|
@ -752,15 +720,14 @@ code {font-size:10pt}
|
|||
</tr>
|
||||
</table>
|
||||
<p>
|
||||
<font size="-1">The <code><google:searchQuery/></code> tag is used to display
|
||||
the text of the current query.
|
||||
<font size="-1"></font> <font size="-1">The <code><google:searchQuery/></code>
|
||||
tag is used to
|
||||
|
||||
|
||||
display the text of the current query.
|
||||
|
||||
</font>
|
||||
<p>
|
||||
<font size="-1">The specified search keywords (or phrase) are returned by default.
|
||||
To display the full query (including preset <a href="#2_1_site">site</a> and
|
||||
<a href="#2_1_filetype">file type</a> options), set the <code>type</code> attribute
|
||||
to <code>full</a>.</font>
|
||||
<p>
|
||||
<a name="2_9" id="2_9"></a>
|
||||
|
||||
<table bgcolor="#fff9e4" cellpadding="2" width="100%" border="0">
|
||||
|
@ -771,9 +738,12 @@ code {font-size:10pt}
|
|||
</tr>
|
||||
</table>
|
||||
<p>
|
||||
<font size="-1">The <code><google:searchTime/></code>
|
||||
tag is used to display the total server time used to return the search results,
|
||||
measured in seconds.</font>
|
||||
<font size="-1"></font> <font size="-1">The <code><google:searchTime/></code>
|
||||
tag is used to
|
||||
|
||||
|
||||
display the total server time used to return the search results, measured in
|
||||
seconds.</font>
|
||||
<p>
|
||||
<a name="2_10" id="2_10"></a>
|
||||
|
||||
|
@ -785,9 +755,11 @@ code {font-size:10pt}
|
|||
</tr>
|
||||
</table>
|
||||
<p>
|
||||
<font size="-1">The <code><google:searchTips/></code>
|
||||
tag is used to display the tips (if any) included with the current result
|
||||
set.</font>
|
||||
<font size="-1"></font> <font size="-1">The <code><google:searchTips/></code>
|
||||
tag is used to
|
||||
|
||||
|
||||
display the tips (if any) included with the current result set.</font>
|
||||
</blockquote>
|
||||
<p>
|
||||
<a name="cached" id="cached"></a>
|
|
@ -10,7 +10,7 @@ body,td,font,.p,a{font-family:arial,sans-serif}
|
|||
<body class="siteowners" bgcolor="#ffffff" text="#000000" link="#0000CC" vlink="#800080" alink="#ff0000" topmargin="2">
|
||||
<table width="95%" border="0" cellspacing="0" cellpadding="2">
|
||||
<tr>
|
||||
<td width="1%"><a href="index.html"><img src="images/google_sm.gif" border="0" width="143" height="37" alt="Return to the Google Tag Library homepage." vspace="5"></a></td>
|
||||
<td width="1%"><a href="index.html"><img src="images/google_sm.gif" border="0" width="143" height="37" alt="Return to Google homepage." vspace="5"></a></td>
|
||||
<td valign="middle" bgcolor="#eeeeee"><h1 style="margin-top:10px">
|
||||
<table width="100%">
|
||||
<tr>
|
||||
|
@ -27,38 +27,35 @@ body,td,font,.p,a{font-family:arial,sans-serif}
|
|||
<table border="0" cellpadding="0" cellspacing="0" width="95%">
|
||||
<tr>
|
||||
<td width="143" valign="top">
|
||||
<p>
|
||||
<small><br>
|
||||
<a href="index.html">Overview</a> <br>
|
||||
<a href="http://sourceforge.net/project/showfiles.php?group_id=90444">Download</a> <br>
|
||||
<a href="docs.html">Documentation</a> <br>
|
||||
<img src="images/yellowarrow.gif" alt="arrow" width="4" height="8"><b> <font color="#CC9900">HowTo</font></b><br>
|
||||
<a href="javadoc/index.html">Javadoc</a><br>
|
||||
<a href="tlddoc/index.html">TLD</a><br>
|
||||
<a href="uml.html">UML</a></br>
|
||||
<img src="images/yellowarrow.gif" alt="arrow" width="4" height="8"><b> <font color="#CC9900">HowTo</font></b>
|
||||
<br>
|
||||
<a href="javadoc/index.html">Javadoc</a> <br>
|
||||
<a href="about.html">About</a> </small>
|
||||
</p>
|
||||
<img alt="" width="143" height="0">
|
||||
<p>
|
||||
<table cellpadding="1" width="120">
|
||||
<tr>
|
||||
<td style="background-color: #efefef"><small>
|
||||
<div class="sidesearch">
|
||||
<form action="http://www.thauvin.net/gtlib-search/search.jsp" method="post">
|
||||
<!-- <div class="sidesearch">
|
||||
<form action="http://googlesite.google.com/search" method="get">
|
||||
<div align="center">
|
||||
<font size="-2">
|
||||
<i>Find on this site:</i><br>
|
||||
<font size="-2"><input type="hidden" name="output" value="googleabout"><input type="hidden" name="site" value="googlesite">
|
||||
<i>Find on this site:</i> <br>
|
||||
<input type="text" name="q" size="10"><br><input type="submit" value="Search" name="submit">
|
||||
<br>
|
||||
</font>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div> -->
|
||||
</small>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<p>
|
||||
<a href="http://sourceforge.net/projects/google-taglib"><img src="http://sourceforge.net/sflogo.php?group_id=9044&type=1" width="88" height="31" border="0" alt="SourceForge.net Logo"/></a>
|
||||
</p>
|
||||
</td>
|
||||
<td style="background-color: #cccccc" width="1" valign="top"><img alt="" width="1" height="1"></td>
|
||||
<td style="background-color: #ffffff" width="10" valign="top"><img alt="" width="1" height="1"></td>
|
||||
|
@ -74,7 +71,7 @@ body,td,font,.p,a{font-family:arial,sans-serif}
|
|||
</table>
|
||||
<p>
|
||||
<font size="-1"><b> 1. <a href="#search">Search & Display the
|
||||
Results of a Google Search</a></b> </font>
|
||||
Results of a Goggle Search</a></b> </font>
|
||||
<blockquote>
|
||||
<font size="-1">1.1 <a href="#1_1">Create a Search Form </a> <br>
|
||||
1.2 <a href="#1_2">Create a Result Page</a> <br>
|
||||
|
@ -82,7 +79,7 @@ body,td,font,.p,a{font-family:arial,sans-serif}
|
|||
</blockquote>
|
||||
<font size="-1">
|
||||
<p>
|
||||
<b> 2. <a href="#cached">Display a Page Cached by Google</a></b> </font>
|
||||
<b> 2. <a href="#cached">Display a Page Cached by Goggle</a></b> </font>
|
||||
<blockquote>
|
||||
<font size="-1">2.1 <a href="#2_1">Create a Search From </a> <br>
|
||||
2.2 <a href="#2_2">Create a Result Page</a> <br>
|
||||
|
@ -91,7 +88,7 @@ body,td,font,.p,a{font-family:arial,sans-serif}
|
|||
<font size="-1">
|
||||
<p>
|
||||
</p>
|
||||
<b> 3. <a href="#spelling">Display a Google Spelling Suggestion </a></b></font>
|
||||
<b> 3. <a href="#spelling">Display a Goggle Spelling Suggestion </a></b></font>
|
||||
<blockquote>
|
||||
<font size="-1">3.1 <a href="#3_1">Create a Search Form</a> <br>
|
||||
3.2 <a href="#3_2">Create a Result Page </a> <br>
|
||||
|
@ -173,7 +170,7 @@ body,td,font,.p,a{font-family:arial,sans-serif}
|
|||
<p>
|
||||
<font size="-1">The <em>taglib</em> directive is used to specify the Google Tag
|
||||
library reference and prefix. <br>
|
||||
The <em><<a href="docs.html#2_1">google:search</a>/></em> tag is used to perform the query.</font>
|
||||
The <em><google:search/></em> tag is used to perform the query.</font>
|
||||
<p>
|
||||
<font size="-1" color="gray">The Google Web APIs authentication key can be
|
||||
specified as a tag attribute: <br>
|
||||
|
@ -210,9 +207,9 @@ body,td,font,.p,a{font-family:arial,sans-serif}
|
|||
</tr>
|
||||
</table>
|
||||
<p>
|
||||
<font size="-1">The <em><<a href="docs.html#2_2">google:searchResult</a>/></em> tag is used to loop
|
||||
<font size="-1">The <em><google:searchResult/></em> tag is used to loop
|
||||
through the results. <br>
|
||||
The <em><<a href="docs.html#2_3">google:element</a>/></em> tag is used to display the attributes of
|
||||
The <em><google:element/></em> tag is used to display the attributes of
|
||||
the current result set element.</font>
|
||||
</blockquote>
|
||||
<a name="cached" id="cached"></a>
|
||||
|
@ -310,7 +307,7 @@ body,td,font,.p,a{font-family:arial,sans-serif}
|
|||
</tr>
|
||||
</table>
|
||||
<p>
|
||||
<font size="-1">The <em><<a href="docs.html#3_1">google:cachedPage</a>></em> tag is used to display
|
||||
<font size="-1">The <em><google:cachedPage></em> tag is used to display
|
||||
the content of the cached page.</font>
|
||||
<p>
|
||||
<font size="-1" color="gray">The Google Web APIs authentication key can be
|
||||
|
@ -423,7 +420,7 @@ body,td,font,.p,a{font-family:arial,sans-serif}
|
|||
</tr>
|
||||
</table>
|
||||
<p>
|
||||
<font size="-1">The <em><<a href="docs.html#3_2">google:spelling</a>></em> tag is used to display the
|
||||
<font size="-1">The <em><google:spelling></em> tag is used to display the
|
||||
suggested spelling for the given query.</font>
|
||||
<p>
|
||||
<font size="-1" color="gray">The Google Web APIs authentication key can be
|
Before Width: | Height: | Size: 58 B After Width: | Height: | Size: 58 B |
Before Width: | Height: | Size: 751 B After Width: | Height: | Size: 751 B |
Before Width: | Height: | Size: 3.8 KiB After Width: | Height: | Size: 3.8 KiB |
Before Width: | Height: | Size: 7.6 KiB After Width: | Height: | Size: 7.6 KiB |
BIN
google-taglib/htdocs/images/duktumbl.gif
Normal file
After Width: | Height: | Size: 25 KiB |
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.1 KiB |
Before Width: | Height: | Size: 31 KiB After Width: | Height: | Size: 31 KiB |
Before Width: | Height: | Size: 2.3 KiB After Width: | Height: | Size: 2.3 KiB |
Before Width: | Height: | Size: 9.3 KiB After Width: | Height: | Size: 9.3 KiB |
Before Width: | Height: | Size: 3.2 KiB After Width: | Height: | Size: 3.2 KiB |
Before Width: | Height: | Size: 100 B After Width: | Height: | Size: 100 B |
|
@ -9,7 +9,7 @@ body,td,font,p,a{font-family:arial,sans-serif}
|
|||
<body class="siteowners" bgcolor="#ffffff" text="#000000" link="#0000CC" vlink="#800080" alink="#ff0000" topmargin="2">
|
||||
<table width="95%" border="0" cellspacing="0" cellpadding="2">
|
||||
<tr>
|
||||
<td width="1%"><a href="index.html"><img src="images/google_sm.gif" border="0" width="143" height="37" alt="Return to the Google Tag Library homepage." vspace="5"></a></td>
|
||||
<td width="1%"><a href="index.html"><img src="images/google_sm.gif" border="0" width="143" height="37" alt="Return to Google homepage." vspace="5"></a></td>
|
||||
<td valign="middle" bgcolor="#eeeeee"><h1 style="margin-top:10px">
|
||||
<table width="100%">
|
||||
<tr>
|
||||
|
@ -22,40 +22,37 @@ body,td,font,p,a{font-family:arial,sans-serif}
|
|||
<table border="0" cellpadding="0" cellspacing="0" width="95%">
|
||||
<tr>
|
||||
<td width="143" valign="top">
|
||||
<p>
|
||||
<small><br>
|
||||
<img src="images/yellowarrow.gif" alt="arrow" width="4" height="8"><b> <font color="#CC9900">Overview</font></b>
|
||||
<br>
|
||||
<a href="http://sourceforge.net/project/showfiles.php?group_id=90444">Download</a> <br>
|
||||
<a href="docs.html">Documentation</a> <br>
|
||||
<a href="howto.html">HowTo</a> <br>
|
||||
<a href="javadoc/index.html">Javadoc</a><br>
|
||||
<a href="tlddoc/index.html">TLD</a><br>
|
||||
<a href="uml.html">UML</a></br>
|
||||
<a href="javadoc/index.html">Javadoc</a> <br>
|
||||
<a href="about.html">About</a> </small>
|
||||
</p>
|
||||
<img alt="" width="143" height="0">
|
||||
<p>
|
||||
<table cellpadding="1" width="120">
|
||||
<tr>
|
||||
<td style="background-color: #efefef"><small>
|
||||
<div class="sidesearch">
|
||||
<form action="http://www.thauvin.net/gtlib-search/search.jsp" method="post">
|
||||
<!-- <div class="sidesearch">
|
||||
<form action="http://googlesite.google.com/search" method="get">
|
||||
<div align="center">
|
||||
<font size="-2">
|
||||
<i>Find on this site:</i><br>
|
||||
<font size="-2"><input type="hidden" name="output" value="googleabout"><input type="hidden" name="site" value="googlesite">
|
||||
<i>Find on this site:</i> <br>
|
||||
<input type="text" name="q" size="10"><br><input type="submit" value="Search" name="submit">
|
||||
<br>
|
||||
</font>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div> -->
|
||||
</small>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<p>
|
||||
<a href="http://www.jars.com" target="_blank"><img src="images/jars25.gif" alt="Rated Jars Top 25%" border="0"></a>
|
||||
<p>
|
||||
<a href="http://sourceforge.net/projects/google-taglib"><img src="http://sourceforge.net/sflogo.php?group_id=9044&type=1" width="88" height="31" border="0" alt="SourceForge.net Logo"/></a>
|
||||
<a href="http://sourceforge.net"><img src="http://sourceforge.net/sflogo.php?group_id=9044&type=1" width="88" height="31" border="0" alt="SourceForge.net Logo"/></a>
|
||||
</p>
|
||||
</td>
|
||||
<td style="background-color: #cccccc" width="1" valign="top"><img alt="" width="1" height="1"></td>
|
||||
|
@ -82,18 +79,26 @@ body,td,font,p,a{font-family:arial,sans-serif}
|
|||
The <a href="http://sourceforge.net/project/showfiles.php?group_id=90444">download</a> includes the tag library and associated TLD.</font></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
<td>
|
||||
|
||||
</td>
|
||||
<td>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="background-color: #FFEBAE"><font face="arial,sans-serif" size="5"><b>2</b></font></td>
|
||||
<td><font size="-1"><strong>Download the Google Web APIs</strong> <br>
|
||||
<td><font size="-1"><strong>Download the Google Web API</strong> <br>
|
||||
To use the Google Web APIs service, you also must <a href="http://api.google.com/">obtain
|
||||
a license key</a>.</font></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
<td>
|
||||
|
||||
</td>
|
||||
<td>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="background-color: #FFEBAE"><font size="5"><b>3</b></font></td>
|
||||
|
@ -109,7 +114,7 @@ body,td,font,p,a{font-family:arial,sans-serif}
|
|||
<tr>
|
||||
<td>
|
||||
<div align="center">
|
||||
<img src="images/duktumbl.gif" width="130" height="80" alt="Tumbling Duke" hspace="5">
|
||||
<img src="images/duktumbl.gif" width="130" height="80" alt="Google Web APIs" hspace="5">
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
|
@ -141,7 +146,8 @@ body,td,font,p,a{font-family:arial,sans-serif}
|
|||
</tr>
|
||||
<tr valign="top">
|
||||
<td id="sidebarcontent"><img src="images/arrow.gif" width="6" height="14" alt="arrow"></td>
|
||||
<td id="sidebarcontent"><font size="-1">The <a href="http://api.google.com/">Google Web APIs</a> Java library. </font></td>
|
||||
<td id="sidebarcontent"><font size="-1">The <a href="http://api.google.com/">Google
|
||||
API</a> Java library. </font></td>
|
||||
</tr>
|
||||
<tr valign="top">
|
||||
<td colspan="2" id="sidebarcontent">
|
|
@ -9,7 +9,7 @@ body,td,font,p,a{font-family:arial,sans-serif}
|
|||
<body class="siteowners" bgcolor="#ffffff" text="#000000" link="#0000CC" vlink="#800080" alink="#ff0000" topmargin="2">
|
||||
<table width="95%" border="0" cellspacing="0" cellpadding="2">
|
||||
<tr>
|
||||
<td width="1%"><a href="index.html"><img src="images/google_sm.gif" border="0" width="143" height="37" alt="Return to the Google Tag Library homepage." vspace="5"></a></td>
|
||||
<td width="1%"><a href="index.html"><img src="images/google-logo.png" border="0" width="143" height="37" alt="Return to Google homepage." vspace="5"></a></td>
|
||||
<td valign="middle" bgcolor="#eeeeee"><h1 style="margin-top:10px">
|
||||
<table width="100%">
|
||||
<tr>
|
||||
|
@ -22,39 +22,35 @@ body,td,font,p,a{font-family:arial,sans-serif}
|
|||
<table border="0" cellpadding="0" cellspacing="0" width="95%">
|
||||
<tr>
|
||||
<td width="143" valign="top">
|
||||
<p>
|
||||
<small><br>
|
||||
<a href="index.html">Overview</a> <br>
|
||||
<a href="http://sourceforge.net/project/showfiles.php?group_id=90444">Download</a> <br>
|
||||
<a href="docs.html">Documentation</a> <br>
|
||||
<a href="howto.html">HowTo</a> <br>
|
||||
<a href="javadoc/index.html">Javadoc</a> <br>
|
||||
<a href="tlddoc/index.html">TLD</a><br>
|
||||
<a href="uml.html">UML</a></br>
|
||||
<img src="images/yellowarrow.gif" alt="arrow" width="4" height="8"><b> <font color="#cc9900">About</font></b>
|
||||
</small>
|
||||
</p>
|
||||
<img width="145" height="0" alt="">
|
||||
<p>
|
||||
<table cellpadding="1" width="120">
|
||||
<tr>
|
||||
<td style="background-color: #efefef"><small>
|
||||
<div class="sidesearch">
|
||||
<form action="http://www.thauvin.net/gtlib-search/search.jsp" method="post">
|
||||
<!-- <div class="sidesearch">
|
||||
<form action="http://googlesite.google.com/search" method="get">
|
||||
<div align="center">
|
||||
<font size="-2">
|
||||
<font size="-2"><input type="hidden" name="output" value="googleabout"><input type="hidden" name="site" value="googlesite">
|
||||
<i>Find on this site:</i><br>
|
||||
<input type="text" name="q" size="10"><br><input type="submit" value="Search" name="submit">
|
||||
<br>
|
||||
</font>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div> -->
|
||||
</small>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<p>
|
||||
<a href="http://sourceforge.net/projects/google-taglib"><img src="http://sourceforge.net/sflogo.php?group_id=9044&type=1" width="88" height="31" border="0" alt="SourceForge.net Logo"/></a>
|
||||
</p>
|
||||
</td>
|
||||
<td style="background-color: #cccccc" width="1" valign="top"><img alt="" width="1" height="1"></td>
|
||||
<td style="background-color: #ffffff" width="10" valign="top"><img alt="" width="1" height="1"></td>
|
|
@ -50,16 +50,11 @@ import java.net.URLEncoder;
|
|||
*
|
||||
* @author Erik C. Thauvin
|
||||
* @created April 25, 2002
|
||||
* @version $Revision$, $Date$
|
||||
* @version $Revision$
|
||||
* @since 1.0
|
||||
*/
|
||||
public class GoogleSearchBean
|
||||
{
|
||||
/**
|
||||
* The default cache flag.
|
||||
*/
|
||||
public static final boolean DEFAULT_CACHE = true;
|
||||
|
||||
/**
|
||||
* The default related-queries filter.
|
||||
*/
|
||||
|
@ -95,13 +90,6 @@ public class GoogleSearchBean
|
|||
*/
|
||||
public static final int DEFAULT_START = 0;
|
||||
|
||||
/**
|
||||
* The default filetype.
|
||||
*
|
||||
* @since 1.0.1
|
||||
*/
|
||||
public static final String DEFAULT_TYPE = "";
|
||||
|
||||
/**
|
||||
* The <em>next</em> keyword.
|
||||
*/
|
||||
|
@ -117,7 +105,6 @@ public class GoogleSearchBean
|
|||
"The authorization key has not been specified.";
|
||||
private GoogleSearch service = null;
|
||||
private GoogleSearchResult result = null;
|
||||
private String keywords = null;
|
||||
private GoogleSearchResultElement elements[] = null;
|
||||
private boolean keySet = false;
|
||||
private int maxResults = 10;
|
||||
|
@ -151,7 +138,7 @@ public class GoogleSearchBean
|
|||
{
|
||||
service.setKey(key);
|
||||
|
||||
if (isValidString(key))
|
||||
if ((key != null) && (key.trim().length() > 0))
|
||||
{
|
||||
keySet = true;
|
||||
}
|
||||
|
@ -171,58 +158,6 @@ public class GoogleSearchBean
|
|||
return keySet;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the search keywords.
|
||||
*
|
||||
* @param keywords The keywords
|
||||
* @see #getKeywords()
|
||||
* @since 1.0.1
|
||||
*/
|
||||
public final void setKeywords(String keywords)
|
||||
{
|
||||
this.keywords = keywords;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the keywords.
|
||||
*
|
||||
* @return The keywords value.
|
||||
* @see #setKeywords(String)
|
||||
* @since 1.0.1
|
||||
*/
|
||||
public final String getKeywords()
|
||||
{
|
||||
return this.keywords;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the HTTP proxy host, port, user name and password.
|
||||
*
|
||||
* @param proxyHost The host to use for the HTTP proxy.
|
||||
* @param proxyPort The port to use for the HTTP proxy.
|
||||
* @param proxyUserName The user name to use for the HTTP proxy.
|
||||
* @param proxyPassword The password to use for the HTTP proxy.
|
||||
*/
|
||||
public void setProxyServer(String proxyHost, String proxyPort,
|
||||
String proxyUserName, String proxyPassword)
|
||||
{
|
||||
int port = -1;
|
||||
|
||||
if (isValidString(proxyPort))
|
||||
{
|
||||
try
|
||||
{
|
||||
port = Integer.valueOf(proxyPort).intValue();
|
||||
}
|
||||
catch (NumberFormatException e)
|
||||
{
|
||||
; // Do nothing.
|
||||
}
|
||||
}
|
||||
|
||||
setProxyServer(proxyHost, port, proxyUserName, proxyPassword);
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the HTTP proxy host, port, user name and password.
|
||||
*
|
||||
|
@ -234,25 +169,10 @@ public class GoogleSearchBean
|
|||
public void setProxyServer(String proxyHost, int proxyPort,
|
||||
String proxyUserName, String proxyPassword)
|
||||
{
|
||||
if (isValidString(proxyHost))
|
||||
{
|
||||
service.setProxyHost(proxyHost);
|
||||
|
||||
if (proxyPort > 0)
|
||||
{
|
||||
service.setProxyPort(proxyPort);
|
||||
}
|
||||
|
||||
if (isValidString(proxyUserName))
|
||||
{
|
||||
service.setProxyUserName(proxyUserName);
|
||||
}
|
||||
|
||||
if (isValidString(proxyPassword))
|
||||
{
|
||||
service.setProxyPassword(proxyPassword);
|
||||
}
|
||||
}
|
||||
service.setProxyHost(proxyHost);
|
||||
service.setProxyPort(proxyPort);
|
||||
service.setProxyUserName(proxyUserName);
|
||||
service.setProxyPassword(proxyPassword);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -445,15 +365,10 @@ public class GoogleSearchBean
|
|||
* encoding scheme of the current ODP category.</td></tr>
|
||||
* <tr><td><code>"relatedQuery"</code></td><td>Returns the related query
|
||||
* string, suitable for use as a {@link #getGoogleSearch(String) search}
|
||||
* query string.<br>For example:
|
||||
* <code>related:www.example.com/search?q=vacation%20hawaii</code></td></tr>
|
||||
* query string.</td></tr>
|
||||
* <tr><td><code>"cachedQuery"</code></td><td>Returns the cached query
|
||||
* string, suitable for use as a {@link #getCachedPage(String) cached} query
|
||||
* string.<br>For example: <code>www.example.com/search?q=vacation%20hawaii</code>
|
||||
* </td></tr>
|
||||
* <tr><td><code>"staticQuery"</code></td><td>The static query, suitable for
|
||||
* display.<br>For example: <code>www.example.com/search?q=vacation hawaii</code>
|
||||
* </td></tr>
|
||||
* string.</td></tr>
|
||||
* </table>
|
||||
*
|
||||
* @param index The element index.
|
||||
|
@ -605,10 +520,6 @@ public class GoogleSearchBean
|
|||
{
|
||||
return String.valueOf(result.getDocumentFiltering());
|
||||
}
|
||||
else if (property.equalsIgnoreCase("searchKeywords"))
|
||||
{
|
||||
return getKeywords();
|
||||
}
|
||||
else if (property.equalsIgnoreCase("searchQuery"))
|
||||
{
|
||||
return result.getSearchQuery();
|
||||
|
@ -725,22 +636,6 @@ public class GoogleSearchBean
|
|||
elements = null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Validates a string value by insuring it is not null or empty.
|
||||
*
|
||||
* @param stringValue The String value.
|
||||
* @return true if valid, false if not.
|
||||
*/
|
||||
private boolean isValidString(String stringValue)
|
||||
{
|
||||
if ((stringValue != null) && (stringValue.trim().length() > 0))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Prints the usage and exits.
|
||||
*/
|
|
@ -67,26 +67,6 @@ public class TagUtility
|
|||
*/
|
||||
public static final String FILTER_PARAM = "filter";
|
||||
|
||||
/**
|
||||
* The HTTP proxy host.
|
||||
*/
|
||||
public static final String GOOGLE_PROXY_HOST = "google_proxy_host";
|
||||
|
||||
/**
|
||||
* The HTTP proxy password.
|
||||
*/
|
||||
public static final String GOOGLE_PROXY_PASSWORD = "google_proxy_password";
|
||||
|
||||
/**
|
||||
* The HTTP proxy port.
|
||||
*/
|
||||
public static final String GOOGLE_PROXY_PORT = "google_proxy_port";
|
||||
|
||||
/**
|
||||
* The HTTP proxy username.
|
||||
*/
|
||||
public static final String GOOGLE_PROXY_USERNAME = "google_proxy_username";
|
||||
|
||||
/**
|
||||
* The name of the Google Search bean attribute.
|
||||
*/
|
||||
|
@ -147,11 +127,6 @@ public class TagUtility
|
|||
*/
|
||||
public static final String START_PARAM = "start";
|
||||
|
||||
/**
|
||||
* The name of the (file) type request parameter.
|
||||
*/
|
||||
public static final String TYPE_PARAM = "type";
|
||||
|
||||
/**
|
||||
* Protected constructor to disable instantiation.
|
||||
*/
|
||||
|
@ -292,13 +267,13 @@ public class TagUtility
|
|||
/**
|
||||
* Builds a HTML reference link:
|
||||
* <p>
|
||||
* For example: <code><a href="url" class="css" style="style" target="target">body</a></code>.
|
||||
* For example: <code><a href="url" class="css" style="style" target="target">body</a></code>.
|
||||
*
|
||||
* @param url The reference URL.
|
||||
* @param body The link body text.
|
||||
* @param target The link target.
|
||||
* @param style The link CSS style.
|
||||
* @param css The link CSS class.
|
||||
* @param css The link CSS class
|
||||
* @return A HTML reference link.
|
||||
*/
|
||||
public static final String buildRefLink(String url, String body,
|
|
@ -4,14 +4,14 @@
|
|||
* Copyright (c) 2002-2003, Erik C. Thauvin (erik@thauvin.net)
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are
|
||||
* met:
|
||||
*
|
||||
* Redistributions of source code must retain the above copyright notice,
|
||||
* this list of conditions and the following disclaimer.
|
||||
*
|
||||
* Redistributions in binary form must reproduce the above copyright notice,
|
||||
* Redistributions in binary form must reproduce the above copyright notice,
|
||||
* this list of conditions and the following disclaimer in the documentation
|
||||
* and/or other materials provided with the distribution.
|
||||
*
|
||||
|
@ -20,7 +20,7 @@
|
|||
* specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
|
||||
* IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
|
||||
* IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
|
||||
* THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
|
||||
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
||||
|
@ -69,15 +69,6 @@ public class CachedPage extends QuerySupport
|
|||
{
|
||||
final GoogleSearchBean bean = new GoogleSearchBean(getKey());
|
||||
|
||||
bean.setProxyServer(pageContext.getServletContext()
|
||||
.getInitParameter(TagUtility.GOOGLE_PROXY_HOST),
|
||||
pageContext.getServletContext()
|
||||
.getInitParameter(TagUtility.GOOGLE_PROXY_PORT),
|
||||
pageContext.getServletContext()
|
||||
.getInitParameter(TagUtility.GOOGLE_PROXY_USERNAME),
|
||||
pageContext.getServletContext()
|
||||
.getInitParameter(TagUtility.GOOGLE_PROXY_PASSWORD));
|
||||
|
||||
// Output the body
|
||||
pageContext.getOut().write(bean.getCachedPage(query));
|
||||
}
|
|
@ -79,27 +79,13 @@ public abstract class KeySupport extends BodyTagSupport
|
|||
this.key = key;
|
||||
}
|
||||
|
||||
/**
|
||||
* Release method.
|
||||
*/
|
||||
public void release()
|
||||
{
|
||||
super.release();
|
||||
|
||||
// Reset the key value
|
||||
key = null;
|
||||
|
||||
// Reset the values
|
||||
reset();
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the key attribute.
|
||||
*
|
||||
* @return The attribute value.
|
||||
* @see #setKey(String)
|
||||
*/
|
||||
protected String getKey()
|
||||
public String getKey()
|
||||
{
|
||||
if (TagUtility.isValidString(key, true))
|
||||
{
|
||||
|
@ -144,6 +130,20 @@ public abstract class KeySupport extends BodyTagSupport
|
|||
return "";
|
||||
}
|
||||
|
||||
/**
|
||||
* Release method.
|
||||
*/
|
||||
public void release()
|
||||
{
|
||||
super.release();
|
||||
|
||||
// Reset the key value
|
||||
key = null;
|
||||
|
||||
// Reset the values
|
||||
reset();
|
||||
}
|
||||
|
||||
/**
|
||||
* Reset the values.
|
||||
*/
|
|
@ -42,61 +42,98 @@ import net.thauvin.google.TagUtility;
|
|||
import javax.servlet.jsp.JspException;
|
||||
import javax.servlet.jsp.PageContext;
|
||||
|
||||
|
||||
/**
|
||||
* A custom tag used to perform Google searches.
|
||||
*
|
||||
* @author Erik C. Thauvin
|
||||
* @created April 25, 2002
|
||||
* @version $Revision$, $Date$
|
||||
* @version $Revision$
|
||||
* @since 1.0
|
||||
*/
|
||||
public class Search extends QuerySupport
|
||||
{
|
||||
private GoogleSearchBean bean = null;
|
||||
private boolean cache = GoogleSearchBean.DEFAULT_CACHE;
|
||||
private boolean filter = GoogleSearchBean.DEFAULT_FILTER;
|
||||
private String lr = GoogleSearchBean.DEFAULT_LR;
|
||||
private int maxResults = GoogleSearchBean.DEFAULT_MAX_RESULTS;
|
||||
private String restrict = GoogleSearchBean.DEFAULT_RESTRICT;
|
||||
private boolean safeSearch = GoogleSearchBean.DEFAULT_SAFE_SEARCH;
|
||||
private String site = GoogleSearchBean.DEFAULT_SITE;
|
||||
private boolean cache = true;
|
||||
private boolean filter = GoogleSearchBean.DEFAULT_FILTER;
|
||||
private boolean safeSearch = GoogleSearchBean.DEFAULT_SAFE_SEARCH;
|
||||
private int maxResults = GoogleSearchBean.DEFAULT_MAX_RESULTS;
|
||||
private int start = GoogleSearchBean.DEFAULT_START;
|
||||
private String type = GoogleSearchBean.DEFAULT_TYPE;
|
||||
|
||||
/**
|
||||
* Sets the cache attribute.
|
||||
*
|
||||
* @param cache The new attribute value.
|
||||
* @see #getCache()
|
||||
*/
|
||||
public final void setCache(String cache)
|
||||
{
|
||||
this.cache = Boolean.valueOf(cache).booleanValue();
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the cache attribute.
|
||||
*
|
||||
* @return The attribute value.
|
||||
* @see #setCache(String)
|
||||
*/
|
||||
public final boolean getCache()
|
||||
{
|
||||
return getBoolParam(TagUtility.CACHE_PARAM, cache);
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the (related-query) filter attribute.
|
||||
*
|
||||
* @param filter The new attribute value.
|
||||
* @see #getFilter()
|
||||
*/
|
||||
public final void setFilter(String filter)
|
||||
{
|
||||
this.filter = Boolean.valueOf(filter).booleanValue();
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the (related-query) filter attribute.
|
||||
*
|
||||
* @return The attribute value.
|
||||
* @see #setFilter(String)
|
||||
*/
|
||||
public final boolean getFilter()
|
||||
{
|
||||
return getBoolParam(TagUtility.FILTER_PARAM, filter);
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the lr (language restrict) attribute.
|
||||
*
|
||||
* @param lr The new attribute value.
|
||||
* @see #getLr()
|
||||
*/
|
||||
public final void setLr(String lr)
|
||||
{
|
||||
this.lr = lr;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the lr (language restrict) attribute.
|
||||
*
|
||||
* @return The attribute value.
|
||||
* @see #setLr(String)
|
||||
*/
|
||||
public final String getLr()
|
||||
{
|
||||
return getStringParam(TagUtility.LR_PARAM, lr);
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the maximum number of results to be returned.
|
||||
*
|
||||
* @param maxResults The new attribute value.
|
||||
* @see #getMaxResults()
|
||||
*/
|
||||
public final void setMaxResults(String maxResults)
|
||||
{
|
||||
|
@ -106,34 +143,70 @@ public class Search extends QuerySupport
|
|||
}
|
||||
catch (NumberFormatException e)
|
||||
{
|
||||
;// Do nothing
|
||||
; // Do nothing
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the maximum number of results to be returned.
|
||||
*
|
||||
* @return The attribute value.
|
||||
* @see #setMaxResults(String)
|
||||
*/
|
||||
public final int getMaxResults()
|
||||
{
|
||||
return getIntParam(TagUtility.MAX_RESULTS_PARAM, maxResults);
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the restrict attribute.
|
||||
*
|
||||
* @param restrict The new restrict attribute.
|
||||
* @see #getRestrict()
|
||||
*/
|
||||
public final void setRestrict(String restrict)
|
||||
{
|
||||
this.restrict = restrict;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the restrict attribute.
|
||||
*
|
||||
* @return The attribute value.
|
||||
* @see #setRestrict(String)
|
||||
*/
|
||||
public final String getRestrict()
|
||||
{
|
||||
return getStringParam(TagUtility.RESTRICT_PARAM, restrict);
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the safeSearch attribute.
|
||||
*
|
||||
* @param safeSearch The new attribute value.
|
||||
* @see #getSafeSearch()
|
||||
*/
|
||||
public final void setSafeSearch(String safeSearch)
|
||||
{
|
||||
this.safeSearch = Boolean.valueOf(safeSearch).booleanValue();
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the safeSearch attribute.
|
||||
*
|
||||
* @return The attribute value.
|
||||
* @see #setSafeSearch(String)
|
||||
*/
|
||||
public final boolean getSafeSearch()
|
||||
{
|
||||
return getBoolParam(TagUtility.SAFE_SEARCH_PARAM, safeSearch);
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the site attribute.
|
||||
*
|
||||
* @param site The new attribute value.
|
||||
* @see #getSite()
|
||||
*/
|
||||
public final void setSite(String site)
|
||||
{
|
||||
|
@ -141,99 +214,12 @@ public class Search extends QuerySupport
|
|||
}
|
||||
|
||||
/**
|
||||
* Sets the start attribute.
|
||||
*
|
||||
* @param start The new attribute value.
|
||||
*/
|
||||
public final void setStart(String start)
|
||||
{
|
||||
try
|
||||
{
|
||||
this.start = Integer.valueOf(start).intValue();
|
||||
}
|
||||
catch (NumberFormatException e)
|
||||
{
|
||||
;// Do nothing
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the (file) type attribute.
|
||||
*
|
||||
* @param type The new attribute value.
|
||||
* @since 1.0.1
|
||||
*/
|
||||
public final void setType(String type)
|
||||
{
|
||||
this.type = type;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the cache attribute.
|
||||
* Returns the stie attribute.
|
||||
*
|
||||
* @return The attribute value.
|
||||
* @see #setSite(String)
|
||||
*/
|
||||
private final boolean getCache()
|
||||
{
|
||||
return getBoolParam(TagUtility.CACHE_PARAM, cache);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the (related-query) filter attribute.
|
||||
*
|
||||
* @return The attribute value.
|
||||
*/
|
||||
private final boolean getFilter()
|
||||
{
|
||||
return getBoolParam(TagUtility.FILTER_PARAM, filter);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the lr (language restrict) attribute.
|
||||
*
|
||||
* @return The attribute value.
|
||||
*/
|
||||
private final String getLr()
|
||||
{
|
||||
return getStringParam(TagUtility.LR_PARAM, lr);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the maximum number of results to be returned.
|
||||
*
|
||||
* @return The attribute value.
|
||||
*/
|
||||
private final int getMaxResults()
|
||||
{
|
||||
return getIntParam(TagUtility.MAX_RESULTS_PARAM, maxResults);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the restrict attribute.
|
||||
*
|
||||
* @return The attribute value.
|
||||
*/
|
||||
private final String getRestrict()
|
||||
{
|
||||
return getStringParam(TagUtility.RESTRICT_PARAM, restrict);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the safeSearch attribute.
|
||||
*
|
||||
* @return The attribute value.
|
||||
*/
|
||||
private final boolean getSafeSearch()
|
||||
{
|
||||
return getBoolParam(TagUtility.SAFE_SEARCH_PARAM, safeSearch);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the site attribute.
|
||||
*
|
||||
* @return The attribute value.
|
||||
*/
|
||||
private final String getSite()
|
||||
public final String getSite()
|
||||
{
|
||||
String site = getStringParam(TagUtility.SITE_PARAM, this.site);
|
||||
|
||||
|
@ -245,100 +231,35 @@ public class Search extends QuerySupport
|
|||
return "";
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the start attribute.
|
||||
*
|
||||
* @param start The new attribute value.
|
||||
* @see #getStart()
|
||||
*/
|
||||
public final void setStart(String start)
|
||||
{
|
||||
try
|
||||
{
|
||||
this.start = Integer.valueOf(start).intValue();
|
||||
}
|
||||
catch (NumberFormatException e)
|
||||
{
|
||||
; // Do nothing
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the start attribute.
|
||||
*
|
||||
* @return The attribute value.
|
||||
* @see #setStart(String)
|
||||
*/
|
||||
private final int getStart()
|
||||
public final int getStart()
|
||||
{
|
||||
return getIntParam(TagUtility.START_PARAM, start);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the (file) type attribute.
|
||||
*
|
||||
* @return The attribute value
|
||||
*/
|
||||
private final String getType()
|
||||
{
|
||||
String type = getStringParam(TagUtility.TYPE_PARAM, this.type);
|
||||
|
||||
if (type.length() > 0)
|
||||
{
|
||||
return (" filetype:" + type);
|
||||
}
|
||||
|
||||
return "";
|
||||
}
|
||||
|
||||
/**
|
||||
* Converts a request parameter to a boolean.
|
||||
*
|
||||
* @param paramName The parameter name.
|
||||
* @param defaultValue The default value to use if the parameter is empty.
|
||||
* @return The boolean value.
|
||||
*/
|
||||
private boolean getBoolParam(String paramName, boolean defaultValue)
|
||||
{
|
||||
String param =
|
||||
TagUtility.getParameter(pageContext.getRequest(), paramName);
|
||||
|
||||
if (TagUtility.isValidString(param, true))
|
||||
{
|
||||
return Boolean.valueOf(param).booleanValue();
|
||||
}
|
||||
|
||||
return defaultValue;
|
||||
}
|
||||
|
||||
/**
|
||||
* Converts a request parameter to an int.
|
||||
*
|
||||
* @param paramName The parameter name.
|
||||
* @param defaultValue The default value to use if the parameter is empty.
|
||||
* @return The int value.
|
||||
*/
|
||||
private int getIntParam(String paramName, int defaultValue)
|
||||
{
|
||||
String param =
|
||||
TagUtility.getParameter(pageContext.getRequest(), paramName);
|
||||
|
||||
if (TagUtility.isValidString(param, true))
|
||||
{
|
||||
try
|
||||
{
|
||||
return Integer.valueOf(param).intValue();
|
||||
}
|
||||
catch (NumberFormatException e)
|
||||
{
|
||||
;// Do nothing
|
||||
}
|
||||
}
|
||||
|
||||
return defaultValue;
|
||||
}
|
||||
|
||||
/**
|
||||
* Converts a request parameter to a string.
|
||||
*
|
||||
* @param paramName The parameter name.
|
||||
* @param defaultValue The default value to use if the parameter is empty.
|
||||
* @return The string value.
|
||||
*/
|
||||
private String getStringParam(String paramName, String defaultValue)
|
||||
{
|
||||
String param =
|
||||
TagUtility.getParameter(pageContext.getRequest(), paramName);
|
||||
|
||||
if (TagUtility.isValidString(param, true))
|
||||
{
|
||||
return param;
|
||||
}
|
||||
|
||||
return defaultValue;
|
||||
}
|
||||
|
||||
/**
|
||||
* doEndTag method.
|
||||
*
|
||||
|
@ -346,7 +267,7 @@ public class Search extends QuerySupport
|
|||
* @exception JspException
|
||||
*/
|
||||
public int doEndTag()
|
||||
throws JspException
|
||||
throws JspException
|
||||
{
|
||||
final String query = getQuery();
|
||||
|
||||
|
@ -354,20 +275,9 @@ public class Search extends QuerySupport
|
|||
{
|
||||
try
|
||||
{
|
||||
bean.setProxyServer(pageContext.getServletContext()
|
||||
.getInitParameter(TagUtility.GOOGLE_PROXY_HOST),
|
||||
pageContext.getServletContext()
|
||||
.getInitParameter(TagUtility.GOOGLE_PROXY_PORT),
|
||||
pageContext.getServletContext()
|
||||
.getInitParameter(TagUtility.GOOGLE_PROXY_USERNAME),
|
||||
pageContext.getServletContext()
|
||||
.getInitParameter(TagUtility.GOOGLE_PROXY_PASSWORD));
|
||||
|
||||
bean.setKeywords(getQuery());
|
||||
|
||||
bean.getGoogleSearch(getKey(), getSite() + getQuery() + getType(),
|
||||
getStart(), getMaxResults(), getFilter(),
|
||||
getRestrict(), getSafeSearch(), getLr());
|
||||
bean.getGoogleSearch(getKey(), getSite() + getQuery(),
|
||||
getStart(), getMaxResults(), getFilter(),
|
||||
getRestrict(), getSafeSearch(), getLr());
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
|
@ -392,7 +302,7 @@ public class Search extends QuerySupport
|
|||
* @exception JspException
|
||||
*/
|
||||
public int doStartTag()
|
||||
throws JspException
|
||||
throws JspException
|
||||
{
|
||||
// Get the Google bean
|
||||
bean = TagUtility.getGoogleSearchBean(pageContext);
|
||||
|
@ -406,7 +316,7 @@ public class Search extends QuerySupport
|
|||
|
||||
// Set the bean as named session attribute
|
||||
pageContext.setAttribute(TagUtility.GOOGLE_SEARCH_BEAN, bean,
|
||||
PageContext.SESSION_SCOPE);
|
||||
PageContext.SESSION_SCOPE);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
|
@ -432,8 +342,7 @@ public class Search extends QuerySupport
|
|||
restrict = GoogleSearchBean.DEFAULT_RESTRICT;
|
||||
lr = GoogleSearchBean.DEFAULT_LR;
|
||||
site = GoogleSearchBean.DEFAULT_SITE;
|
||||
cache = GoogleSearchBean.DEFAULT_CACHE;
|
||||
type = GoogleSearchBean.DEFAULT_TYPE;
|
||||
cache = true;
|
||||
|
||||
// Reset the bean
|
||||
bean = null;
|
||||
|
@ -449,4 +358,71 @@ public class Search extends QuerySupport
|
|||
{
|
||||
super.reset();
|
||||
}
|
||||
|
||||
/**
|
||||
* Converts a request parameter to a boolean.
|
||||
*
|
||||
* @param paramName The parameter name.
|
||||
* @param defaultValue The default value to use if the parameter is empty.
|
||||
* @return The boolean value.
|
||||
*/
|
||||
private boolean getBoolParam(String paramName, boolean defaultValue)
|
||||
{
|
||||
String param =
|
||||
TagUtility.getParameter(pageContext.getRequest(), paramName);
|
||||
|
||||
if (TagUtility.isValidString(param, true))
|
||||
{
|
||||
return Boolean.valueOf(param).booleanValue();
|
||||
}
|
||||
|
||||
return defaultValue;
|
||||
}
|
||||
|
||||
/**
|
||||
* Converts a request parameter to an int.
|
||||
*
|
||||
* @param paramName The parameter name.
|
||||
* @param defaultValue The default value to use if the parameter is empty.
|
||||
* @return The int value.
|
||||
*/
|
||||
private int getIntParam(String paramName, int defaultValue)
|
||||
{
|
||||
String param =
|
||||
TagUtility.getParameter(pageContext.getRequest(), paramName);
|
||||
|
||||
if (TagUtility.isValidString(param, true))
|
||||
{
|
||||
try
|
||||
{
|
||||
return Integer.valueOf(param).intValue();
|
||||
}
|
||||
catch (NumberFormatException e)
|
||||
{
|
||||
; // Do nothing
|
||||
}
|
||||
}
|
||||
|
||||
return defaultValue;
|
||||
}
|
||||
|
||||
/**
|
||||
* Converts a request parameter to a string.
|
||||
*
|
||||
* @param paramName The parameter name.
|
||||
* @param defaultValue The default value to use if the parameter is empty.
|
||||
* @return The string value.
|
||||
*/
|
||||
private String getStringParam(String paramName, String defaultValue)
|
||||
{
|
||||
String param =
|
||||
TagUtility.getParameter(pageContext.getRequest(), paramName);
|
||||
|
||||
if (TagUtility.isValidString(param, true))
|
||||
{
|
||||
return param;
|
||||
}
|
||||
|
||||
return defaultValue;
|
||||
}
|
||||
}
|
|
@ -4,14 +4,14 @@
|
|||
* Copyright (c) 2002-2003, Erik C. Thauvin (erik@thauvin.net)
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are
|
||||
* met:
|
||||
*
|
||||
* Redistributions of source code must retain the above copyright notice,
|
||||
* this list of conditions and the following disclaimer.
|
||||
*
|
||||
* Redistributions in binary form must reproduce the above copyright notice,
|
||||
* Redistributions in binary form must reproduce the above copyright notice,
|
||||
* this list of conditions and the following disclaimer in the documentation
|
||||
* and/or other materials provided with the distribution.
|
||||
*
|
||||
|
@ -20,7 +20,7 @@
|
|||
* specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
|
||||
* IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
|
||||
* IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
|
||||
* THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
|
||||
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
||||
|
@ -36,42 +36,17 @@
|
|||
*/
|
||||
package net.thauvin.google.taglibs;
|
||||
|
||||
import net.thauvin.google.TagUtility;
|
||||
|
||||
|
||||
/**
|
||||
* A custom tag used to retrieve the query string of a Google search.
|
||||
*
|
||||
* @author Erik C. Thauvin
|
||||
* @created April 29, 2002
|
||||
* @version $Revision$, $Date$
|
||||
* @version $Revision$
|
||||
* @since 1.0
|
||||
*/
|
||||
public class SearchQuery extends SearchResultSupport
|
||||
{
|
||||
private String type = null;
|
||||
|
||||
/**
|
||||
* Sets the type attribute.
|
||||
*
|
||||
* @param type The new attribute value.
|
||||
* @since 1.0.1
|
||||
*/
|
||||
public final void setType(String type)
|
||||
{
|
||||
this.type = type;
|
||||
}
|
||||
|
||||
/**
|
||||
* Release method.
|
||||
*/
|
||||
public void release()
|
||||
{
|
||||
super.release();
|
||||
|
||||
type = null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the property provided by this tag.
|
||||
*
|
||||
|
@ -79,12 +54,7 @@ public class SearchQuery extends SearchResultSupport
|
|||
*/
|
||||
protected String getPropertyName()
|
||||
{
|
||||
if (TagUtility.isValidString(type) && type.equalsIgnoreCase("full"))
|
||||
{
|
||||
return "searchQuery";
|
||||
}
|
||||
|
||||
return "searchKeywords";
|
||||
return "searchQuery";
|
||||
}
|
||||
|
||||
/**
|
|
@ -4,14 +4,14 @@
|
|||
* Copyright (c) 2002-2003, Erik C. Thauvin (erik@thauvin.net)
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are
|
||||
* met:
|
||||
*
|
||||
* Redistributions of source code must retain the above copyright notice,
|
||||
* this list of conditions and the following disclaimer.
|
||||
*
|
||||
* Redistributions in binary form must reproduce the above copyright notice,
|
||||
* Redistributions in binary form must reproduce the above copyright notice,
|
||||
* this list of conditions and the following disclaimer in the documentation
|
||||
* and/or other materials provided with the distribution.
|
||||
*
|
||||
|
@ -20,7 +20,7 @@
|
|||
* specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
|
||||
* IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
|
||||
* IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
|
||||
* THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
|
||||
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
||||
|
@ -69,15 +69,6 @@ public class Spelling extends QuerySupport
|
|||
{
|
||||
final GoogleSearchBean bean = new GoogleSearchBean(getKey());
|
||||
|
||||
bean.setProxyServer(pageContext.getServletContext()
|
||||
.getInitParameter(TagUtility.GOOGLE_PROXY_HOST),
|
||||
pageContext.getServletContext()
|
||||
.getInitParameter(TagUtility.GOOGLE_PROXY_PORT),
|
||||
pageContext.getServletContext()
|
||||
.getInitParameter(TagUtility.GOOGLE_PROXY_USERNAME),
|
||||
pageContext.getServletContext()
|
||||
.getInitParameter(TagUtility.GOOGLE_PROXY_PASSWORD));
|
||||
|
||||
String result = bean.getSpellingSuggestion(query);
|
||||
|
||||
if (!TagUtility.isValidString(result, true))
|
|
@ -11,7 +11,9 @@
|
|||
<!-- Public URI that uniquely identifies this version of the tag library -->
|
||||
<uri>http://www.thauvin.net/taglibs/google-taglib-@version@</uri>
|
||||
<!-- General information about this tag library -->
|
||||
<info>The Google Tag Library.</info>
|
||||
<info>
|
||||
The Google Tag Library.
|
||||
</info>
|
||||
<!-- CachedPage Tag -->
|
||||
<tag>
|
||||
<name>cachedPage</name>
|
||||
|
@ -140,11 +142,6 @@
|
|||
<required>false</required>
|
||||
<rtexprvalue>true</rtexprvalue>
|
||||
</attribute>
|
||||
<attribute>
|
||||
<name>restrict</name>
|
||||
<required>false</required>
|
||||
<rtexprvalue>true</rtexprvalue>
|
||||
</attribute>
|
||||
<attribute>
|
||||
<name>safeSearch</name>
|
||||
<required>false</required>
|
||||
|
@ -160,11 +157,6 @@
|
|||
<required>false</required>
|
||||
<rtexprvalue>true</rtexprvalue>
|
||||
</attribute>
|
||||
<attribute>
|
||||
<name>type</name>
|
||||
<required>false</required>
|
||||
<rtexprvalue>true</rtexprvalue>
|
||||
</attribute>
|
||||
</tag>
|
||||
<!-- SearchComments Tag -->
|
||||
<tag>
|
||||
|
@ -179,11 +171,6 @@
|
|||
<tagclass>net.thauvin.google.taglibs.SearchQuery</tagclass>
|
||||
<bodycontent>empty</bodycontent>
|
||||
<info>Displays the current search query.</info>
|
||||
<attribute>
|
||||
<name>type</name>
|
||||
<required>false</required>
|
||||
<rtexprvalue>true</rtexprvalue>
|
||||
</attribute>
|
||||
</tag>
|
||||
<!-- SearchResult Tag -->
|
||||
<tag>
|
|
@ -1,18 +0,0 @@
|
|||
<?xml version="1.0" encoding="ISO-8859-1"?>
|
||||
<!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
|
||||
"http://java.sun.com/dtd/web-app_2_3.dtd">
|
||||
<web-app>
|
||||
<display-name>google-tagunit</display-name>
|
||||
<description>This webapp is a starting point for testing the Google Tag Library.</description>
|
||||
<servlet>
|
||||
<servlet-name>TagUnitTestController</servlet-name>
|
||||
<servlet-class>org.tagunit.controller.FrontController</servlet-class>
|
||||
</servlet>
|
||||
<servlet-mapping>
|
||||
<servlet-name>TagUnitTestController</servlet-name>
|
||||
<url-pattern>/test/servlet/*</url-pattern>
|
||||
</servlet-mapping>
|
||||
<welcome-file-list>
|
||||
<welcome-file>index.html</welcome-file>
|
||||
</welcome-file-list>
|
||||
</web-app>
|
|
@ -1,16 +0,0 @@
|
|||
<!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="index.jsp" method="post">
|
||||
<input size="35" name="key" value=""> <input type="submit" value="Set Google Key" name="btnG">
|
||||
</form>
|
||||
</body>
|
||||
</html>
|
|
@ -1,20 +0,0 @@
|
|||
<%
|
||||
// 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);
|
||||
%>
|
||||
<jsp:forward page="test/servlet/RunTests?uri=/test/google/index.jsp"/>
|
||||
<%
|
||||
}
|
||||
else
|
||||
{
|
||||
%>
|
||||
<%@include file="index.html"%>
|
||||
<%
|
||||
}
|
||||
%>
|
|
@ -1,19 +0,0 @@
|
|||
<%@ page isErrorPage="true" %>
|
||||
|
||||
<%@ taglib uri="http://www.tagunit.org/tagunit/display" prefix="tagunit" %>
|
||||
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<title>TagUnit - Error</title>
|
||||
<tagunit:base/>
|
||||
<link rel="stylesheet" href="page.css">
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<h2>Oops, there has been a problem...</h2>
|
||||
<pre><%= org.tagunit.util.ExceptionUtils.getStackTraceAsString(exception) %></pre>
|
||||
|
||||
</body>
|
||||
|
||||
</html>
|
|
@ -1,5 +0,0 @@
|
|||
<%@ taglib uri="http://www.tagunit.org/tagunit/core" prefix="tagunit" %>
|
||||
|
||||
<tagunit:assertBodyContent name="JSP"/>
|
||||
|
||||
<tagunit:assertAttribute name="key" required="false" rtexprvalue="true"/>
|
|
@ -1,6 +0,0 @@
|
|||
<%@ taglib uri="http://www.tagunit.org/tagunit/core" prefix="tagunit" %>
|
||||
|
||||
<tagunit:assertAttribute name="name" required="true" rtexprvalue="true"/>
|
||||
<tagunit:assertAttribute name="target" required="false" rtexprvalue="true"/>
|
||||
<tagunit:assertAttribute name="style" required="false" rtexprvalue="true"/>
|
||||
<tagunit:assertAttribute name="css" required="false" rtexprvalue="true"/>
|
|
@ -1,3 +0,0 @@
|
|||
<%@ taglib uri="http://www.tagunit.org/tagunit/core" prefix="tagunit" %>
|
||||
|
||||
<tagunit:assertNoAttributes/>
|
|
@ -1,3 +0,0 @@
|
|||
<%@ taglib uri="http://www.tagunit.org/tagunit/core" prefix="tagunit" %>
|
||||
|
||||
<tagunit:assertNoAttributes/>
|
|
@ -1,7 +0,0 @@
|
|||
<%@ taglib uri="http://www.tagunit.org/tagunit/core" prefix="tagunit" %>
|
||||
|
||||
<tagunit:testTagLibrary uri="/test/google">
|
||||
|
||||
<tagunit:tagLibraryDescriptor uri="/WEB-INF/google.tld"/>
|
||||
|
||||
</tagunit:testTagLibrary>
|
|
@ -1,7 +0,0 @@
|
|||
<%@ taglib uri="http://www.tagunit.org/tagunit/core" prefix="tagunit" %>
|
||||
|
||||
<tagunit:assertBodyContent name="JSP"/>
|
||||
|
||||
<tagunit:assertAttribute name="target" required="false" rtexprvalue="true"/>
|
||||
<tagunit:assertAttribute name="style" required="false" rtexprvalue="true"/>
|
||||
<tagunit:assertAttribute name="css" required="false" rtexprvalue="true"/>
|
|
@ -1,7 +0,0 @@
|
|||
<%@ taglib uri="http://www.tagunit.org/tagunit/core" prefix="tagunit" %>
|
||||
|
||||
<tagunit:assertBodyContent name="JSP"/>
|
||||
|
||||
<tagunit:assertAttribute name="target" required="false" rtexprvalue="true"/>
|
||||
<tagunit:assertAttribute name="style" required="false" rtexprvalue="true"/>
|
||||
<tagunit:assertAttribute name="css" required="false" rtexprvalue="true"/>
|
|
@ -1,14 +0,0 @@
|
|||
<%@ taglib uri="http://www.tagunit.org/tagunit/core" prefix="tagunit" %>
|
||||
|
||||
<tagunit:assertBodyContent name="JSP"/>
|
||||
|
||||
<tagunit:assertAttribute name="key" required="false" rtexprvalue="true"/>
|
||||
<tagunit:assertAttribute name="start" required="false" rtexprvalue="true"/>
|
||||
<tagunit:assertAttribute name="maxResults" required="false" rtexprvalue="true"/>
|
||||
<tagunit:assertAttribute name="filter" required="false" rtexprvalue="true"/>
|
||||
<tagunit:assertAttribute name="restrict" required="false" rtexprvalue="true"/>
|
||||
<tagunit:assertAttribute name="safeSearch" required="false" rtexprvalue="true"/>
|
||||
<tagunit:assertAttribute name="lr" required="false" rtexprvalue="true"/>
|
||||
<tagunit:assertAttribute name="cache" required="false" rtexprvalue="true"/>
|
||||
<tagunit:assertAttribute name="site" required="false" rtexprvalue="true"/>
|
||||
<tagunit:assertAttribute name="type" required="false" rtexprvalue="true"/>
|
|
@ -1,3 +0,0 @@
|
|||
<%@ taglib uri="http://www.tagunit.org/tagunit/core" prefix="tagunit" %>
|
||||
|
||||
<tagunit:assertNoAttributes/>
|
|
@ -1,5 +0,0 @@
|
|||
<%@ taglib uri="http://www.tagunit.org/tagunit/core" prefix="tagunit" %>
|
||||
|
||||
<tagunit:assertBodyContent name="empty"/>
|
||||
|
||||
<tagunit:assertAttribute name="type" required="false" rtexprvalue="true"/>
|
|
@ -1,5 +0,0 @@
|
|||
<%@ taglib uri="http://www.tagunit.org/tagunit/core" prefix="tagunit" %>
|
||||
|
||||
<tagunit:assertBodyContent name="JSP"/>
|
||||
|
||||
<tagunit:assertNoAttributes/>
|
|
@ -1,3 +0,0 @@
|
|||
<%@ taglib uri="http://www.tagunit.org/tagunit/core" prefix="tagunit" %>
|
||||
|
||||
<tagunit:assertNoAttributes/>
|
|
@ -1,3 +0,0 @@
|
|||
<%@ taglib uri="http://www.tagunit.org/tagunit/core" prefix="tagunit" %>
|
||||
|
||||
<tagunit:assertNoAttributes/>
|
|
@ -1,5 +0,0 @@
|
|||
<%@ taglib uri="http://www.tagunit.org/tagunit/core" prefix="tagunit" %>
|
||||
|
||||
<tagunit:assertBodyContent name="JSP"/>
|
||||
|
||||
<tagunit:assertAttribute name="key" required="false" rtexprvalue="true"/>
|
|
@ -1,3 +0,0 @@
|
|||
<%@ taglib uri="http://www.tagunit.org/tagunit/core" prefix="tagunit" %>
|
||||
|
||||
<tagunit:assertNoAttributes/>
|
Before Width: | Height: | Size: 1.1 KiB |
Before Width: | Height: | Size: 789 B |
Before Width: | Height: | Size: 49 B |
|
@ -1,17 +0,0 @@
|
|||
<%@ taglib uri="http://www.tagunit.org/tagunit/core" prefix="tagunit" %>
|
||||
|
||||
<%--
|
||||
Tests for TagUnit tag libraries
|
||||
-------------------------------
|
||||
This page contains the tests required to automatically test the basics of
|
||||
the tag libraries that are a part of the TagUnit framework
|
||||
|
||||
--%>
|
||||
|
||||
<tagunit:testTagLibrary uri="/test/tagunit">
|
||||
<tagunit:tagLibraryDescriptor jar="tagunit.jar" name="tagunit-core.tld"/>
|
||||
</tagunit:testTagLibrary>
|
||||
|
||||
<tagunit:testTagLibrary uri="/test/tagunit">
|
||||
<tagunit:tagLibraryDescriptor jar="tagunit.jar" name="tagunit-display.tld"/>
|
||||
</tagunit:testTagLibrary>
|
|
@ -1,45 +0,0 @@
|
|||
<html>
|
||||
|
||||
<head>
|
||||
<title>TagUnit</title>
|
||||
<link rel="stylesheet" href="page.css">
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
<p>
|
||||
<h1>TagUnit license information</h1>
|
||||
</p>
|
||||
|
||||
<pre>Copyright (c) 2002, Simon Brown
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions are met:
|
||||
|
||||
- Redistributions of source code must retain the above copyright
|
||||
notice, this list of conditions and the following disclaimer.
|
||||
|
||||
- Redistributions in binary form must reproduce the above copyright
|
||||
notice, this list of conditions and the following disclaimer in
|
||||
the documentation and/or other materials provided with the
|
||||
distribution.
|
||||
|
||||
- Neither the name of TagUnit nor the names of its contributors may
|
||||
be used to endorse or promote products derived from this software
|
||||
without specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
|
||||
LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
POSSIBILITY OF SUCH DAMAGE.</pre>
|
||||
|
||||
</body>
|
||||
</html>
|
|
@ -1,50 +0,0 @@
|
|||
body, p, table, thead, tbody {
|
||||
font-family: verdana, arial, helvetica;
|
||||
font-size: 8pt;
|
||||
font-style: normal;
|
||||
font-weight: normal;
|
||||
text-align: left
|
||||
}
|
||||
|
||||
h1 {
|
||||
font-size: 18pt;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
h2 {
|
||||
font-size: 14pt;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
a:link, a:visited, a:active {
|
||||
color: #000000;
|
||||
}
|
||||
|
||||
.pass {
|
||||
color: 00CC00;
|
||||
}
|
||||
|
||||
.warning {
|
||||
color: FF9900;
|
||||
}
|
||||
|
||||
.fail {
|
||||
color: #CC0000;
|
||||
}
|
||||
|
||||
.error {
|
||||
color: #CC0000;
|
||||
}
|
||||
|
||||
.message {
|
||||
font-size: 8pt;
|
||||
}
|
||||
|
||||
.banner {
|
||||
font-size: 8pt;
|
||||
border-top: solid black 2px;
|
||||
border-right: solid black 2px;
|
||||
border-bottom: solid black 2px;
|
||||
border-left: solid black 2px;
|
||||
color: white;
|
||||
}
|
|
@ -1,206 +0,0 @@
|
|||
<!--
|
||||
normal = 6699CC
|
||||
red = CC0000
|
||||
warning = CC6600
|
||||
pass = 00CC00
|
||||
|
||||
-->
|
||||
|
||||
<%@ page import="org.tagunit.*" %>
|
||||
<%@ page errorPage="error.jsp" %>
|
||||
|
||||
<%
|
||||
String color = "#6699CC";
|
||||
TestContextContainer testContext = (TestContextContainer)session.getAttribute(Constants.TEST_CONTEXT);
|
||||
if (testContext != null && testContext.getStatus().equals(TestContext.PASS)) {
|
||||
color = "#00CC00";
|
||||
} else if (testContext != null && testContext.getStatus().equals(TestContext.WARNING)) {
|
||||
color = "#CC6600";
|
||||
} else if (testContext != null && (testContext.getStatus().equals(TestContext.FAIL) || testContext.getStatus().equals(TestContext.ERROR))) {
|
||||
color = "#CC0000";
|
||||
}
|
||||
%>
|
||||
|
||||
<%@ taglib uri="http://www.tagunit.org/tagunit/display" prefix="tagunit" %>
|
||||
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<title>TagUnit - Test Results</title>
|
||||
<tagunit:base/>
|
||||
<link rel="stylesheet" href="page.css">
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
<table width="100%" cellpadding="0" cellspacing="2" class="banner">
|
||||
<tr>
|
||||
<td width="200">
|
||||
<a href="../index.jsp"><img src="images/tagunit.gif" alt="Banner image" border="0" /></a></td>
|
||||
<td bgcolor="<%= color %>" valign="top" align="right">
|
||||
Version <tagunit:getProperty name="version"/>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<table width="100%" border="0">
|
||||
<tr>
|
||||
<td>
|
||||
<h2>Test results</h2>
|
||||
</td>
|
||||
<td align="right">
|
||||
<a href="servlet/ViewResults?showPasses=false&showWarnings=true">Hide passes</a>
|
||||
|
|
||||
<a href="servlet/ViewResults?showPasses=false&showWarnings=false">Hide warnings</a>
|
||||
|
|
||||
<a href="servlet/ViewResults?showPasses=true&showWarnings=true">Show all</a>
|
||||
<br>
|
||||
Ignore Warnings -
|
||||
<a href="servlet/ViewResults?showPasses=true&showWarnings=true&ignoreWarnings=true">Yes</a>
|
||||
|
|
||||
<a href="servlet/ViewResults?showPasses=true&showWarnings=true&ignoreWarnings=false">No</a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
|
||||
<div align="center">
|
||||
<br />
|
||||
<br />
|
||||
<table>
|
||||
<tr>
|
||||
<td>
|
||||
<table>
|
||||
<tr height="1">
|
||||
<td width="64"></td>
|
||||
<td width="400" bgcolor="#000000"></td>
|
||||
<td width="32"></td>
|
||||
</tr>
|
||||
</table>
|
||||
<table>
|
||||
<tr>
|
||||
<td width="64">
|
||||
<b>Passes</b>
|
||||
</td>
|
||||
<td width="<%= (testContext.getNumberOfPasses()*400)/testContext.getNumberOfTests() %>" bgcolor="#00CC00"></td>
|
||||
<td width="32">
|
||||
<jsp:getProperty name="testContext" property="numberOfPasses"/>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<%
|
||||
if (!org.tagunit.TagUnitProperties.getInstance().getIgnoreWarnings()) {
|
||||
%>
|
||||
<table>
|
||||
<tr>
|
||||
<td width="64">
|
||||
<b>Warnings</b>
|
||||
</td>
|
||||
<td width="<%= (testContext.getNumberOfWarnings()*400)/testContext.getNumberOfTests() %>" bgcolor="#CC6600"></td>
|
||||
<td width="32">
|
||||
<jsp:getProperty name="testContext" property="numberOfWarnings"/>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<%
|
||||
}
|
||||
%>
|
||||
<table>
|
||||
<tr>
|
||||
<td width="64">
|
||||
<b>Failures</b>
|
||||
</td>
|
||||
<td width="<%= (testContext.getNumberOfFailures()*400)/testContext.getNumberOfTests() %>" bgcolor="#CC0000"></td>
|
||||
<td width="32">
|
||||
<jsp:getProperty name="testContext" property="numberOfFailures"/>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<table>
|
||||
<tr>
|
||||
<td width="64">
|
||||
<b>Errors</b>
|
||||
</td>
|
||||
<td width="<%= (testContext.getNumberOfErrors()*400)/testContext.getNumberOfTests() %>" bgcolor="#CC0000"></td>
|
||||
<td width="32">
|
||||
<jsp:getProperty name="testContext" property="numberOfErrors"/>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<table>
|
||||
<tr height="1">
|
||||
<td width="64"></td>
|
||||
<td width="400" bgcolor="#000000"></td>
|
||||
<td width="32"></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<br />
|
||||
<br />
|
||||
</div>
|
||||
|
||||
<table width="100%" border="0">
|
||||
<tagunit:testResults id="result">
|
||||
|
||||
<tagunit:showLevel level="1">
|
||||
<tr><td colspan="2"> </td></tr>
|
||||
</tagunit:showLevel>
|
||||
|
||||
<tr>
|
||||
<td>
|
||||
<img src="images/spacer.gif" width="<%= level.intValue()*16 %>" height="1">
|
||||
<tagunit:hasChildren><b></tagunit:hasChildren>
|
||||
<%
|
||||
if (result instanceof org.tagunit.TagTestContext) {
|
||||
org.tagunit.TagTestContext ttc = (org.tagunit.TagTestContext)result;
|
||||
out.print("<a name=\"" + ttc.getTagInfo().getName() + "\">");
|
||||
out.print("<a href=\"servlet/ViewResults?&tag=" + ttc.getTagInfo().getName() + "#" + ttc.getTagInfo().getName() + "\">");
|
||||
}
|
||||
%>
|
||||
<jsp:getProperty name="result" property="name"/>
|
||||
<%
|
||||
if (result instanceof org.tagunit.TagTestContext) {
|
||||
out.print("</a>");
|
||||
}
|
||||
%>
|
||||
<tagunit:hasChildren></b></tagunit:hasChildren>
|
||||
</td>
|
||||
<td>
|
||||
<tagunit:hasChildren><b></tagunit:hasChildren>
|
||||
<tagunit:pass><span class="pass">Pass</span></tagunit:pass>
|
||||
<tagunit:warning><span class="warning">Warning</span></tagunit:warning>
|
||||
<tagunit:failure><span class="fail">Fail</span></tagunit:failure>
|
||||
<tagunit:error><span class="error">Error</span></tagunit:error>
|
||||
<tagunit:hasChildren></b></tagunit:hasChildren>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tagunit:hasMessage>
|
||||
<tagunit:warning>
|
||||
<tr><td><span class="warning"><img src="images/spacer.gif" width="<%= level.intValue()*24 %>" height="1">Warning : <tagunit:filter><jsp:getProperty name="result" property="message"/></tagunit:filter></span></td><td> </td></tr>
|
||||
</tagunit:warning>
|
||||
<tagunit:failure>
|
||||
<tr><td><span class="fail"><code><img src="images/spacer.gif" width="<%= level.intValue()*24 %>" height="1">Failure : <tagunit:filter><jsp:getProperty name="result" property="message"/></tagunit:filter></code></span></td><td> </td></tr>
|
||||
</tagunit:failure>
|
||||
<tagunit:error>
|
||||
<tr><td><span class="error"><code><img src="images/spacer.gif" width="<%= level.intValue()*24 %>" height="1">Error : <tagunit:filter><jsp:getProperty name="result" property="message"/></tagunit:filter></code></span></td><td> </td></tr>
|
||||
</tagunit:error>
|
||||
</tagunit:hasMessage>
|
||||
|
||||
</tagunit:testResults>
|
||||
|
||||
</table>
|
||||
|
||||
<br />
|
||||
<br />
|
||||
|
||||
<div align="center">
|
||||
<a href="license.html">License</a>
|
||||
</div>
|
||||
|
||||
</body>
|
||||
|
||||
</html>
|