Skip to content

Servlet 2.5 with XML Spring Configuration #101

Closed

Description

@pdorgambide

I would like to integrate the spring session into an existed projects that runs on tomcat 6 (servlet 2.5) and are configured using XML spring configuration files.
As the servlet 2.5 does not work with WebApplicationInitializer and the documentation does not show how to configure the spring-session with Spring XML configuration files (usefull for old apps) this integration will be harder than expected.
It will be very helpfull more documentation about how integrate spring-session with legacy spring application

Activity

  1. changed the title [-]Servlet 2.3 and xml spring configuration files compatibility[/-] [+]Servlet 2.3 with XML Spring Configuration[/+] on Jan 13, 2015
  2. changed the title [-]Servlet 2.3 with XML Spring Configuration[/-] [+]Servlet 2.5 with XML Spring Configuration[/+] on Jan 13, 2015
  3. artembilan commented on Jan 14, 2015

    @artembilan
    Member

    To this issue. I was going to show some XML config for <websocket:broker>, but noticed that WebSocketHandlerDecoratorFactory requires ApplicationEventPublisher as ctor arg. Would be better to implement ApplicationEventPublisherAware there.
    Thanks

  4. added
    type: enhancement
    on Jan 14, 2015
  5. rwinch commented on Jan 14, 2015

    @rwinch
    Member

    @pdorgambide Thanks for creating a ticket. I agree that this is something that should be documented.

    In the meantime, are you aware you can used mixed Spring XML configuration with Spring Java Configuration? I've added a complete sample at httpsession-xml. You can find a summary of how to do it at #105

  6. pdorgambide commented on Jan 15, 2015

    @pdorgambide
    Author

    @rwinch thanks a lot.
    I am an Spring's caveman and It has been easier configure my legacy projects with XML: applicationContext-session.xml
    Once time it runs, due that I use Servlet 2.5 throws the next exception:

    java.lang.NoSuchMethodError: org.springframework.session.web.http.SessionRepositoryFilter$SessionRepositoryRequestWrapper.getServletContext()
    

    HttpRequest interface has the getServletContext() since 3.0 ;o(
    This challenge allow me to know more about Servlet 3.0, Spring Boot and JavaConfig and take in consideration for use into near future.

  7. rwinch commented on Jan 15, 2015

    @rwinch
    Member

    @pdorgambide Thanks for following up. Does this mean you were able to get your application configured using XML and JavaConfig?

    The NoSuchMethodError sounds like a bug. Spring Session should work with Servlet 2.5, but based on your description it sounds as though it is not. Can you create a new issue with a complete stacktrace?

  8. pdorgambide commented on Jan 15, 2015

    @pdorgambide
    Author

    @rwinch I am able to get the application configured only with XML.
    I will create the new issue with the complete stracktrace to let you located and fix.
    Awesome work.

  9. rwinch commented on Apr 15, 2015

    @rwinch
    Member

    Closing this issue since it is now superseded by additional tickets (many of which are fixed)

  10. self-assigned this
    on Apr 15, 2015
  11. added 7 commits that reference this issue on Nov 11, 2016
  12. added a commit that references this issue on Aug 13, 2021
    2d000c4
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

type: enhancement

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions