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 8180089
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T00:08:30+00:00 2026-06-07T00:08:30+00:00

I have developed sample api as jar file. This jar file contains the code

  • 0

I have developed sample api as jar file. This jar file contains the code which is common to 10 different application, so all these apps has to do is include this jar file. Now this jar file uses spring and jndi datasource. When I used this jar in one of the spring mvc application as dependency, then it is not finding the jndi datasource bean defined in one of the context file inside the jar file. How can I tell spring container to scan all the application context files in the jar.

There are other web application which is not spring mvc and they also use the same jar file as dependency, how can they use this spring based jar file.

Thanks

  • 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-06-07T00:08:32+00:00Added an answer on June 7, 2026 at 12:08 am

    You should add the application context file of your jar in the Web of your applications, for exmple:

    <context-param>
        <param-name>contextConfigLocation</param-name>
        <param-value>
            classpath:main-context.xml,
            classpath:library-context.xml
        </param-value>
    </context-param>
    

    You can use also something like library-context*.xml in order to import few context files but I think it is better doing it one by one so you konw exactly what context files you are using.

    If you have applications that are not using Spring MVC, it is not a problem since you don’t need Spring MVC, just Spring IoC

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

Sidebar

Related Questions

I have developed a simple application using SDK(Android: 3.2[API-13]) for, to display Google banners.
I have developed a simple location aware iPhone application which is functionally working very
I have developed an iPhone application that was rejected. With this application I offer
I have developed a simple library in Ruby and need to use this in
I am new to rails and have developed a simple rails application on my
On Windows 7, VB.NET Express, I have developed a simple Forms application. I don't
I have developed a simple API to allow communication between my Android/iPhone apps and
I have developed a mobile application using jquerymobile,asp.net mvc3,HTML5. I have a scenario like
I have a Seam 2.2 app running under JBoss5.1. In this application I have
I have developed a jQuery API browser from the raw XML available from http://api.jquery.com/api/

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.