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!

[765 byte] By [bbmartinea] at [2007-9-27 9:40:24]
# 1
How did you configure your Brazil server? Did you subclass GenericProxyHandler? What methods did you override in GenericProxyHandler? charlie
charlie76a at 2007-7-8 23:02:45 > top of Java-index,Archived Forums,The Brazil Project...
# 2
I also want to get web pages from other sitebut make it like from our own sitehow can we archeive this?TIAJacinle
jacinlea at 2007-7-8 23:02:45 > top of Java-index,Archived Forums,The Brazil Project...
# 3
btw, I am a newbieWhere can I download some sample code concerning these area?Jacinle
jacinlea at 2007-7-8 23:02:45 > top of Java-index,Archived Forums,The Brazil Project...
# 4

> 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 > top of Java-index,Archived Forums,The Brazil Project...