Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3392770
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T03:58:05+00:00 2026-05-18T03:58:05+00:00

I have 3 application contexts: A global context which is responsible for launching Jetty

  • 0

I have 3 application contexts:

  • A global context which is responsible for launching Jetty servlet container, launched from main()
  • An applicationContext parent to each webapp in jetty (started by SpringSecurity
  • n xyz-servlet contexts for each webapp (I run 1 webapp)

Spring managed creating a parent-child relationship for the latter two contexts.

Now I would like to add a simple global properties service to the first context and have it visible to the others (I could add it to applicationContext, but I may use it elsewhere outside the webapp context later and want to plan for that).

Since I didn’t manage creation of the other two contexts (they were created by the dispatcher servlet and spring security which were launched from web.xml) I’m not clear how and where I should access them to define the first as the parent (well, only applicationContext should take the global context as its parent).

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-18T03:58:06+00:00Added an answer on May 18, 2026 at 3:58 am

    The parent-child relationship between (1) and (2) can be managed by the ContextLoaderListener that you have in your web.xml.

    Specifically, have a look at the javadoc for ContextLoader.loadParentContext(). This documents how the ContextLoaderListener can locate context (1). It assumes that this global context was initialised via ContextSingletonBeanFactoryLocator, which you may or may not have used to create that context.

    If you did use ContextSingletonBeanFactoryLocator, then it should be trivial, just follow the instructions in the javadoc. if you used some other way of bootstrapping the global context, then you can subclass ContextLoaderListener, override the loadParentContext() method to locate your global context, then use that in web.xml instead of the standard ContextLoaderListener.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a main application with a global exception handler installed. Now, for some
In my spring application context file, I have something like: <util:map id="someMap" map-class="java.util.HashMap" key-type="java.lang.String"
I have a winforms application that presently ships with a chm file for context-sensitive
I have an application which really should be installed, but does work fine when
I have a Silverlight application that consists of a MainWindow and several classes which
Is there a way to have an global settings variable for an android application,
I have an application where the contents of e-mails that get sent are stored
I have an application that sends messages to an external web service. I build
We have an application with a good amount of jQuery JSON calls to server
I have an application that displays an image inside of a Windows Forms PictureBox

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.