Changeset 38949


Ignore:
Timestamp:
2024-04-23T19:43:27+12:00 (11 hours ago)
Author:
anupama
Message:

Like GsdlCollageApplet, JPhind when run as a commandline application or applet (a.o.t. webswing application/applet) also needs webswing-api.jar to be in the web/applet folder, since we started importing webswing packages (even if not run as a webswing program). 1. Adjusted the now unused service PhindPhraseBrowse's applet archive attribute to include this jar file in the list of those needed. 2. Added the jar mention in the comment to JPhind.java with a sample command on how to successfully launch JPhind from the commandline. 3. build.xml's compile-core target now tries to put this jar file into web/applet if it doesn't yet exist there. But this assumes that ext/webswing has already been setup at this stage, which I think is the case.

Location:
main/trunk/greenstone3
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • main/trunk/greenstone3/build.xml

    r38894 r38949  
    34993499
    35003500  <target name="update-core" depends="init,svnupdate-core,clean-core,compile-core"
    3501     description="Update only the Greenstone core" />
     3501      description="Update only the Greenstone core" />
    35023502 
    35033503  <target name="svnupdate-core" unless="nosvn.mode">
     
    35113511
    35123512  <target name="clean-core"
    3513     description="Clean only the Greenstone core">
     3513      description="Clean only the Greenstone core">
    35143514    <!-- should this delete the gsdl3.jar from web/WEB-INF?? -->
    35153515    <delete dir="${build.home}"/>
     
    36183618    <mkdir dir="${web.applet}"/>
    36193619    <copy file="${build.home}/GsdlCollageApplet.jar" todir="${web.applet}"/>
    3620     <!-- TODO: Does GsdlCollageApplet (like phind) also needs xercesImpl.jar and xml-apis.jar to be in web/applet??? -->
    3621 
     3620   
     3621    <!-- phind and GsdlCollage also need webswing-api.jar to be in web/applet -->
     3622    <if>
     3623      <bool>
     3624    <and>
     3625      <not><available file="${web.applet}/webswing-api.jar"/></not>
     3626      <available file="${web.writablehome}/ext/webswing/api/webswing-api.jar"/>
     3627    </and>
     3628      </bool>
     3629      <copy file="${web.writablehome}/ext/webswing/api/webswing-api.jar" todir="${web.applet}"/>
     3630      <else>
     3631    <echo>Could not find ${web.writablehome}/ext/webswing/api/webswing-api.jar</echo>
     3632    <echo>to copy into ${web.applet}</echo>
     3633      </else>
     3634    </if>
     3635   
    36223636   <if>
    36233637      <bool><istrue value="${tomcat.islocal}"/></bool>
     
    37193733      <copy file="${basedir}/TransformingLibrary.launch.in" tofile="${basedir}/TransformingLibrary.launch" filtering="true" overwrite="true"/>
    37203734    </if>
    3721 <!--
    3722     <if>
    3723       <bool><not><available file="${basedir}/LibraryCommandline.launch"/></not></bool>         
    3724       <copy file="${basedir}/LibraryCommandline.launch.in" tofile="${basedir}/LibraryCommandline.launch" filtering="true" overwrite="true"/>
    3725     </if>
    3726 -->
     3735    <!--
     3736    <if>
     3737    <bool><not><available file="${basedir}/LibraryCommandline.launch"/></not></bool>       
     3738    <copy file="${basedir}/LibraryCommandline.launch.in" tofile="${basedir}/LibraryCommandline.launch" filtering="true" overwrite="true"/>
     3739    </if>
     3740    -->
    37273741  </target>
    37283742 
  • main/trunk/greenstone3/src/java/org/greenstone/applet/phind/JPhind.java

    r38948 r38949  
    4141To run this applet as an application, for which purpose this class has a main() method, run as:
    4242
    43 java -cp ./web/WEB-INF/lib/gsdl3.jar:./web/WEB-INF/lib/gutil.jar:./web/applet/phind.jar:./web/applet/xercesImpl.jar:./web/applet/xml-apis.jar:./web/WEB-INF/lib/log4j-1.2.8.jar:./web/WEB-INF/classes org.greenstone.applet.phind.JPhind "http://localhost:8383/greenstone3/library?a=a&rt=d&s=PhindApplet&c=tudor" --collection tudor --classifier 1 --phindcgi "?a=a&amp;rt=r&amp;s=PhindApplet&amp;o=xml&amp;ro=1" --library "library" --backdrop "interfaces/default/images/phindbg1.jpg" --xtraParams "orientation=vertical&depth=2&resultorder=L,l,E,e,D,d&fontsize=10&blocksize=10"
     43java -cp ./web/WEB-INF/lib/gsdl3.jar:./web/WEB-INF/lib/gutil.jar:./web/applet/phind.jar:./web/applet/webswing-api.jar:./web/applet/xercesImpl.jar:./web/applet/xml-apis.jar:./web/WEB-INF/lib/log4j-1.2.8.jar:./web/WEB-INF/classes org.greenstone.applet.phind.JPhind "http://localhost:8383/greenstone3/library?a=a&rt=d&s=PhindApplet&c=tudor" --collection tudor --classifier 1 --phindcgi "?a=a&amp;rt=r&amp;s=PhindApplet&amp;o=xml&amp;ro=1" --library "library" --backdrop "interfaces/default/images/phindbg1.jpg" --xtraParams "orientation=vertical&depth=2&resultorder=L,l,E,e,D,d&fontsize=10&blocksize=10"
    4444
    4545Basic version:
  • main/trunk/greenstone3/src/java/org/greenstone/gsdl3/service/PhindPhraseBrowse.java

    r38796 r38949  
    102102    // this is left blank at this end, and must be filled in by applet action - if the library name is not needed, this param is left out
    103103    // phindcgi param now is not complete - library must be prepended to it.
    104     String app_info = "<"+GSXML.APPLET_ELEM+" CODEBASE='applet' CODE='org.greenstone.applet.phind.JPhind.class' ARCHIVE='phind.jar, xercesImpl.jar, xml-apis.jar' WIDTH='500' HEIGHT='400'><PARAM NAME='library' VALUE=''/> <PARAM NAME='phindcgi' VALUE='?";
     104    String app_info = "<"+GSXML.APPLET_ELEM+" CODEBASE='applet' CODE='org.greenstone.applet.phind.JPhind.class' ARCHIVE='phind.jar, xercesImpl.jar, xml-apis.jar, webswing-api.jar' WIDTH='500' HEIGHT='400'><PARAM NAME='library' VALUE=''/> <PARAM NAME='phindcgi' VALUE='?";
    105105    app_info += GSParams.ACTION +"=a&amp;"+GSParams.REQUEST_TYPE +"=r&amp;"+GSParams.SERVICE+"="+PHIND_SERVICE+"&amp;"+GSParams.OUTPUT+"=xml&amp;"+GSParams.RESPONSE_ONLY+"=1'/>";
    106106    app_info +="<PARAM NAME='collection'   VALUE='";
Note: See TracChangeset for help on using the changeset viewer.