dev@grizzly.java.net

Re: lots of problems (issues) regarding contextPath and servletpath

From: Jeanfrancois Arcand <Jeanfrancois.Arcand_at_Sun.COM>
Date: Fri, 15 May 2009 09:28:53 -0400

Salut,

Survivant 00 wrote:
> I read today few emails about problem setting servletpath or contextpath
> with ServletAdapter.
>
> like issue 598, the email about Spring security, I had problem with
> Grizzly Deployer too.
>
> the idea of JF to set the context automaticaly from the alias could help
> few people.
>
> Just to be sure if the user set the context or servlet path himself the
> automatic settings won't overwrite them.
>

I think I already talked about the current issue. the http module cannot
have a dependency on the http-servlet. So in GrizzlyWebServer, when
invoking addGrizzlyAdapter(...) we can't invoke
ServletAdapter.setCtx/ServletPath because it will add a dependencies.
The easiest solution would consist of adding two new empty method to
GrizzlyAdapter:

setContextPath
setServletPath

But I don't like seeing setServletPath on a GrizzlyAdapter class which
has nothing to do servlet.

An alternative is your implementation, e.g all ServletAdapter will be
automatically configured.

What do you think?

A+

-- Jeanfrancois



> petite réflexion comme ça.
>
>