Search code examples
hibernatespringstruts-1

Struts1 with Spring and Hibernate


I had made an application on Struts 1 with AJAX and JQuery.

Now I want to implement Hibernate and Spring on Application.

Since I don't know Spring MVC, I want Struts 1 code should be there.

Can it be possible?


Solution

  • Yes, there are several ways to go about this, but the easiest is to use Spring's built-in Struts 1 support. See the Spring/Struts reference material for details.

    The nutshell version is that you use a Spring plugin inside the Struts config file, define your actions as beans in a Spring config file, and use DelegatingActionProxy as your action class in your Struts config.

    All this said, you might want to consider actually learning something new rather than using a dead platform that makes it difficult to support modern programming practices--your career will thank you. Either Spring MVC or Struts 2 is a far better choice, along with a number of other options.