You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jetspeed-dev@portals.apache.org by "David G. Powers" <je...@pssp.com> on 2003/03/01 01:43:42 UTC

Re: ???NEW WebPageService/WebPageServlet NEW ???

I've read others comments, given it a little thought, and looked at some 
of the tools mentioned in prior emails

If you're interested, please review my comments and reply

-------------------------------------------------------------------------------
1.	What should this thing be called?  
-------------------------------------------------------------------------------
I don't think anyone has used HttpProxyPortlet yet.  With a new new a 
new thread can be started....

-------------------------------------------------------------------------------
2.	What is the "preferred" HTML parser API to base the rewriter on?
-------------------------------------------------------------------------------
My inclination is to use the Swing API with a 1.3 JDK for parsing.  Within 
each tag event I might use regular expression to, for example, prepend a 
portlet-specific id to JavaScript function names and the HTML objects 
they act upon.

It looks like Neko would work better with an XHTML document.  The docs 
seem to indicate that malformed HTML isn't handled yet.  It has been my 
experience that you cannot expect a well-formed HTML document.

I looked at Noodle only briefly,  There is a RequestFilterInterface which 
provides the content as one big byte array with some extra attributes 
stripped out (HTTP Headers).  Am I wrong in assuming that the filters are 
regular expressions that Noodle will iterate through and apply to the 
complete HTML document?  That seems horribly inefficient.



---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jetspeed-dev-help@jakarta.apache.org


Re: WebPageProxyPortlet

Posted by David Sean Taylor <da...@bluesunrise.com>.
On Thursday, March 6, 2003, at 04:18  PM, David G. Powers wrote:

> On Thursday 06 March 2003 03:19 pm, David Sean Taylor wrote:
>> Will it be dependent on the HTTP protocol, or will it support other
>> protocols?
>> If it only works with HTTP, then HttpProxyPortlet sounds good (I know,
>> I've changed my mind again)
>
>
> I working on an Http only version.  I'm not aware of any other 
> practical
> use.  The RSS stuff is best handled with XSLT, just as are other XML 
> Web
> services.  I think other candidate protocols would be handled in the 
> near
> term with this Http Proxy, i.e. SMTP/POP3 via WebMail.
>
> That brings me back to the part of my inquiry that I care most about - 
> I
> like what I see in the Apache commons HttpClient.  I like it much more
> than the java.net.HttpURLConnection.  I'm going to proceed using it
> unless I read negative feedback on it.
>
>
The +1 that I typed  means - "Yes, I agree, you have my vote"
If  you don't get any -1 votes, then your fine to go ahead and use it

--
David Sean Taylor
Bluesunrise Software
david@bluesunrise.com
+01 707 773-4646




---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jetspeed-dev-help@jakarta.apache.org


Re: WebPageProxyPortlet

Posted by "David G. Powers" <je...@pssp.com>.
On Thursday 06 March 2003 03:19 pm, David Sean Taylor wrote:
> Will it be dependent on the HTTP protocol, or will it support other
> protocols?
> If it only works with HTTP, then HttpProxyPortlet sounds good (I know,
> I've changed my mind again)


I working on an Http only version.  I'm not aware of any other practical 
use.  The RSS stuff is best handled with XSLT, just as are other XML Web 
services.  I think other candidate protocols would be handled in the near 
term with this Http Proxy, i.e. SMTP/POP3 via WebMail.

That brings me back to the part of my inquiry that I care most about - I 
like what I see in the Apache commons HttpClient.  I like it much more 
than the java.net.HttpURLConnection.  I'm going to proceed using it 
unless I read negative feedback on it.




-- 
David G. Powers
PowerSource

---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jetspeed-dev-help@jakarta.apache.org


Re: WebPageProxyPortlet

Posted by David Sean Taylor <da...@bluesunrise.com>.
On Thursday, March 6, 2003, at 02:18  PM, David G. Powers wrote:

> I'd like to use the HttpClient from Apache commons instead of a
> java.net.HttpURLConnection.
>
> ( http://jakarta.apache.org/commons/httpclient/features.html )
>
+1

> Will there be any objections to introducing this new dependency?
>
> DP
>
> P.S.  Good names can be so elusive.  Anyone have a good suggestion for 
> a
> new "Proxied Http Content Portlet"?
>

Will it be dependent on the HTTP protocol, or will it support other 
protocols?
If it only works with HTTP, then HttpProxyPortlet sounds good (I know, 
I've changed my mind again)

--
David Sean Taylor
Bluesunrise Software
david@bluesunrise.com
+01 707 773-4646




---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jetspeed-dev-help@jakarta.apache.org


Re: WebPageProxyPortlet

Posted by "David G. Powers" <je...@pssp.com>.
I'd like to use the HttpClient from Apache commons instead of a 
java.net.HttpURLConnection.

( http://jakarta.apache.org/commons/httpclient/features.html )

Will there be any objections to introducing this new dependency?

DP

P.S.  Good names can be so elusive.  Anyone have a good suggestion for a 
new "Proxied Http Content Portlet"?




---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jetspeed-dev-help@jakarta.apache.org


WebPageProxyPortlet

Posted by "David G. Powers" <je...@pssp.com>.
On Thursday 06 March 2003 11:40 am, Glen Carl wrote:
> This is fine with me. I hope David Powers is seeing this email and can
> check out what was done with the WebBrowserPortlet and the
> IframeProxyPortlet. These portlets are included in the jar I
> referenced. Glen

Yep - I'm seeing it.  

Here's a very brief overview of what I'm prototyping....

WebPageProxyPortlet - Enable navigation of a site within the context of a 
portlet frame.

The connection to the content provider will pass through the Jetspeed 
server.   I haven't given enough thought to ancillary page elements 
(images, applets, flash animations, ActiveX controls, etc...)  initially 
I will just let the browser handle retrieval of these.  Ideally this 
implementation should be a complete proxy elimination the need for a 
route from the browser to the content provider.

The admin / user will set the initial page parameters including:
	URL
	default HTTP headers
		authorization (username/password/method)
		cookies
		user agent
	general config
		field-rename-prefix
		method (GET, POST)
		restrict-nav-to-domain(s) (regex list?)
		restrict-resubmit-list (to prevent multiple payment confirm on reload)


Upon initial request of a proxied item the Portlet will use these default 
parameters to load the page.

A rewriter will filter the content and inject / extract attributes 
necessary to intercept navigation (GET or POST) and maintain state 
(session / authentication) within the content and make it available to 
the Proxy (Action or Servlet).

When a user acts upon a navigation element in the filtered content, the 
proxy (Action or Servlet) will intercept the request and save control 
info via the ProxyPersistenceLayer (interface - first implementation will 
use Session, second will store token in session an attributes in RDBMS).  
Control will then pass to the Portlet - getContent() will use the 
"current" settings to fetch and filter the content and render it.


The rewriter is the trickiest part of this puzzle.  It must at least:
	rewrite href and action attributes to inject proxy URL
	save current target URL in PPL (ProxyPersistenceLayer) stack
	save any other request attributes (method, headers (cookies, etc...)
	rewrite form object names
	rewrite JavaScript function names
	
There is a reason for rewriting the form object names and JavaScript 
function names.  I experienced conflicts with content from a single 
provider.  They used generic javascript includes for form handling.  
Every form used the same function for "onsubmit()" and a set of "global" 
page variables.  I worked around this by renaming the functions and 
variables per requested page, thus I could have multiple Portlets from 
that content provider presented and handled on the same Jetspeed page.


I haven't gone back to edit what I just typed!  There might be some typos, 
glaring omissions, or outright mistakes.  I am very open to any and all 
comments, suggestions, and contributions.

DP


-- 
David G. Powers
PowerSource

---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jetspeed-dev-help@jakarta.apache.org


Re: ???NEW WebPageService/WebPageServlet NEW ???

Posted by Glen Carl <gl...@buonvia.com>.
This is fine with me. I hope David Powers is seeing this email and can 
check out what was done with the WebBrowserPortlet and the 
IframeProxyPortlet. These portlets are included in the jar I referenced.
Glen

David Sean Taylor wrote:
> 
> On Wednesday, March 5, 2003, at 02:58  PM, Glen Carl wrote:
> 
>> At http://buonvia.com/jetspeed is the proxyPortlets that Casimiro 
>> Lovato-Winston and I contributed to the Jetspeed Community. To my 
>> knowledge, these portlets were never checked in.
>>
>> I want to contribute my enhanced versions of these, but I am swamped 
>> with client work. Maybe in a couple of weeks, I will be able to make 
>> the enhance versions available. For now, the proxyPortlets at my site 
>> may be helpful in the creation of your httpProxyPortlets.
>> You will need to extract the jar to get documentation on how to 
>> integrate.
>> Glen
> 
> 
> I am -1 on this.
> My vote is that you work with David Powers on making one good 
> implementation.
> 
> -- 
> David Sean Taylor
> Bluesunrise Software
> david@bluesunrise.com
> +01 707 773-4646
> 
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: jetspeed-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: jetspeed-dev-help@jakarta.apache.org
> 
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jetspeed-dev-help@jakarta.apache.org


Re: ???NEW WebPageService/WebPageServlet NEW ???

Posted by David Sean Taylor <da...@bluesunrise.com>.
On Wednesday, March 5, 2003, at 02:58  PM, Glen Carl wrote:

> At http://buonvia.com/jetspeed is the proxyPortlets that Casimiro 
> Lovato-Winston and I contributed to the Jetspeed Community. To my 
> knowledge, these portlets were never checked in.
>
> I want to contribute my enhanced versions of these, but I am swamped 
> with client work. Maybe in a couple of weeks, I will be able to make 
> the enhance versions available. For now, the proxyPortlets at my site 
> may be helpful in the creation of your httpProxyPortlets.
> You will need to extract the jar to get documentation on how to 
> integrate.
> Glen

I am -1 on this.
My vote is that you work with David Powers on making one good 
implementation.

--
David Sean Taylor
Bluesunrise Software
david@bluesunrise.com
+01 707 773-4646




---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jetspeed-dev-help@jakarta.apache.org


Re: ???NEW WebPageService/WebPageServlet NEW ???

Posted by Glen Carl <gl...@buonvia.com>.
At http://buonvia.com/jetspeed is the proxyPortlets that Casimiro 
Lovato-Winston and I contributed to the Jetspeed Community. To my 
knowledge, these portlets were never checked in.

I want to contribute my enhanced versions of these, but I am swamped 
with client work. Maybe in a couple of weeks, I will be able to make the 
enhance versions available. For now, the proxyPortlets at my site may be 
helpful in the creation of your httpProxyPortlets.
You will need to extract the jar to get documentation on how to integrate.
Glen



---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jetspeed-dev-help@jakarta.apache.org


Re: ???NEW WebPageService/WebPageServlet NEW ???

Posted by David Sean Taylor <da...@bluesunrise.com>.
On Saturday, March 1, 2003, at 01:16  AM, David G. Powers wrote:

> On Friday 28 February 2003 09:48 pm, David Sean Taylor wrote:
>> On Friday, February 28, 2003, at 04:43  PM, David G. Powers wrote:
>>> I don't think anyone has used HttpProxyPortlet yet.  With a new new a
>>> new thread can be started....
>>
>> Proxy to me means a Proxy Server, which can get quite complicated.
>
> I'll just go with A working name of HttpLiaisonPortlet.  When it is 
> ready
> for prime time it can be renamed - It really doesn't matter at this
> point.

Whatever, actually I can't think of anything better than Proxy either, 
so Proxy is good enough.

>
>>
>>> ---------------------------------------------------------------------
>>> What is the "preferred" HTML parser API to base the rewriter on?
>>> ---------------------------------------------------------------------
>> Why not a pluggable parser?
>
> I want help to choosing the tools for the "first" implemenation of the
> rewriter interface.  Pluggable can be good but I think one 
> implementation
> should be provided.
>
>> If I want to use Neko, why force me to use Swing?
>
> Once again - I only plan to do the first one.  I'd like some help 
> deciding
> on the best tool for the job.  If you say use Neko then I'll try to 
> make
> it happen.  I'd like more input - I've never worked with Neko.  If my
> concerns about Neko working best with properly formed documents are 
> valid
> then it might not be the best tool.  If Neko is ready and up to the 
> tasks
> then great - I'm looking help to identify what is available and usable
> today.
>
>> Have you looked at the org.apache.jetspeed.util.rewriter package?
>
> Not much (not enough to unserstand it!)
>
Sigh.
Im beginning to see the anti-pattern here.
Well if you'd look at it, you'd see it uses Swing as the default, 
pluggable parser.

> Ummmm -- ahhhhhh - is this to refute my use of the "Proxy" word?
>
> Seriously - I'm not thinking about a Proxy Cache for this right now.  
> If I
> need that I'll just process requests through SQUID or another proxy
> server.
>
What exactly are you thinking of then?
Perhaps you could tell us about your goals, the feature set of this new 
portlet, what code you will reuse and why...

--
David Sean Taylor
Bluesunrise Software
david@bluesunrise.com
+01 707 773-4646




---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jetspeed-dev-help@jakarta.apache.org


Re: ???NEW WebPageService/WebPageServlet NEW ???

Posted by "David G. Powers" <je...@pssp.com>.
On Friday 28 February 2003 09:48 pm, David Sean Taylor wrote:
> On Friday, February 28, 2003, at 04:43  PM, David G. Powers wrote:
> > I don't think anyone has used HttpProxyPortlet yet.  With a new new a
> > new thread can be started....
>
> Proxy to me means a Proxy Server, which can get quite complicated.

I'll just go with A working name of HttpLiaisonPortlet.  When it is ready 
for prime time it can be renamed - It really doesn't matter at this 
point.

>
> > ---------------------------------------------------------------------
> > What is the "preferred" HTML parser API to base the rewriter on?
> > ---------------------------------------------------------------------
> Why not a pluggable parser?

I want help to choosing the tools for the "first" implemenation of the 
rewriter interface.  Pluggable can be good but I think one implementation 
should be provided.

> If I want to use Neko, why force me to use Swing?

Once again - I only plan to do the first one.  I'd like some help deciding 
on the best tool for the job.  If you say use Neko then I'll try to make 
it happen.  I'd like more input - I've never worked with Neko.  If my 
concerns about Neko working best with properly formed documents are valid 
then it might not be the best tool.  If Neko is ready and up to the tasks 
then great - I'm looking help to identify what is available and usable 
today.

> Have you looked at the org.apache.jetspeed.util.rewriter package?

Not much (not enough to unserstand it!)  

> > It looks like Neko would work better with an XHTML document.  The
> > docs seem to indicate that malformed HTML isn't handled yet.  It has
> > been my experience that you cannot expect a well-formed HTML
> > document.
>
> I've heard a lot of good about Neko. Haven't actually used it.
> The other choice is the Tidy parser, which now supports SAX events I
> believe.

Is the TidyLib MIT License compatible with an Apache project?

> Recently read about a HTTP Proxy Cache project, see below.
> Perhaps we can have a look at their code and see if it fits in with
> what we're doing.
>
> Pasted from the Jakarta General List:
>
> Hi,
> we are five italian programmers and we have finished some days ago
> "Puff", a http cache proxy written in java that have some interesting
> features like a spider that prefetch the web links and an option to
> convert all images to black and white one to have a speeder connection
> for the client. This software is free licensed (we haven't already
> choosed what type but this is free however!!) and we think to jakarta
> subprojects.
> If it is possible tell us how we have to send it, the documentation and
> what ever you want.
>
> Best regards
>
> Paparoni Federico
> doc@workmind.net

Ummmm -- ahhhhhh - is this to refute my use of the "Proxy" word?

Seriously - I'm not thinking about a Proxy Cache for this right now.  If I 
need that I'll just process requests through SQUID or another proxy 
server.



-- 
David G. Powers
PowerSource

---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jetspeed-dev-help@jakarta.apache.org


Re: ???NEW WebPageService/WebPageServlet NEW ???

Posted by David Sean Taylor <da...@bluesunrise.com>.
On Friday, February 28, 2003, at 04:43  PM, David G. Powers wrote:

> I've read others comments, given it a little thought, and looked at  
> some
> of the tools mentioned in prior emails
>
> If you're interested, please review my comments and reply
>
> ----------------------------------------------------------------------- 
> --------
> 1.	What should this thing be called?
> ----------------------------------------------------------------------- 
> --------
> I don't think anyone has used HttpProxyPortlet yet.  With a new new a
> new thread can be started....
>
Proxy to me means a Proxy Server, which can get quite complicated.

> ----------------------------------------------------------------------- 
> --------
> 2.	What is the "preferred" HTML parser API to base the rewriter on?
> ----------------------------------------------------------------------- 
> --------
> My inclination is to use the Swing API with a 1.3 JDK for parsing.   
> Within
> each tag event I might use regular expression to, for example, prepend  
> a
> portlet-specific id to JavaScript function names and the HTML objects
> they act upon.
>
Why not a pluggable parser?
If I want to use Neko, why force me to use Swing?
Have you looked at the org.apache.jetspeed.util.rewriter package?

> It looks like Neko would work better with an XHTML document.  The docs
> seem to indicate that malformed HTML isn't handled yet.  It has been my
> experience that you cannot expect a well-formed HTML document.
>
I've heard a lot of good about Neko. Haven't actually used it.
The other choice is the Tidy parser, which now supports SAX events I  
believe.

> I looked at Noodle only briefly,  There is a RequestFilterInterface  
> which
> provides the content as one big byte array with some extra attributes
> stripped out (HTTP Headers).  Am I wrong in assuming that the filters  
> are
> regular expressions that Noodle will iterate through and apply to the
> complete HTML document?  That seems horribly inefficient.

Yes it does seem inefficient.

Recently read about a HTTP Proxy Cache project, see below.
Perhaps we can have a look at their code and see if it fits in with  
what we're doing.

Pasted from the Jakarta General List:

Hi,
we are five italian programmers and we have finished some days ago  
"Puff", a http cache proxy written in java that have some interesting  
features like a spider that prefetch the web links and an option to  
convert all images to black and white one to have a speeder connection  
for the client. This software is free licensed (we haven't already  
choosed what type but this is free however!!) and we think to jakarta  
subprojects.
If it is possible tell us how we have to send it, the documentation and  
what ever you want.

Best regards

Paparoni Federico
doc@workmind.net

--
David Sean Taylor
Bluesunrise Software
david@bluesunrise.com
+01 707 773-4646




---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jetspeed-dev-help@jakarta.apache.org