Get HTML Page from an other site using brazil handlers
I am a Malagasy student using brazil.
For my project I need to get web pages and filter them (deleting all images of a page,... ).
For example : I have a brazil server ( in localhost:9090 ) and I need to delete all images in http://java.sun.com. before sending response to the web browser.
1) How do i get "java.sun.com" web pages passing by "localhost:9090". I try to use GenericProxyHandler, but nothing happens, the server always try to find files in my local directory. Do I have to save the web pages in my local directory before using filters?
2) I use FilterHandler and NoImageTemlate : when files are on my local directory, it works but when i try to use "http://java.sun.com", it does not work?
Thank you for your help!
> I am a Malagasy student using brazil.
> For my project I need to get web pages and filter them
> (deleting all images of a page,... ).
> For example : I have a brazil server ( in
> localhost:9090 ) and I need to delete all images in
> http://java.sun.com. before sending response to the
> web browser.
> 1) How do i get "java.sun.com" web pages passing by
> "localhost:9090". I try to use GenericProxyHandler,
> but nothing happens, the server always try to find
> files in my local directory. Do I have to save the web
> pages in my local directory before using filters?
> 2) I use FilterHandler and NoImageTemlate : when
> files are on my local directory, it works but when i
> try to use "http://java.sun.com", it does not work?
>
> Thank you for your help!
The www.experimentalstuff.com site does this. Take
a look at:
http://www.experimentalstuff.com/About_this_site/config.txt
which is the site configuration file. Notice the lines
that look like:
sun.class=sunlabs.brazil.handler.MultiProxyHandler
sun.host=www.sun.com
sun.prefix=/sun/
These "web mount" www.sun.com onto the "/sun/" in
the document root.
You can combine this with:
sunlabs.brazil.template.NoImageTemplate
to remove all the images from the pages.
Hope this helps
S
saua at 2007-7-8 23:02:45 >
