You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@abdera.apache.org by Ugo Cei <ug...@gmail.com> on 2007/05/18 15:57:39 UTC

contextPath?

Hi,

I was busy adapting some code of mine to the latest Abdera trunk and  
noticed this contextPath parameter appearing in places where there  
was nothing before, like in the constructor of RegexTargetResolver:

	public RegexTargetResolver(String contextPath)

Is this supposed to be the _servlet_ context path? if it is, I am  
finding myself a bit uncomfortable with it, as I am instantiating my  
TargetResolver in a Spring application context configuration file,  
where I have no idea what the servlet context path is (and don't want  
to have to know, honestly).

Can someone please explain why we need it?

	Ugo



-- 
Ugo Cei
Blog: http://agylen.com/
Open Source Zone: http://oszone.org/
Evil or Not?: http://evilornot.info/
Company: http://www.sourcesense.com/



Re: contextPath?

Posted by Brian Moseley <bc...@osafoundation.org>.
On 5/18/07, James M Snell <ja...@gmail.com> wrote:
> Ironically, this was added in to make it a bit easier to make a target
> resolver a bit more independent of the servlet context path.  It's not
> critical and can be pulled back out if it's causing problems. Feel free
> to change it.

perhaps just change the name to something a little less loaded, like
"pathPrefix", and document that if provided the target resolver
removes it from the beginning of the path before resolving the target
(or whatever it's used for - don't recall specifically).

a no-argument constructor would be nice too.

Re: contextPath?

Posted by Ugo Cei <ug...@gmail.com>.
On May 18, 2007, at 5:16 PM, James M Snell wrote:

> Ironically, this was added in to make it a bit easier to make a target
> resolver a bit more independent of the servlet context path.  It's not
> critical and can be pulled back out if it's causing problems. Feel  
> free
> to change it.

I'm not sure this is really bad, I just started adapting my code to  
the latest version and found out about this, so I was wondering what  
it was.

I'll think about it before doing any changes.

	Ugo

-- 
Ugo Cei
Blog: http://agylen.com/
Open Source Zone: http://oszone.org/
Evil or Not?: http://evilornot.info/
Company: http://www.sourcesense.com/



Re: contextPath?

Posted by James M Snell <ja...@gmail.com>.
Ironically, this was added in to make it a bit easier to make a target
resolver a bit more independent of the servlet context path.  It's not
critical and can be pulled back out if it's causing problems. Feel free
to change it.

- James

Ugo Cei wrote:
> Hi,
> 
> I was busy adapting some code of mine to the latest Abdera trunk and
> noticed this contextPath parameter appearing in places where there was
> nothing before, like in the constructor of RegexTargetResolver:
> 
>     public RegexTargetResolver(String contextPath)
> 
> Is this supposed to be the _servlet_ context path? if it is, I am
> finding myself a bit uncomfortable with it, as I am instantiating my
> TargetResolver in a Spring application context configuration file, where
> I have no idea what the servlet context path is (and don't want to have
> to know, honestly).
> 
> Can someone please explain why we need it?
> 
>     Ugo
> 
> 
>