Compare commits
1 commit
Author | SHA1 | Date | |
---|---|---|---|
e0105687fd |
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,7 +1,6 @@
|
|||
build
|
||||
dist
|
||||
javadoc
|
||||
tlddoc
|
||||
*.bat
|
||||
key.txt
|
||||
ChangeLog
|
|
@ -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">
|
|
@ -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">
|
||||
|
@ -29,7 +28,7 @@
|
|||
<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="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="Project" active="false" anchor="left" auto_hide="false" internal_type="docked" type="docked" visible="false" weight="0.33264887" 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="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" />
|
||||
|
@ -37,7 +36,7 @@
|
|||
<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="Ant Build" active="false" anchor="right" auto_hide="false" internal_type="docked" type="docked" visible="true" 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="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" />
|
||||
|
@ -66,7 +65,13 @@
|
|||
<component name="ProjectViewSettings">
|
||||
<navigator currentView="ProjectPane" flattenPackages="false" showMembers="false" showModules="false" showLibraryContents="false" hideEmptyPackages="false" showStructure="false" autoscrollToSource="false" splitterProportion="0.5" />
|
||||
<view id="ProjectPane">
|
||||
<expanded_node type="directory" url="file://$PROJECT_DIR$/src/net/thauvin/google" />
|
||||
<expanded_node type="directory" url="file://$PROJECT_DIR$/src/net/thauvin/google/taglibs" />
|
||||
<expanded_node type="directory" url="file://$PROJECT_DIR$/src/net/thauvin" />
|
||||
<expanded_node type="directory" url="file://$PROJECT_DIR$/tlds" />
|
||||
<expanded_node type="directory" url="file://$PROJECT_DIR$/src/net" />
|
||||
<expanded_node type="directory" url="file://$PROJECT_DIR$" />
|
||||
<expanded_node type="directory" url="file://$PROJECT_DIR$/src" />
|
||||
</view>
|
||||
<view id="PackagesPane" />
|
||||
</component>
|
||||
|
@ -95,17 +100,73 @@
|
|||
</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">
|
||||
<first-group selected-file="file://$PROJECT_DIR$/src/net/thauvin/google/taglibs/KeySupport.java">
|
||||
<entry file="file://$PROJECT_DIR$/src/net/thauvin/google/taglibs/Search.java" 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">
|
||||
<state line="55" column="41" selection-start="2131" selection-end="2131" vertical-scroll-proportion="0.3096539">
|
||||
<folding />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/build.properties" pinned="false">
|
||||
<entry file="file://$PROJECT_DIR$/src/net/thauvin/google/taglibs/QuerySupport.java" 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">
|
||||
<state line="55" column="45" selection-start="2226" selection-end="2226" vertical-scroll-proportion="-0.29690346">
|
||||
<folding />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/src/net/thauvin/google/taglibs/StyleSupport.java" pinned="false">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state line="49" column="22" selection-start="1996" selection-end="1996" vertical-scroll-proportion="-1.0437158">
|
||||
<folding />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/src/net/thauvin/google/taglibs/SearchResultSupport.java" pinned="false">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state line="54" column="22" selection-start="2174" selection-end="2174" vertical-scroll-proportion="-3.3351548">
|
||||
<folding />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/src/net/thauvin/google/taglibs/SearchResult.java" pinned="false">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state line="59" column="7" selection-start="2237" selection-end="2237" vertical-scroll-proportion="0.41347906">
|
||||
<folding />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/src/net/thauvin/google/taglibs/CachedPage.java" pinned="false">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state line="87" column="8" selection-start="2437" selection-end="2989" vertical-scroll-proportion="0.66302365">
|
||||
<folding />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/src/net/thauvin/google/taglibs/Spelling.java" pinned="false">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state line="52" column="13" selection-start="2053" selection-end="2053" vertical-scroll-proportion="0.20400728">
|
||||
<folding />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/src/net/thauvin/google/taglibs/KeySupport.java" pinned="false">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state line="56" column="8" selection-start="2354" selection-end="2354" vertical-scroll-proportion="0.55737704">
|
||||
<folding />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/src/net/thauvin/google/taglibs/EstimatedTotal.java" pinned="false">
|
||||
<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/GoogleSearchBean.java" pinned="false">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state line="52" column="28" selection-start="2142" selection-end="2142" vertical-scroll-proportion="0.3406193">
|
||||
<folding />
|
||||
</state>
|
||||
</provider>
|
||||
|
@ -114,6 +175,78 @@
|
|||
<second-group />
|
||||
</component>
|
||||
<component name="editorHistoryManager">
|
||||
<entry file="file://$PROJECT_DIR$/google-examples/WEB-INF/web.xml">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state line="8" column="70" selection-start="405" selection-end="405" vertical-scroll-proportion="0.23776224">
|
||||
<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="61" column="7" selection-start="2249" selection-end="2249" vertical-scroll-proportion="0.44821733">
|
||||
<folding>
|
||||
<element signature="imports" expanded="true" />
|
||||
</folding>
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/htdocs/docs.html">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state line="374" column="59" selection-start="15401" selection-end="15409" vertical-scroll-proportion="0.3327674">
|
||||
<folding />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/tlds/google.tld">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state line="148" column="20" selection-start="4208" selection-end="4208" vertical-scroll-proportion="4.271647">
|
||||
<folding />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/build.xml">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state line="33" column="73" selection-start="1193" selection-end="1193" vertical-scroll-proportion="0.39388794">
|
||||
<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.29690346">
|
||||
<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="-1.0437158">
|
||||
<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="54" column="22" selection-start="2174" selection-end="2174" vertical-scroll-proportion="-3.3351548">
|
||||
<folding />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/src/net/thauvin/google/taglibs/SearchResult.java">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state line="59" column="7" selection-start="2237" selection-end="2237" vertical-scroll-proportion="0.41347906">
|
||||
<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.66302365">
|
||||
<folding />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<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">
|
||||
|
@ -121,102 +254,30 @@
|
|||
</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">
|
||||
<state line="56" column="8" selection-start="2354" selection-end="2354" vertical-scroll-proportion="0.55737704">
|
||||
<folding />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/src/net/thauvin/google/taglibs/QuerySupport.java">
|
||||
<entry file="file://$PROJECT_DIR$/src/net/thauvin/google/taglibs/Spelling.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">
|
||||
<state line="52" column="13" selection-start="2053" selection-end="2053" vertical-scroll-proportion="0.20400728">
|
||||
<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="52" column="13" selection-start="2062" selection-end="2062" vertical-scroll-proportion="0.32088286">
|
||||
<folding />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<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">
|
||||
<state line="55" column="41" selection-start="2131" selection-end="2131" vertical-scroll-proportion="0.3096539">
|
||||
<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">
|
||||
<folding />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/build.properties">
|
||||
<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>
|
||||
<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="52" column="28" selection-start="2142" selection-end="2142" vertical-scroll-proportion="0.3406193">
|
||||
<folding />
|
||||
</state>
|
||||
</provider>
|
||||
|
@ -457,6 +518,16 @@
|
|||
</component>
|
||||
<component name="JavadocPlugin.JavadocProjectComponent">
|
||||
<JavadocEntries>
|
||||
<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>
|
||||
<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>
|
||||
<JavadocEntry>
|
||||
<option name="path" value="$PROJECT_DIR$/../../../jdk1.3.1_09/docs/api/" />
|
||||
<option name="name" value="C/jdk1.3.1_09/docs/api/" />
|
|
@ -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,72 +44,66 @@
|
|||
</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/"/>
|
||||
<!-- Freeze the mod dates -->
|
||||
<touch>
|
||||
<fileset dir="${build.war}"/>
|
||||
</touch>
|
||||
<!-- 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 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 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>
|
||||
<fileset dir="${build.release}"/>
|
||||
</touch>
|
||||
<!-- Create the ZIP archive -->
|
||||
<zip destfile="${dist.dir}/${release.name}.zip" basedir="${build.dir}" includes="${release.name}/**"/>
|
||||
<zip destfile="${dist.dir}/${release.name}.zip" basedir="${build.release}"/>
|
||||
<!-- Create the TAR archive -->
|
||||
<tar tarfile="${dist.dir}/${release.name}.tar.gz" compression="gzip">
|
||||
<tarfileset dir="${build.release}" prefix="${release.name}" mode="644"/>
|
||||
</tar>
|
||||
<tarfileset dir="${build.release}" prefix="${release.name}" mode="644"/>
|
||||
</tar>
|
||||
</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">
|
|
@ -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>
|
||||
|
@ -75,12 +71,11 @@ body,td,font,p,a{font-family:arial,sans-serif}
|
|||
<li>
|
||||
<a href="http://www.postneo.com/">Matt Croydon</a>
|
||||
</li>
|
||||
<!--
|
||||
<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>
|
|
@ -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>
|
||||
|
@ -430,22 +427,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 +666,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 +730,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 +746,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 +764,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 +781,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>
|
|
@ -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>
|
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 |
Before Width: | Height: | Size: 13 KiB After Width: | Height: | Size: 13 KiB |
Before Width: | Height: | Size: 49 KiB After Width: | Height: | Size: 49 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 |
|
@ -22,39 +22,36 @@ 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>
|
||||
</p>
|
||||
</td>
|
||||
|
@ -82,8 +79,12 @@ 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>
|
||||
|
@ -92,8 +93,12 @@ body,td,font,p,a{font-family:arial,sans-serif}
|
|||
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>
|
|
@ -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,7 +50,7 @@ import java.net.URLEncoder;
|
|||
*
|
||||
* @author Erik C. Thauvin
|
||||
* @created April 25, 2002
|
||||
* @version $Revision$, $Date$
|
||||
* @version $Revision$
|
||||
* @since 1.0
|
||||
*/
|
||||
public class GoogleSearchBean
|
||||
|
@ -95,13 +95,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 +110,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;
|
||||
|
@ -171,30 +163,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.
|
||||
*
|
||||
|
@ -605,10 +573,6 @@ public class GoogleSearchBean
|
|||
{
|
||||
return String.valueOf(result.getDocumentFiltering());
|
||||
}
|
||||
else if (property.equalsIgnoreCase("searchKeywords"))
|
||||
{
|
||||
return getKeywords();
|
||||
}
|
||||
else if (property.equalsIgnoreCase("searchQuery"))
|
||||
{
|
||||
return result.getSearchQuery();
|
|
@ -147,11 +147,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.
|
||||
*/
|
|
@ -42,26 +42,26 @@ 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 String lr = GoogleSearchBean.DEFAULT_LR;
|
||||
private String restrict = GoogleSearchBean.DEFAULT_RESTRICT;
|
||||
private String site = GoogleSearchBean.DEFAULT_SITE;
|
||||
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 int maxResults = GoogleSearchBean.DEFAULT_MAX_RESULTS;
|
||||
private int start = GoogleSearchBean.DEFAULT_START;
|
||||
private String type = GoogleSearchBean.DEFAULT_TYPE;
|
||||
|
||||
/**
|
||||
* Sets the cache attribute.
|
||||
|
@ -106,7 +106,7 @@ public class Search extends QuerySupport
|
|||
}
|
||||
catch (NumberFormatException e)
|
||||
{
|
||||
;// Do nothing
|
||||
; // Do nothing
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -153,19 +153,116 @@ public class Search extends QuerySupport
|
|||
}
|
||||
catch (NumberFormatException e)
|
||||
{
|
||||
;// Do nothing
|
||||
; // Do nothing
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the (file) type attribute.
|
||||
* doEndTag method.
|
||||
*
|
||||
* @param type The new attribute value.
|
||||
* @since 1.0.1
|
||||
* @return EVAL_PAGE
|
||||
* @exception JspException
|
||||
*/
|
||||
public final void setType(String type)
|
||||
public int doEndTag()
|
||||
throws JspException
|
||||
{
|
||||
this.type = type;
|
||||
final String query = getQuery();
|
||||
|
||||
if (TagUtility.isValidString(query, true))
|
||||
{
|
||||
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.getGoogleSearch(getKey(), getSite() + getQuery(),
|
||||
getStart(), getMaxResults(), getFilter(),
|
||||
getRestrict(), getSafeSearch(), getLr());
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
throw TagUtility.outputError("search", e);
|
||||
}
|
||||
}
|
||||
else if (!getCache())
|
||||
{
|
||||
bean.reset();
|
||||
}
|
||||
|
||||
// Reset the values
|
||||
reset();
|
||||
|
||||
return EVAL_PAGE;
|
||||
}
|
||||
|
||||
/**
|
||||
* doStartTag method.
|
||||
*
|
||||
* @return EVAL_BODY_TAG.
|
||||
* @exception JspException
|
||||
*/
|
||||
public int doStartTag()
|
||||
throws JspException
|
||||
{
|
||||
// Get the Google bean
|
||||
bean = TagUtility.getGoogleSearchBean(pageContext);
|
||||
|
||||
// Create a new bean if it doesn't exists
|
||||
if (bean == null)
|
||||
{
|
||||
try
|
||||
{
|
||||
bean = new GoogleSearchBean();
|
||||
|
||||
// Set the bean as named session attribute
|
||||
pageContext.setAttribute(TagUtility.GOOGLE_SEARCH_BEAN, bean,
|
||||
PageContext.SESSION_SCOPE);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
throw new JspException("An unknown error ocurred while creating the Google search bean.");
|
||||
}
|
||||
}
|
||||
|
||||
return EVAL_BODY_TAG;
|
||||
}
|
||||
|
||||
/**
|
||||
* Release method.
|
||||
*/
|
||||
public void release()
|
||||
{
|
||||
super.release();
|
||||
|
||||
// Reset all attributes
|
||||
start = GoogleSearchBean.DEFAULT_START;
|
||||
maxResults = GoogleSearchBean.DEFAULT_MAX_RESULTS;
|
||||
filter = GoogleSearchBean.DEFAULT_FILTER;
|
||||
safeSearch = GoogleSearchBean.DEFAULT_SAFE_SEARCH;
|
||||
restrict = GoogleSearchBean.DEFAULT_RESTRICT;
|
||||
lr = GoogleSearchBean.DEFAULT_LR;
|
||||
site = GoogleSearchBean.DEFAULT_SITE;
|
||||
cache = GoogleSearchBean.DEFAULT_CACHE;
|
||||
|
||||
// Reset the bean
|
||||
bean = null;
|
||||
|
||||
// Reset the values
|
||||
reset();
|
||||
}
|
||||
|
||||
/**
|
||||
* Reset the values.
|
||||
*/
|
||||
protected void reset()
|
||||
{
|
||||
super.reset();
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -255,23 +352,6 @@ public class Search extends QuerySupport
|
|||
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.
|
||||
*
|
||||
|
@ -282,7 +362,7 @@ public class Search extends QuerySupport
|
|||
private boolean getBoolParam(String paramName, boolean defaultValue)
|
||||
{
|
||||
String param =
|
||||
TagUtility.getParameter(pageContext.getRequest(), paramName);
|
||||
TagUtility.getParameter(pageContext.getRequest(), paramName);
|
||||
|
||||
if (TagUtility.isValidString(param, true))
|
||||
{
|
||||
|
@ -302,7 +382,7 @@ public class Search extends QuerySupport
|
|||
private int getIntParam(String paramName, int defaultValue)
|
||||
{
|
||||
String param =
|
||||
TagUtility.getParameter(pageContext.getRequest(), paramName);
|
||||
TagUtility.getParameter(pageContext.getRequest(), paramName);
|
||||
|
||||
if (TagUtility.isValidString(param, true))
|
||||
{
|
||||
|
@ -312,7 +392,7 @@ public class Search extends QuerySupport
|
|||
}
|
||||
catch (NumberFormatException e)
|
||||
{
|
||||
;// Do nothing
|
||||
; // Do nothing
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -329,7 +409,7 @@ public class Search extends QuerySupport
|
|||
private String getStringParam(String paramName, String defaultValue)
|
||||
{
|
||||
String param =
|
||||
TagUtility.getParameter(pageContext.getRequest(), paramName);
|
||||
TagUtility.getParameter(pageContext.getRequest(), paramName);
|
||||
|
||||
if (TagUtility.isValidString(param, true))
|
||||
{
|
||||
|
@ -338,115 +418,4 @@ public class Search extends QuerySupport
|
|||
|
||||
return defaultValue;
|
||||
}
|
||||
|
||||
/**
|
||||
* doEndTag method.
|
||||
*
|
||||
* @return EVAL_PAGE
|
||||
* @exception JspException
|
||||
*/
|
||||
public int doEndTag()
|
||||
throws JspException
|
||||
{
|
||||
final String query = getQuery();
|
||||
|
||||
if (TagUtility.isValidString(query, true))
|
||||
{
|
||||
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());
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
throw TagUtility.outputError("search", e);
|
||||
}
|
||||
}
|
||||
else if (!getCache())
|
||||
{
|
||||
bean.reset();
|
||||
}
|
||||
|
||||
// Reset the values
|
||||
reset();
|
||||
|
||||
return EVAL_PAGE;
|
||||
}
|
||||
|
||||
/**
|
||||
* doStartTag method.
|
||||
*
|
||||
* @return EVAL_BODY_TAG.
|
||||
* @exception JspException
|
||||
*/
|
||||
public int doStartTag()
|
||||
throws JspException
|
||||
{
|
||||
// Get the Google bean
|
||||
bean = TagUtility.getGoogleSearchBean(pageContext);
|
||||
|
||||
// Create a new bean if it doesn't exists
|
||||
if (bean == null)
|
||||
{
|
||||
try
|
||||
{
|
||||
bean = new GoogleSearchBean();
|
||||
|
||||
// Set the bean as named session attribute
|
||||
pageContext.setAttribute(TagUtility.GOOGLE_SEARCH_BEAN, bean,
|
||||
PageContext.SESSION_SCOPE);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
throw new JspException("An unknown error ocurred while creating the Google search bean.");
|
||||
}
|
||||
}
|
||||
|
||||
return EVAL_BODY_TAG;
|
||||
}
|
||||
|
||||
/**
|
||||
* Release method.
|
||||
*/
|
||||
public void release()
|
||||
{
|
||||
super.release();
|
||||
|
||||
// Reset all attributes
|
||||
start = GoogleSearchBean.DEFAULT_START;
|
||||
maxResults = GoogleSearchBean.DEFAULT_MAX_RESULTS;
|
||||
filter = GoogleSearchBean.DEFAULT_FILTER;
|
||||
safeSearch = GoogleSearchBean.DEFAULT_SAFE_SEARCH;
|
||||
restrict = GoogleSearchBean.DEFAULT_RESTRICT;
|
||||
lr = GoogleSearchBean.DEFAULT_LR;
|
||||
site = GoogleSearchBean.DEFAULT_SITE;
|
||||
cache = GoogleSearchBean.DEFAULT_CACHE;
|
||||
type = GoogleSearchBean.DEFAULT_TYPE;
|
||||
|
||||
// Reset the bean
|
||||
bean = null;
|
||||
|
||||
// Reset the values
|
||||
reset();
|
||||
}
|
||||
|
||||
/**
|
||||
* Reset the values.
|
||||
*/
|
||||
protected void reset()
|
||||
{
|
||||
super.reset();
|
||||
}
|
||||
}
|
|
@ -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";
|
||||
}
|
||||
|
||||
/**
|
|
@ -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>
|
||||
|
@ -160,11 +162,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 +176,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>
|