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

  • Home
  • SEARCH
  • 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 899953
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T15:18:24+00:00 2026-05-15T15:18:24+00:00

This may be a relatively straight-forward question that I just haven’t been searching for

  • 0

This may be a relatively straight-forward question that I just haven’t been searching for correctly, but I’m trying to use the Spring IoC container to configure my servlets. I have some additional handlers (that are private data members) and such that I would like to be configured at runtime. Is it possible to do this?

Right now I have my web.xml loading the servlets correctly, however, the problem is I’m not sure how to wire those instances to the Spring IoC container, or alternatively, wire the instances generated from the IoC container to the servlet container.

In my web.xml file, I’m setting up the ContextLoaderListener

<listener>
    <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
</listener>

And also configuring the correct location for the beans context

<context-param>
  <param-name>contextConfigLocation</param-name>
  <param-value>
    /WEB-INF/beans.xml
  </param-value>
</context-param>

I also know that the beans.xml file is being parsed because I got several exceptions when I had typed things incorrectly.

Thoughts? Is there a better way to do this?

  • 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-15T15:18:24+00:00Added an answer on May 15, 2026 at 3:18 pm

    I think most folks looking to do what you are just use the Spring MVC framework. In that case, the is a Spring class, and you just implement “Controllers” (instead of actual servlets).

    That said, it’s completely possible to do exactly what you’re looking for. Check out FrameworkServlet (you can extend that) or DelegatingFilterPorxy (you could write a ‘DelegatingSevletProxy’ using this class as an example).

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

Sidebar

Related Questions

I think this may be relatively straight forward. I have a rewrite rule that
This may be a silly question, but as someone relatively new to PHP, I'm
I know this may sound relatively basic question, but still wanted to ask. I
I realise that this question may be almost impossible to answer definitively, but: Is
This may seem like a simple question but i am getting an error when
This may be silly, but it's been nagging the back of my brain for
This may seem like a stupid question, but what message do i send to
I'm relatively new to JS so this may be a common problem, but I
I am a relatively new programmer so this may be a really simple question
I'm relatively new to iPhone Development, so this may be my fault, but it

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.