Rest clients for Java 5 and Spring 2.x - java

I am stuck on Java 5 and Spring 2.x and need to call a rest api. Springs RestTemplate wasn't introduced until Spring 3 and it seems every other one I find requires Java 6 or 7.

Related

can it run spring 3 on tomcat 9 and java 8?

I have found an application that is made with spring 3.2.18.RELEASE and is running on tomcat 9 and java 8.
My knowledge of java and spring is very little, but from what I understand spring 3 should work with Servlet 2.5 API.
But according to tomcat page, servlet 2.5 is for tomcat 6
Can an application made with spring 3 run in java 8 with tomcat 9 without problems?
What would be the ideal version of java and tomcat for spring 3?
How should the correct versions of java, tomcat and spring be selected?
I suppose that will be running ok. I am usign Java 8, Tomcat 8 and Spring 4 and works correctly. And Tomcat 9 also support Java 8.

Does Swagger work with Struts to document REST api's?

We have an existing Java 1.7 Struts 1 application. We do have some REST api's that use RX-JS (javax.ws.rs).
Question
Does Swagger work with Struts1?
Is there any documentation on how to configure this?
I have looked here, but I am not sure what version I should use?
Struts 1.x reached it's EOL in December 2008. There are only Swagger (an implementation of OpenAPI Specification) implementation for both JAX-RS as well as Spring REST.
There is NO implementation for Swagger in Struts framework as Struts was/is meant to be an MVC framework to build Java Web application. Yes, you can "hack" it to return behave like a RESTful Web Service but that wasn't it's intended purpose.

Spring 4 mvc + security for servlet 2.5 in JBoss5.1.0.GA

I want to use spring 4 with minimal xml configuration for the now new project I am about to develop. I will be using Spring in this project for dependency-injection, mvc, security and jdbc. I will use JOOQ for query generation. (Yes, I need to project to support Postgresql and oracle) (maybe, in future, this app will extended support for REST too). The problem I face now is my production application server is JBoss5.1.0.GA, which obviously does not support servlet 3.0. Now I have a working spring 4 mvc code base with servlet 2.5, but I could not figure out how to configure the security with java config. Because I see most of the examples on spring 4 on servlet 3.0+ versions, and very less not good examples on 2.5. Though I read the spring security from the spring website, it made little difference on implementing it. Have anyone implemented security (db/ldap) on servlet 2.5? Share with me your wisdom and experiences.
Spring security (I suppose version 3.2 as you speak of spring 4) works well on servlet 2.5, at least with xml config. I am not sure that you can use full java config for security, but I am sure annotations can be used for method security.

Using Spring HTTP invoker between difference versions of spring?

I have a server which uses spring 2.5.6 and currently my client spring mvc application are also using same version 2.5.6. I use httpinvoker for the connection between the two. I want to update and benefit of spring mvc 3, but I can not do anything with the server.
My questions is:
Will it work to use a different version of spring on the web-application than on the server-side?
And can this have side-effects that can cause problems?

Jersey with Java 5

What is the latest version of Jersey that will run with Java 5? I found the Jersey 1.3 documentation saying that Java 6 is required but I'm having troubles finding previous versions of the docs.
If you are stuck with Java 5, your need to use Jersey 1.2.
If the version is not mature enough for you, try Spring 3 MVC for building REST webservices, works with Java 5:
Spring Documentation
Spring blog article
Build RESTful web services using Spring 3 (ibm)
You sure? Jersey 1.7 guide claims 1.5 works, with some additional jars.

Categories