[opencms-dev] ht:dig some more Problems

Thomas März thomasmaerz at gmx.de
Thu Jul 24 12:55:02 CEST 2003


"Joachim Arrasz" <info at arrasz.de> writes:
> steps i have to do for this.We actually can`t use Lucene as search
> engine so i have to do this fast.

<%
String htConfig = "config";
String format = "format";
String words = request.getParameter("words");

String htQuery = "config=" + htConfig + "&format=" + format + "&words=" + words;

try {
    String cmd = "/var/www/cgi-bin/htsearch " + htQuery;
    String line = null;
    String output = null;
    Process p = Runtime.getRuntime().exec(cmd);
    BufferedReader lsOut = new BufferedReader (new InputStreamReader (p.getInputStream() ) );
                    line=lsOut.readLine();
                    while ((line=lsOut.readLine()) != null) {
%>
                        <%= line %>
<%
        }
} catch (Exception e) { 
  System.err.println("ls error " + e);
}
%>

The rest, configuring htdig and using your page-layout, isn't too
difficult.

Best Regards,
Thomas Maerz




More information about the opencms-dev mailing list