1

I've been reading about using Spring Boot and Gradle to quickly build RESTful services: https://spring.io/guides/gs/rest-service/. I'd like to give it a try but I need to build a war that's compatible with servlet 2.4 (I know.. life in the 1970's).

The error I get when attempting to deploy the war generated by following the guide above to Sun App Server 8.1 is:

Unknown deployable object type specified: "Cannot determine the J2EE component type"

The generated war has no web.xml and there may be other expected artifacts. Configuring a spring-boot application using web.xml seems to suggest that a web.xml can be packaged with a Spring Boot application but doesn't explain how.

Is Spring Boot compatible with older servlet specs? How can Spring Boot and Gradle be used to generate a war that works on older web containers?

Thanks.

Community
  • 1
  • 1
jlpp
  • 1,564
  • 5
  • 23
  • 36

1 Answers1

2

The answer to the question you linked to didn't actually go as far as saying that you could easily create a fully-leaded Boot application with Servlet 2.4. I consider that quite a hard, but probably achievable, target if you are prepared to do some legwork, and accept some compromises. You might find this stuff useful: https://github.com/scratches/spring-boot-legacy (I managed to use it to push an app to GAE). But there are some limits to what can be supported for such old technology, and we aren't officially supporting anything other than Servlet 3.0.1 right now.

Dave Syer
  • 56,583
  • 10
  • 155
  • 143