I want to write a JAR file that makes use of the javax servlet API. If I write against version 2.2, does that mean it will work on versions 2.3, 2.4 and 2.5?
Thanks
I want to write a JAR file that makes use of the javax servlet API. If I write against version 2.2, does that mean it will work on versions 2.3, 2.4 and 2.5?
Thanks
In most cases, there shouldn't be any compatibility issues. There may be a couple of gotchas, depending on what you are doing. If you are writing some framework that decorates container classes, the interfaces have occasionally been modified. For example, the method ServletRequest.getRemotePort() was not present in the J2EE 1.3 version (before Servlet 2.4). These difficulties can be overcome, but be aware that you're going to have to factor them into your development and testing.
It will work, though sometimes some methods will be deprecated and might throw up warnings regarding their implementation.