I'm no Java expert but isn't your readline hanging the process by waiting for input followed by a carriage return/linefeed sequence?
On Thu, 14 Jan 2010 15:00:35 -0800
"Lu, Roy" <rlu_at_FACorelogic.com> wrote:
> Does anyone have an example of a url rewrite program in Java. I tried
> with the following code but it did not work.
>
> ----------------------------
> Squid.conf:
> url_rewrite_program /usr/bin/java -classpath /usr/local/squid/sbin
> RewriteHelper
> ----------------------------
> RewriteHelper.java:
>
> import java.io.*;
>
> public class RewriteHelper {
>
> public static void main(String[] args) throws Throwable {
> try {
> BufferedReader in = new BufferedReader(new
> InputStreamReader(System.in));
> String input;
>
> while(true) {
> input = in.readLine();
> System.out.println(input);
> }
>
> } catch (Exception e) {
> e.printStackTrace();
> }
> }
> }
> ----------------------------
> It seems that Squid only regards 'java' as the rewrite program, not the
> entire command with the java class, i.e., '/usr/bin/java -classpath
> /usr/local/squid/sbin RewriteHelper'.
>
> Thanks.
> Roy
>
> ******************************************************************************************
> This message may contain confidential or proprietary information intended only for the use of the
> addressee(s) named above or may contain information that is legally privileged. If you are
> not the intended addressee, or the person responsible for delivering it to the intended addressee,
> you are hereby notified that reading, disseminating, distributing or copying this message is strictly
> prohibited. If you have received this message by mistake, please immediately notify us by
> replying to the message and delete the original message and any copies immediately thereafter.
>
> Thank you.
> ******************************************************************************************
> FACLD
>
-- David Brown <david_at_davidwbrown.name>Received on Fri Jan 15 2010 - 01:07:54 MST
This archive was generated by hypermail 2.2.0 : Fri Jan 15 2010 - 12:00:02 MST