A Struts to Spring Boot migration moves Java web applications off a framework line that is past end of life, or close to it, onto Spring Boot 4 with Spring MVC, Jakarta EE 11 and a Java 17 or later runtime. Apache lists Struts 1.x as end of life since 5 April 2013, Struts 2.3.x since 12 September 2019 and Struts 2.5.x since 30 October 2023, with no further security fixes for those lines. There is no official automated converter, so the migration is a planned rewrite of the web layer that keeps your business logic. This guide maps Struts concepts to Spring, compares migration strategies and gives a practical roadmap.
Technically reviewed by Harshita Pipaliya.
This is the fifteenth article in our Legacy Modernization Series and the second in its Java section. It follows Java 6/7/8 to Java 25 LTS, because most Struts applications also need a Java upgrade.
Executive summary
- Support: the Apache Struts end-of-life page lists Struts 1.x (5 April 2013), 2.3.x (12 September 2019) and 2.5.x (30 October 2023) as end of life. For those lines Apache “no longer provides security patches, bug fixes, or updates” (Apache Struts).
- Current Struts: Struts 6.x and 7.x are the maintained lines. Struts 7 requires Java 17 and moves to Jakarta EE, so even staying on Struts means a significant upgrade.
- Target: Spring Boot 4.0 reached general availability in November 2025, with baselines of “JDK 17 (while embracing JDK 25), Jakarta EE 11, and Kotlin 2.2” (InfoQ).
- No converter: Struts actions, forms, tags and configuration have to be rewritten as Spring MVC controllers, validated models and templates. Service and data access code can usually be reused.
- Our recommendation: migrate the web layer screen by screen with a strangler approach, behind one reverse proxy and one login, onto the latest supported Spring Boot 4.x release on Java 25. Upgrade to a supported Struts release first only if the migration will take longer than your security risk allows.
- Executive summary
- Struts support status in 2026
- Why Struts applications are a risk
- Spring Boot 4 as the target
- Struts to Spring concept mapping
- Migration strategies compared
- Tools and automation
- Code patterns: before and after
- Recommended target architecture
- Step-by-step migration roadmap
- Security considerations
- Testing, deployment and support
- Cost, effort and timeline
- FAQs
- Conclusion
Struts support status in 2026
| Struts line | Status | End-of-life date | What it means |
|---|---|---|---|
| Struts 1.x | End of life | 5 April 2013 | No security or bug fixes |
| Struts 2.3.x | End of life | 12 September 2019 | No security or bug fixes |
| Struts 2.5.x | End of life | 30 October 2023 | No security or bug fixes after the final security-only period |
| Struts 6.x | Maintained | Not listed | Java EE (javax) based |
| Struts 7.x | Maintained | Not listed | Java 17+, Jakarta EE (jakarta) based |
Source: Apache Struts end-of-life versions page and the Struts 1 and Struts 2.5 end-of-life announcements. The Struts 2.5 announcement noted that moving from 2.5 to 6.x “will be smoother” than moving to 7.x.
What this means: applications on Struts 1, 2.3 or 2.5 run on a framework that receives no fixes from Apache. Upgrading to Struts 7 is a real option, but it already involves a Java 17 upgrade, the jakarta namespace and changed core packages, so many teams use that moment to move to Spring Boot instead.
Why Struts applications are a risk
- Security exposure. Struts 2 has a history of serious vulnerabilities, including CVE-2017-5638, a remote code execution flaw in the Jakarta Multipart parser. End-of-life lines will not receive fixes for new ones.
- Old Java and servers. Struts 1 and early Struts 2 applications often run on Java 6, 7 or 8 and old WebLogic, WebSphere, JBoss or Tomcat versions (see the previous article).
- Server-rendered JSP with custom tags. Struts tag libraries, OGNL expressions and Tiles layouts tie the user interface to the framework.
- Skills. Fewer developers know Struts, while Spring is widely used for Java web development.
- Blocked upgrades. Old Struts versions pin old libraries, which blocks moves to current Java, Jakarta EE and container platforms.
Spring Boot 4 as the target
| Component | Spring Boot 4.0 baseline |
|---|---|
| Java | JDK 17 minimum, with JDK 25 supported |
| Framework | Spring Framework 7.0 |
| Jakarta EE | Jakarta EE 11 (Servlet 6.1, Persistence 3.2, Validation 3.1) |
| Embedded servers | Tomcat 11.0, Jetty 12.1 (Undertow not supported yet) |
| JSON | Jackson 3.0 (packages move from com.fasterxml.jackson to tools.jackson) |
| ORM | Hibernate 7.2 |
Sources: Spring Boot 4.0 release notes and InfoQ’s Spring Framework 7 and Spring Boot 4 report.
Spring Boot open source support windows are short, so plan for regular minor upgrades. HeroDevs’ November 2026 summary lists open source support for Spring Boot 3.5 as ended on 30 June 2026 and for 4.0 as ending on 31 December 2026, with 4.2.0 released on 19 November 2026. Check the official Spring support page for current dates and start on the latest 4.x release.
Struts to Spring concept mapping
| Struts 1 / Struts 2 | Spring Boot / Spring MVC | Notes |
|---|---|---|
Action / DispatchAction (Struts 1), action class (Struts 2) | @Controller class with handler methods | One controller per feature, not per screen |
ActionForm, Struts 2 action properties | Model or form object bound with @ModelAttribute | Plain Java objects or records |
struts-config.xml / struts.xml | @GetMapping and @PostMapping annotations | Routing lives next to the code |
ActionForward, result types | View names, redirect: prefixes, ResponseEntity | |
Struts Validator (validation.xml), validate() | Jakarta Bean Validation (@NotBlank, @Valid) and BindingResult | Annotations on the model |
Interceptors (Struts 2), RequestProcessor | HandlerInterceptor, servlet filters, Spring Security filters | |
| JSP with Struts tags and OGNL | Thymeleaf templates, or JSP with Spring form tags | Thymeleaf is the common choice with Spring Boot |
| Tiles layouts | Thymeleaf fragments or layout templates | |
MessageResources (ApplicationResources.properties) | MessageSource (messages.properties) | Keys can usually be reused |
Plug-ins, ServletContext setup | Spring beans, @Configuration, auto-configuration | |
| Container-managed or custom security | Spring Security | Authentication, authorization, CSRF |
Migration strategies compared
| Strategy | What it means | Best for | Risk |
|---|---|---|---|
| Upgrade Struts first | Move to a supported Struts 6 or 7 release, then migrate later | Large apps under urgent security pressure | Two projects; Struts 7 still needs Java 17 and jakarta |
| Big-bang rewrite | Rebuild the whole web layer in Spring Boot and switch at once | Small applications with few screens | Long freeze, one risky cutover |
| Strangler, screen by screen | Run Struts and Spring Boot side by side behind a reverse proxy, moving routes in waves | Most enterprise applications | Needs shared login and session handling |
| API plus new front end | Expose services as Spring Boot REST APIs and build a new React or Angular UI | Apps that also need a new user experience | Largest scope; UI redesign decisions |
Our recommendation: the strangler approach for most applications. Keep one domain at a time in each wave, reuse service and DAO code where it is sound, and retire Struts routes as their Spring replacements go live. If a full UI redesign is planned anyway, use the API plus new front end route.
Tools and automation
| Tool | Use |
|---|---|
| OpenRewrite Spring Boot, Jakarta and Java recipes | Automate dependency, namespace and Java version changes in the reused code |
jdeps and jdeprscan | Find JDK internal and removed API use before moving to Java 25 |
| Spring Initializr | Generate the new Spring Boot project skeleton |
Static analysis of struts-config.xml / struts.xml | Build the inventory of actions, forwards, forms and validators |
| AI coding assistants | Draft controllers, models and templates from existing actions and JSPs; every change needs review and tests |
| Playwright or Selenium | Record end-to-end tests on Struts screens and replay them against Spring screens |
No tool converts Struts actions and JSPs into Spring MVC automatically and reliably. Plan the web layer as a rewrite with tool support.
Code patterns: before and after
The examples below are illustrative and simplified.
1. Struts 1 action and form (before):
public class OrderSearchAction extends Action {
public ActionForward execute(ActionMapping mapping, ActionForm form,
HttpServletRequest request, HttpServletResponse response) {
OrderSearchForm f = (OrderSearchForm) form;
request.setAttribute("orders", orderService.search(f.getCustomerId()));
return mapping.findForward("success");
}
}
<action path="/orderSearch" type="com.acme.web.OrderSearchAction"
name="orderSearchForm" scope="request" validate="true"
input="/jsp/orderSearch.jsp">
<forward name="success" path="/jsp/orderList.jsp"/>
</action>
2. Spring Boot controller (after):
@Controller
@RequestMapping("/orders")
public class OrderController {
private final OrderService orderService;
public OrderController(OrderService orderService) {
this.orderService = orderService;
}
@GetMapping("/search")
public String searchForm(@ModelAttribute("criteria") OrderSearch criteria) {
return "orders/search";
}
@PostMapping("/search")
public String search(@Valid @ModelAttribute("criteria") OrderSearch criteria,
BindingResult result, Model model) {
if (result.hasErrors()) {
return "orders/search";
}
model.addAttribute("orders", orderService.search(criteria.customerId()));
return "orders/list";
}
}
3. Validation moves from validation.xml to annotations:
public record OrderSearch(
@NotBlank @Size(max = 12) String customerId,
@PastOrPresent LocalDate fromDate) { }
4. Struts tags become Thymeleaf:
<!-- Before: JSP with Struts 1 tags -->
<html:form action="/orderSearch">
<html:text property="customerId"/> <html:errors property="customerId"/>
<html:submit value="Search"/>
</html:form>
<!-- After: Thymeleaf -->
<form th:action="@{/orders/search}" th:object="${criteria}" method="post">
<input type="text" th:field="*{customerId}">
<span th:if="${#fields.hasErrors('customerId')}" th:errors="*{customerId}"></span>
<button type="submit">Search</button>
</form>
5. Spring Security replaces custom login checks:
@Bean
SecurityFilterChain security(HttpSecurity http) throws Exception {
http.authorizeHttpRequests(auth -> auth
.requestMatchers("/css/**", "/login").permitAll()
.requestMatchers("/admin/**").hasRole("ADMIN")
.anyRequest().authenticated())
.formLogin(Customizer.withDefaults());
return http.build();
}
6. Strangler routing at the reverse proxy (NGINX example):
location /orders/ { proxy_pass http://spring-boot-app:8080; }
location / { proxy_pass http://legacy-struts-app:8080; }
Recommended target architecture

- Entry point: a reverse proxy or API gateway that routes migrated paths to Spring Boot and the rest to Struts.
- Web layer: Spring MVC controllers with Thymeleaf, or REST controllers for a React or Angular front end.
- Security: Spring Security with single sign-on (for example OpenID Connect) shared by both applications during the transition.
- Business and data layers: existing service code moved into Spring beans; data access on Spring Data JPA or JDBC.
- Platform: Java 25, embedded Tomcat or Jetty, container images, CI/CD and observability with metrics, logs and traces.
Running Struts applications you need to retire? Talk to our modernization team about an inventory and a screen-by-screen plan.
Step-by-step migration roadmap
- Inventory (2 to 4 weeks): list actions, forms, forwards, validators, JSPs, Tiles definitions, interceptors, plug-ins and integrations from the Struts configuration; rank screens by usage and risk.
- Reduce immediate risk: patch or upgrade to a supported Struts release, or add web application firewall rules, if the migration will take many months.
- Separate business logic: move logic out of actions into services that both applications can call.
- Set up the platform: Spring Boot project, reverse proxy, shared login, CI/CD, containers and test automation.
- Pilot a domain: migrate one set of screens end to end and run both versions in parallel.
- Migrate in waves: move domains one at a time, switching routes at the proxy and comparing behaviour with recorded end-to-end tests.
- Decommission: remove Struts once traffic to its routes reaches zero, then retire the old application server and Java runtime.
Security considerations
- Close the gap early: end-of-life Struts lines will not get fixes for new vulnerabilities, so prioritize internet-facing screens and file upload features in the first waves.
- Input handling: replace OGNL-based binding with explicit model binding and Bean Validation.
- Authentication: use Spring Security with your identity provider; avoid custom session flags for login state.
- CSRF and headers: Spring Security enables CSRF protection by default for form posts; add security headers at the proxy or in the application.
- Supply chain: generate an SBOM, scan dependencies and remove old libraries that Struts pulled in.
Testing, deployment and support
Testing
- Record end-to-end tests on each Struts screen before migrating it, then replay them against the Spring version.
- Unit test controllers with Spring MVC test support and models with Bean Validation tests.
- Run security scans and load tests on the new routes before switching traffic.
Deployment
- Deploy Spring Boot as a container with health checks; switch routes at the proxy, so rollback is a routing change.
- Keep both applications on the same login and session timeout policy during the transition.
Support
- Plan regular Spring Boot minor upgrades to stay within open source support, or budget for commercial support.
- Track Java LTS and Spring support dates together.
Cost, effort and timeline
The ranges below are indicative planning assumptions, not benchmarks or quotes.
| Application profile | Typical scope | Indicative cost (USD) | Indicative duration |
|---|---|---|---|
| Small | Up to 30 screens, simple forms, logic mostly in services | $30,000 to $100,000 | 2 to 4 months |
| Medium | 30 to 150 screens, Tiles, custom tags, integrations | $100,000 to $450,000 | 4 to 10 months |
| Large | 150+ screens, logic in actions, multiple apps, EJB or app server APIs | $450,000 to $1.5M+ | 10 to 24+ months |
Cost drivers: screen count, how much logic sits in actions and JSPs, custom tags, test coverage, the Java upgrade and UI redesign decisions. See legacy application modernization cost and ROI and microservices vs monolithic architecture if you are also deciding how to split the application.
FAQs
Is Apache Struts still supported?
Struts 6.x and 7.x are maintained. Apache lists Struts 1.x, 2.3.x and 2.5.x as end of life, with no further security patches or bug fixes for those lines.
Can Struts be converted to Spring Boot automatically?
No reliable tool converts Struts actions, forms and JSPs into Spring MVC. Tools such as OpenRewrite help with dependencies, Java versions and the jakarta namespace, and AI assistants can draft code, but the web layer needs a planned rewrite and testing.
Should we upgrade to Struts 7 instead of moving to Spring Boot?
It can be a short-term fix for security. Struts 7 still needs Java 17 and the jakarta namespace, so the effort is significant. If you plan to leave Struts anyway, moving to Spring Boot usually gives more long-term value.
Which Spring Boot version should we target?
Start on the latest supported Spring Boot 4.x release. Spring Boot 4 requires Java 17 or later and Jakarta EE 11, and works with Java 25 LTS.
Can Struts and Spring Boot run side by side?
Yes. A reverse proxy can route migrated paths to Spring Boot and the rest to Struts. Shared single sign-on keeps users logged in across both.
Do we have to replace JSP?
No, Spring MVC supports JSP. Most teams move to Thymeleaf with Spring Boot because it works with embedded servers and executable JARs, or build a new front end on REST APIs.
How long does a Struts to Spring Boot migration take?
Small applications can move in two to four months. Large applications with hundreds of screens and logic in actions often take one to two years in waves.
Conclusion
Struts 1, 2.3 and 2.5 receive no more fixes, and even current Struts requires a large upgrade. Moving to Spring Boot 4 on Java 25 gives a widely supported platform. Inventory the Struts configuration, pull business logic into services, put a proxy and shared login in front, and migrate screen by screen with recorded tests until Struts can be switched off.
Previous in this series: Java 6/7/8 to Java 25 LTS. Next: AngularJS to Modern Angular.
Related services: Legacy Software Modernization · DevOps Services · Microsoft Azure · AWS · Hire DevOps Engineers
Sources
- Apache Struts, EOL versions
- Apache Struts, Struts 1 EOL announcement
- Apache Struts, Struts 2.5 EOL announcement
- SoftwareMill, What’s new in Apache Struts 7 (December 2024)
- Spring Boot, Spring Boot 4.0 Release Notes
- InfoQ, Spring Framework 7 and Spring Boot 4 (November 2025)
- HeroDevs, Spring Boot Versions, EOL Dates, and Latest Releases (November 2026)
Plan your Struts to Spring Boot migration
Prominent.tech helps teams move Apache Struts applications to Spring Boot on Java 25, screen by screen, with recorded end-to-end tests, shared sign-on, CI/CD and containers in place. Talk to our modernization team or explore our legacy software modernization services.
