Skip to content

Sdk 5178 upgrade to jakarta servlet #160

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: java-mvc-v2
Choose a base branch
from

Conversation

tanya732
Copy link
Contributor

@tanya732 tanya732 commented Jun 11, 2025

1. Java & Servlet API Upgrade

Migrated from javax.servlet to jakarta.servlet:

  1. All imports referencing javax.servlet have been updated to jakarta.servlet.
  2. This affects core classes, test classes, and all Javadoc references.

2. Gradle Upgrade

  1. Gradle Wrapper updated:
  2. Upgraded Gradle from 6.9.2 to 8.7.
  3. Updated related wrapper scripts (gradlew, gradlew.bat, and gradle-wrapper.properties) to match new Gradle conventions and improve error handling/messaging.
  4. Improved cross-platform compatibility and script robustness.

Migrate to Java 11+, Jakarta Servlet 5+, and Modernize Build
What & Why
Java & Servlet API Migration:
Migrates the codebase from Java 8 and javax.servlet (Servlet 3) to Java 11+ and jakarta.servlet (Servlet 5+), in line with the modern Jakarta EE ecosystem. This future-proofs the library and enables compatibility with current servlet containers.
Gradle Build Modernization:
Upgrades the Gradle wrapper and scripts to version 8.7, bringing in enhanced build performance, security fixes, and improved cross-platform support.

Key Changes

Source & Test Code:
Updates all imports from javax.servlet.* to jakarta.servlet.*.
Updates Javadoc references accordingly.
Gradle Wrapper:
Bumps to Gradle 8.7, updates scripts for improved error handling and POSIX compliance.
Tests:
Uses matchesPattern in assertions for cookie headers to handle new attributes (like Expires).

Impact
Breaking Change:
Users must use Java 11 or higher and a servlet container supporting Jakarta Servlet 5+.
Build:
Build scripts are now aligned with current Gradle best practices.
Tests:
More robust tests, less prone to breakage from minor header formatting changes.

🙏 Credits
Inspired by the foundational work done in #156 — big thanks to TareqK for leading this migration effort.

@tanya732 tanya732 marked this pull request as ready for review June 11, 2025 07:19
@tanya732 tanya732 requested a review from a team as a code owner June 11, 2025 07:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant