To fix "package javax.servlet does not exist" errors in your IDE: Where is servlet-api.jar in Glassfish 5.1? - Stack Overflow
Note: Always set the scope to provided because the GlassFish server will provide its own version of this library at runtime. 4. Adding the JAR to your IDE servlet-api.jar download glassfish
jakarta.servlet jakarta.servlet-api 6.0.0 provided Use code with caution. To fix "package javax
Search for the javax.servlet-api artifact. 3. Using Maven or Gradle (Recommended) servlet-api.jar download glassfish
Search for the jakarta.servlet-api artifact.
If you already have GlassFish installed, you the jar separately. It is bundled within the server's installation directory.