Hi Carsten,
Thanks for your comment.
I agree with you. It's somewhat strange.
I seems right to use local variable instead of instance variable.
I'll test again and post to JIRA until tomorrow.
Thank you very much.
Regards,
Woonsan.
--- Carsten Ziegeler <[EMAIL PROTECTED]> wrote:
> Hi Woonsan,
>
> thanks for the patch! I'm wondering a little bit about the following
> code (I removed some lines to just quote the important parts):
>
> a) String servletPath = this.servletPath;
>
> ...
> if (this.servletPath.startsWith("/")) {
> this.servletPath = this.servletPath.substring(1);
> }
> if (this.servletPath.endsWith("/")) {
> this.servletPath = servletPath.substring(0,
> servletPath.length() - 1);
> }
>
> String pathInfo = getPathInfo(request);
>
> z) String uri = servletPath;
>
> In line a) you create a new local variable and initialize it with the
> value if the instance variable servletPath. Finally in z) you assign
> the value of the local variable to "uri".
>
> Inbetween you check the value of the instance variable servletPath and
> change it eventually. I think, it would be correct to check the *local*
> variable servletPath and change this instead.
>
> What do you think?
>
> Carsten
>
> Woonsan Ko wrote:
> > Hi Carsten,
> >
> > Sorry it took so long to get back to you.
> > My INBOX became overloaded and now I finally caught up.
> >
> > I just posted my patch to JIRA.
> > Thanks.
> >
> > Regards,
> >
> > Woonsan
> >
> > --- Carsten Ziegeler <[EMAIL PROTECTED]> wrote:
> >
> >> Woon-San Ko wrote:
> >>> Hi, all.
> >>>
> >>> The CocoonPortlet in BRANCH_2_1_X does not allow overriding the
> >>> *servlet-path* init
> parameter
> >> by
> >>> preferences.
> >>> So, portal users have to add portlet tags in the portlet.xml whenever
> >>> they need to use
> another
> >>> coplet in the portal site.
> >>>
> >>> If the CocoonPortlet reads preferences to override the *servlet-path*,
> >>> portal users can use
> >> many
> >>> coplet fragments without tedious portlet tag additions.
> >>>
> >> Hi,
> >>
> >> I think this is a good addition to the ManagedCocoonPortlet. Can you
> >> please come up with a proper patch that you file into Jira? Every patch
> >> should go through our tracking system. If you also could change the code
> >> a little bit to avoid the code duplication (by factoring this out into a
> >> method) would be great!
> >>
> >> Thanks
> >> Carsten
> >>
> >> --
> >> Carsten Ziegeler - Open Source Group, S&N AG
> >> http://www.s-und-n.de
> >> http://www.osoco.org/weblogs/rael/
> >>
> >
> >
> >
> >
> > ____________________________________________________________________________________
> > Get your own web address.
> > Have a HUGE year through Yahoo! Small Business.
> > http://smallbusiness.yahoo.com/domains/?p=BESTDEAL
> >
>
>
> --
> Carsten Ziegeler
> http://www.osoco.org/weblogs/rael/
>
____________________________________________________________________________________
Do you Yahoo!?
Everyone is raving about the all-new Yahoo! Mail beta.
http://new.mail.yahoo.com