wimdeblauwe / htmx-spring-boot

Spring Boot and Thymeleaf helpers for working with htmx
Apache License 2.0
487 stars 43 forks source link

Adaptation with `javax.servlet` support? #131

Open ilonachan opened 1 week ago

ilonachan commented 1 week ago

Some older Spring 5 applications use older Java versions, in which the Jakarta Servlet API was still found under javax.servlet. This project is unfortunately unusable in those, since it internally references jakarta.servlet. It might be valuable to think about ways to make this project accessible in these cases, with an alternate javax version for example.

checketts commented 6 days ago

You can use the 1.0.0 version of this library if you are on Spring 5 still: https://github.com/wimdeblauwe/htmx-spring-boot?tab=readme-ov-file#spring-boot-compatibility

wimdeblauwe commented 6 days ago

If needed, you can get commercial support via https://www.widit.be/.

ilonachan commented 4 days ago

@checketts That's an okay idea as a first step I guess. I'm not sure how many (security) features that version would be missing, but it'd be a good start, and I'm using an old Spring version anyway.

Problem now is, those versions aren't in Maven, so I can't actually use them. @wimdeblauwe it'd be lovely if you could fix that.

wimdeblauwe commented 4 days ago

Version 1.0.0 can be found via this: https://mvnrepository.com/artifact/io.github.wimdeblauwe/htmx-spring-boot-thymeleaf/1.0.0

checketts commented 4 days ago

The group changed. Also you won't need to be concerned with security fixes with the older version. Just some missing features and apis (like the builder) being different.

ilonachan commented 23 hours ago

Awesome, good to know! I thought that project would be an addon with specializations for Thymeleaf, so it'd probably be best to document the fact that it's actually the old name of the project.

ilonachan commented 20 hours ago

After trying this I should note that this actually does not work for my case, because the package (even at version 1.0.0) was compiled with Java 11, making it obviously unusable in Java 8. That's unfortunate because to my knowledge Java 8 is still used in MANY corporate (and probably other) contexts, which is also the very reason why the javax thing was needed to begin with.

checketts commented 20 hours ago

With Java 8 out of support, commercial support is probably your best option. Sorry about that.

I don't have any ties to commercial support, so I'm just speaking from the logistical/request perspective.

ilonachan commented 4 hours ago

Okay yeah, that's super fair. Honestly I was just trying to see if it's possible to get this library into our project's current state already, but since we're gonna be upgrading a bunch of it anyway I guess that'd be the easier way to go. I do think these limitations should be documented in the README, but other than that I'll stop bothering y'all now. Thanks a lot!