You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@beehive.apache.org by Carlin Rogers <ca...@bea.com> on 2004/11/30 20:59:20 UTC

checkin request netui page flow - URLRewriterService

I have a checkin request for the URLRewriterService in NetUI
Page Flow. The following patch file (output from "svn diff")
contains the changes described below. Thanks!

Changes...

- Implemented a new URLRewriterService and URLRewriter.
The framework was extended to allow for chaining of
registered URLRewriters. The old URLRewriterService,
DefaultURLRewriter and URLRewriter were deprecated and
no use the new URLRewriterService. If an implementation
uses the deprecated URLRewriterService to register an
old URLRewriter it will be handled with a wrapper. I
still need to work on the Template URL rewriting.

- Implemented MutableURI to be used in the URLRewriter
implementations to reduce some of the String parsing.

- Moved org.apache.beehive.netui.pageflow.util.PageflowTagUtils
to the tags-html module,
org.apache.beehive.netui.tags.PageFlowTagUtils and consolidated
code for preparing and rewriting an action or resource URL.

- Update NetUI tag code to use the new PageFlowTagUtils
methods. Also added some exception handling and a new
error messages.

- Separated the initialization and management of the ServerAdapter
from the ContextCache to a ServerAdapterManager class.

- Modified MockPortal test so that the scoped request for each
portlet does not expose the outer request attributes. This is
the desired state, however, this breaks the test because the
PageFlowJspFilter isn't running on the include. I will log a
bug in JIRA.

- Minor clean up such as removing unused import statements
and removing the ServletContextCache class.

DRT/BVT: NetUI (WinXP)
BB: self (WinXP)

Thanks,
Carlin


Re: checkin request netui page flow - URLRewriterService

Posted by Carlin Rogers <ca...@bea.com>.
Thanks Rich. I appreciate the added improvements and the review.

Carlin

Richard Feit wrote:

> Hey Carlin,
> 
> I just checked this in, with a few small modifications:
>    - Changed URLRewriterService to get the List of URLRewriters via a 
> call to ScopedServletUtils.getScopedRequestAttribute, a new method which 
> guarantees that an outer request attribute won't "show through" when 
> you're requesting it through a ScopedRequest.  This fixes the bug you 
> entered (http://nagoya.apache.org/jira/browse/BEEHIVE-104), which was 
> exposed (but not caused) by your changes.
>    - Changed PageFlowRequestProcessor and PageFlowJspFilter to cache a 
> reference to the ServerAdapter.  Patrick Osborne had identified calls to 
> ServletContext.getAttribute() as a bottleneck, and this eliminates a lot 
> of them.
>    - Changed PageFlowTagUtils.rewrittenActionURL() to 
> 'rewriteActionURL', and changed 'rewrittenResourceURL' to 
> 'rewriteResourceURL'.
> 
> Nice work...
> Rich
> 
> Richard Feit wrote:
> 
>> No problem -- this is good stuff!  Just looking through it now...
>>
>> Carlin Rogers wrote:
>>
>>> I was missing a couple of files in the patch. Here's the
>>> updated patch. Thanks Rich.
>>>
>>> Carlin
>>>
>>> Carlin Rogers wrote:
>>>
>>>> I have a checkin request for the URLRewriterService in NetUI
>>>> Page Flow. The following patch file (output from "svn diff")
>>>> contains the changes described below. Thanks!
>>>>
>>>> Changes...
>>>>
>>>> - Implemented a new URLRewriterService and URLRewriter.
>>>> The framework was extended to allow for chaining of
>>>> registered URLRewriters. The old URLRewriterService,
>>>> DefaultURLRewriter and URLRewriter were deprecated and
>>>> no use the new URLRewriterService. If an implementation
>>>> uses the deprecated URLRewriterService to register an
>>>> old URLRewriter it will be handled with a wrapper. I
>>>> still need to work on the Template URL rewriting.
>>>>
>>>> - Implemented MutableURI to be used in the URLRewriter
>>>> implementations to reduce some of the String parsing.
>>>>
>>>> - Moved org.apache.beehive.netui.pageflow.util.PageflowTagUtils
>>>> to the tags-html module,
>>>> org.apache.beehive.netui.tags.PageFlowTagUtils and consolidated
>>>> code for preparing and rewriting an action or resource URL.
>>>>
>>>> - Update NetUI tag code to use the new PageFlowTagUtils
>>>> methods. Also added some exception handling and a new
>>>> error messages.
>>>>
>>>> - Separated the initialization and management of the ServerAdapter
>>>> from the ContextCache to a ServerAdapterManager class.
>>>>
>>>> - Modified MockPortal test so that the scoped request for each
>>>> portlet does not expose the outer request attributes. This is
>>>> the desired state, however, this breaks the test because the
>>>> PageFlowJspFilter isn't running on the include. I will log a
>>>> bug in JIRA.
>>>>
>>>> - Minor clean up such as removing unused import statements
>>>> and removing the ServletContextCache class.
>>>>
>>>> DRT/BVT: NetUI (WinXP)
>>>> BB: self (WinXP)
>>>>
>>>> Thanks,
>>>> Carlin
>>>>
>>
> 


Re: checkin request netui page flow - URLRewriterService

Posted by Richard Feit <ri...@bea.com>.
Hey Carlin,

I just checked this in, with a few small modifications:
    - Changed URLRewriterService to get the List of URLRewriters via a 
call to ScopedServletUtils.getScopedRequestAttribute, a new method which 
guarantees that an outer request attribute won't "show through" when 
you're requesting it through a ScopedRequest.  This fixes the bug you 
entered (http://nagoya.apache.org/jira/browse/BEEHIVE-104), which was 
exposed (but not caused) by your changes.
    - Changed PageFlowRequestProcessor and PageFlowJspFilter to cache a 
reference to the ServerAdapter.  Patrick Osborne had identified calls to 
ServletContext.getAttribute() as a bottleneck, and this eliminates a lot 
of them.
    - Changed PageFlowTagUtils.rewrittenActionURL() to 
'rewriteActionURL', and changed 'rewrittenResourceURL' to 
'rewriteResourceURL'.

Nice work...
Rich

Richard Feit wrote:

> No problem -- this is good stuff!  Just looking through it now...
>
> Carlin Rogers wrote:
>
>> I was missing a couple of files in the patch. Here's the
>> updated patch. Thanks Rich.
>>
>> Carlin
>>
>> Carlin Rogers wrote:
>>
>>> I have a checkin request for the URLRewriterService in NetUI
>>> Page Flow. The following patch file (output from "svn diff")
>>> contains the changes described below. Thanks!
>>>
>>> Changes...
>>>
>>> - Implemented a new URLRewriterService and URLRewriter.
>>> The framework was extended to allow for chaining of
>>> registered URLRewriters. The old URLRewriterService,
>>> DefaultURLRewriter and URLRewriter were deprecated and
>>> no use the new URLRewriterService. If an implementation
>>> uses the deprecated URLRewriterService to register an
>>> old URLRewriter it will be handled with a wrapper. I
>>> still need to work on the Template URL rewriting.
>>>
>>> - Implemented MutableURI to be used in the URLRewriter
>>> implementations to reduce some of the String parsing.
>>>
>>> - Moved org.apache.beehive.netui.pageflow.util.PageflowTagUtils
>>> to the tags-html module,
>>> org.apache.beehive.netui.tags.PageFlowTagUtils and consolidated
>>> code for preparing and rewriting an action or resource URL.
>>>
>>> - Update NetUI tag code to use the new PageFlowTagUtils
>>> methods. Also added some exception handling and a new
>>> error messages.
>>>
>>> - Separated the initialization and management of the ServerAdapter
>>> from the ContextCache to a ServerAdapterManager class.
>>>
>>> - Modified MockPortal test so that the scoped request for each
>>> portlet does not expose the outer request attributes. This is
>>> the desired state, however, this breaks the test because the
>>> PageFlowJspFilter isn't running on the include. I will log a
>>> bug in JIRA.
>>>
>>> - Minor clean up such as removing unused import statements
>>> and removing the ServletContextCache class.
>>>
>>> DRT/BVT: NetUI (WinXP)
>>> BB: self (WinXP)
>>>
>>> Thanks,
>>> Carlin
>>>
>

Re: checkin request netui page flow - URLRewriterService

Posted by Richard Feit <ri...@bea.com>.
No problem -- this is good stuff!  Just looking through it now...

Carlin Rogers wrote:

> I was missing a couple of files in the patch. Here's the
> updated patch. Thanks Rich.
>
> Carlin
>
> Carlin Rogers wrote:
>
>> I have a checkin request for the URLRewriterService in NetUI
>> Page Flow. The following patch file (output from "svn diff")
>> contains the changes described below. Thanks!
>>
>> Changes...
>>
>> - Implemented a new URLRewriterService and URLRewriter.
>> The framework was extended to allow for chaining of
>> registered URLRewriters. The old URLRewriterService,
>> DefaultURLRewriter and URLRewriter were deprecated and
>> no use the new URLRewriterService. If an implementation
>> uses the deprecated URLRewriterService to register an
>> old URLRewriter it will be handled with a wrapper. I
>> still need to work on the Template URL rewriting.
>>
>> - Implemented MutableURI to be used in the URLRewriter
>> implementations to reduce some of the String parsing.
>>
>> - Moved org.apache.beehive.netui.pageflow.util.PageflowTagUtils
>> to the tags-html module,
>> org.apache.beehive.netui.tags.PageFlowTagUtils and consolidated
>> code for preparing and rewriting an action or resource URL.
>>
>> - Update NetUI tag code to use the new PageFlowTagUtils
>> methods. Also added some exception handling and a new
>> error messages.
>>
>> - Separated the initialization and management of the ServerAdapter
>> from the ContextCache to a ServerAdapterManager class.
>>
>> - Modified MockPortal test so that the scoped request for each
>> portlet does not expose the outer request attributes. This is
>> the desired state, however, this breaks the test because the
>> PageFlowJspFilter isn't running on the include. I will log a
>> bug in JIRA.
>>
>> - Minor clean up such as removing unused import statements
>> and removing the ServletContextCache class.
>>
>> DRT/BVT: NetUI (WinXP)
>> BB: self (WinXP)
>>
>> Thanks,
>> Carlin
>>

Re: checkin request netui page flow - URLRewriterService

Posted by Carlin Rogers <ca...@bea.com>.
I was missing a couple of files in the patch. Here's the
updated patch. Thanks Rich.

Carlin

Carlin Rogers wrote:

> I have a checkin request for the URLRewriterService in NetUI
> Page Flow. The following patch file (output from "svn diff")
> contains the changes described below. Thanks!
> 
> Changes...
> 
> - Implemented a new URLRewriterService and URLRewriter.
> The framework was extended to allow for chaining of
> registered URLRewriters. The old URLRewriterService,
> DefaultURLRewriter and URLRewriter were deprecated and
> no use the new URLRewriterService. If an implementation
> uses the deprecated URLRewriterService to register an
> old URLRewriter it will be handled with a wrapper. I
> still need to work on the Template URL rewriting.
> 
> - Implemented MutableURI to be used in the URLRewriter
> implementations to reduce some of the String parsing.
> 
> - Moved org.apache.beehive.netui.pageflow.util.PageflowTagUtils
> to the tags-html module,
> org.apache.beehive.netui.tags.PageFlowTagUtils and consolidated
> code for preparing and rewriting an action or resource URL.
> 
> - Update NetUI tag code to use the new PageFlowTagUtils
> methods. Also added some exception handling and a new
> error messages.
> 
> - Separated the initialization and management of the ServerAdapter
> from the ContextCache to a ServerAdapterManager class.
> 
> - Modified MockPortal test so that the scoped request for each
> portlet does not expose the outer request attributes. This is
> the desired state, however, this breaks the test because the
> PageFlowJspFilter isn't running on the include. I will log a
> bug in JIRA.
> 
> - Minor clean up such as removing unused import statements
> and removing the ServletContextCache class.
> 
> DRT/BVT: NetUI (WinXP)
> BB: self (WinXP)
> 
> Thanks,
> Carlin
>