Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [jetty-dev] Option for Setting Context Params in Deployer Descriptors

No problem, happy to help. We're starting to use Jetty more heavily so having good documentation benefits us as well as everyone else. :)

If there are additional questions you have let me know. I can do some more digging in the code and stuff.

On 12/6/10 9:25 AM, Shirley Boulay wrote:
Hi Chad, Hi Greg,

I will get to the web app deployment piece within the next few days.

Thanks for your careful work researching and writing it.


On Mon, Dec 6, 2010 at 8:31 AM, Greg Wilkins <gregw@xxxxxxxxxxx
<mailto:gregw@xxxxxxxxxxx>> wrote:


    awesome - thanks for the contribution!
    I've CC'd shirley (our tech writer), so she can process what you
    have done.

    with regards to something that is in both context and webapps, the
    WebAppProvider has

    this scans for matching context xml files (by name) and does not
    deploy the webapp if one is found.


    On 5 December 2010 15:22, Chad La Joie <lajoie@xxxxxxxxx
    <mailto:lajoie@xxxxxxxxx>> wrote:
     > Hey Greg, et al.
     > I went through and rewrote[1] the web app deployment page and
    tried to
     > incorporate everything from the Jetty 6 docs.  The one
    outstanding question
     > that I had when writing it is what happened if you had a webapp
     > file/directory in /webapps and also had a context deployment
    descriptor that
     > would deploy to the same context path.  I assumed the context
     > descriptor would be used but I wasn't sure.
     > I did not link to this document from the Jetty page because I
    first wanted
     > to make sure you guys approved.
     > [1]
     > On 12/4/10 10:53 AM, Greg Wilkins wrote:
     >> Chad,
     >> you can set context init parameters from a context.xml file with
     >> like:
     >> <Get name=ServletContext>
     >> <Call name=setInitParameter>
     >> <Arg>name</Arg>
     >> <Arg>value</Arg>
     >> </Call>
     >> </Get>
     >> But the problem with this style is that the real web.xml will be run
     >> after the context.xml and may replace values that you set.
     >> So that is why override descriptors are provides, so that they
    can be
     >> set after the web.xml
     >> cheers
     >> On 4 December 2010 13:05, Chad La Joie<lajoie@xxxxxxxxx
    <mailto:lajoie@xxxxxxxxx>>  wrote:
     >>> I had asked on the user's list regarding the possibility of setting
     >>> Servlet
     >>> context parameters within the a deployment descriptor.  I
    didn't receive
     >>> an
     >>> answer so I went looking at the code and it seems like this is not
     >>> possible.
     >>>  At least, I didn't see anything in the WebAppContext class or
    its super
     >>> types.  The closest thing appeared to be the ability to specify
    a special
     >>> web.xml file that would be merged with the one in the WAR.
     >>> A lot of web apps use context parameters to specify things that
     >>> change
     >>> per-deployment (e.g., configuration files).  Having to break
    open a WAR
     >>> file
     >>> (assuming its zipped up) to change such information is annoying
     >>> honestly beyond the means of some novice deployers).
     >>> So, my suggestion is to allow people to specify Servlet context
     >>> within a context deployment descriptor.
     >>> What do people think?
     >>> --
     >>> Chad La Joie
     >>> trusted identities, delivered
     >>> _______________________________________________
     >>> jetty-dev mailing list
     >>> jetty-dev@xxxxxxxxxxx <mailto:jetty-dev@xxxxxxxxxxx>
     >> _______________________________________________
     >> jetty-dev mailing list
     >> jetty-dev@xxxxxxxxxxx <mailto:jetty-dev@xxxxxxxxxxx>
     > --
     > Chad La Joie
     > trusted identities, delivered
     > _______________________________________________
     > jetty-dev mailing list
     > jetty-dev@xxxxxxxxxxx <mailto:jetty-dev@xxxxxxxxxxx>

Chad La Joie
trusted identities, delivered

Back to the top