Skip to content

Sdk 5177 upgrade to jakarta servlet#159

Closed
tanya732 wants to merge 2 commits into
java-mvc-v2from
sdk-5177-upgrade-to-jakarta-servlet
Closed

Sdk 5177 upgrade to jakarta servlet#159
tanya732 wants to merge 2 commits into
java-mvc-v2from
sdk-5177-upgrade-to-jakarta-servlet

Conversation

@tanya732

@tanya732 tanya732 commented Jun 11, 2025

Copy link
Copy Markdown
Contributor

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.

@tanya732 tanya732 changed the base branch from master to java-mvc-v2 June 11, 2025 07:03
@tanya732 tanya732 closed this Jun 11, 2025
@tanya732 tanya732 deleted the sdk-5177-upgrade-to-jakarta-servlet branch June 11, 2025 07:17
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