Search squid archive

url_rewrite_program in Java

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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



[Index of Archives]     [Linux Audio Users]     [Samba]     [Big List of Linux Books]     [Linux USB]     [Yosemite News]

  Powered by Linux