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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T17:31:51+00:00 2026-05-19T17:31:51+00:00

We are migrating our web application from Spring 2.5 to Spring 3.0.5. Looks like

  • 0

We are migrating our web application from Spring 2.5 to Spring 3.0.5. Looks like all the Controller classes (the classes in org.springframework.web.servlet.mvc package: BaseCommandController, AbstractCommandController, SimpleFormController, etc) have been deprecated. We used those classes heavily in our application. These classes have been replaced by @Controller annotation instead.

I have a few questions regarding Spring 3.0.x Controller configuration…

  1. We used the following XML to create a Controller bean in Spring 2.5. If <context:component-scan> is used instead to create the Controller beans, then how do I wire-in the dependencies? If possible I would like to avoid Auto-Wiring.

<bean id="photosetViewController" class="com.xyz.web.PhotosetViewController"
    p:photosetManager-ref="photosetManager"
    p:photoManager-ref="photoManager" />
  1. We have created 3 Interceptors. We use SimpleUrlHandlerMapping to map these Interceptors to different request URLs and also to map URLs to Controllers. How do we achieve the same in Spring 3.0.x?

<bean class="org.springframework.web.servlet.handler.SimpleUrlHandlerMapping">
    <property name="alwaysUseFullPath" value="true" />      
       <property name="interceptors">
           <list>
               <ref bean="httpRedirectInterceptor"/>
               <ref bean="loginInterceptor"/>
           </list>
       </property>      
        <property name="mappings">
            <value>             
                /abc.html=abcLookupController
                /photoupload.html=photoUploadController
          </value>
        </property>
</bean>

<bean class="org.springframework.web.servlet.handler.SimpleUrlHandlerMapping">
    <property name="alwaysUseFullPath" value="true" />      
       <property name="interceptors">
           <list>
               <ref bean="httpRedirectInterceptor"/>
               <ref bean="loginInterceptor"/>
               <ref bean="userMenuInterceptor" />
           </list>
       </property>      
        <property name="mappings">
            <value>
                /index.html=homepageController
                /success.html=simpleController
            </value>
        </property>
</bean>
  1. In case of SimpleFormControllers we used different methods like initBinder, referenceData, formBackingObject. We also used command objects and validation classes. How do we achieve the same in Spring 3.0.x?

<bean id="photosetAddController" class="com.xyz.web.PhotosetAddController"
    p:photosetManager-ref="photosetManager"
    p:photosetTypeManager-ref="photosetTypeManager"
    p:stateManager-ref="stateManager" >
    <property name="validator">
    <bean class="com.xyz.form.PhotosetAddValidator" />
    </property>
    <property name="formView" value="photosetadd" />
    <property name="successView" value="redirect:/photoset" /> 
</bean>

Any pointers are greatly appreciated.

  • 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-19T17:31:51+00:00Added an answer on May 19, 2026 at 5:31 pm

    As skaffman noted – your code will work fine without any modifications. I’ll answer your questions in short:

    1. You can use @Resource(name="beanName") for name-based injection. But autowiring is also a good option. Either @Autowired, or @javax.inject.Inject. Note that you can use @Qualifier("name") to differentiate between beans with the same interface/base class. You can even use the javax.inject qualifiers (read about all these in the docs)

    2. interceptor mappings can stay the same

    3. There is @InitBinder, which denotes the initBinder method. I can’t tell about the other.

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

Sidebar

Related Questions

We just recently migrated our web application from .NET 1.1 to .NET 2.0. The
We are currently in the process of migrating our application from our production environment
Good Day, We have migrated our web application to ASP.NET 2.0 from ASP.NET 1.1.
We are migrating our test report data (unit, regression, integration, etc..) from an XML
We are in the process of migrating our bug tracking to Bugzilla from a
Our team is migrating from VSS 6.0 to TFS 2008 to be used for
I am migrating a struts application from Websphere to Tomcat 6 and my application
I am migrating an application from .NET 1.1 to .NET 2.0. Should I remove
We are about to migrate an intranet web application from using a proprietary forms-based
We are migrating our applications to VB.Net 2008 from Classic VB and I need

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.