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.
Related
Hi everyone is there a method to remove a servlet or servletcontext from an embedded jetty server version 9 like remove servlet? I specify version because SO has an answer for jetty version 7 but i have the same doubts about the technique used as mentioned in the comments on that thread
Previously I did an web application in spring MVC on Apache Tomcat 5 and i wanted to migrate it to Apache Tomcat 7 now . May I know the steps for the migration.
Can anyone help me out ?
It should be straight forward. Please keep the following points in mind before you migrate.
Apache Tomcat 7 requires Java 6 or later.
Apache Tomcat 7 supports Java Servlet 3.0, Java Server Pages 2.2,
Expression Language 2.2 and WebSocket 1.1
In JSP pages that use wildcard import syntax the new classes added in Servlet API may conflict with ones in web applications. For example, if package "a" contains class Part, the following JSP page will cease to compile in Tomcat 7:
<%#page import="a.*"%>
<% Part page = new Part(); %>
That happens because implicit import of javax.servlet.http.* and explicit import of a.* will provide conflicting definitions of class Part that was added in Servlet 3.0. The solution is to use explicit import, import="a.Part".
All configuration options that use regular expression now require a
single regular expression (using java.util.regex) rather than a list
of comma-separated or semi-colon-separated expressions.
Please refer here for more information about migrating to Tomcat 7
If you have a .war file of your project, then its too easy to deploy application on Tomcat 7. You need to just open you apache tomcat 7 admin console and deploy .war file and it should work fine.
OpenShift offers the possibility to develop Spring based applications using JBoss EAP6. I am considering migrating a Spring application developed/deployed on Tomcat 7.
I have little experience with JBoss. Am I going to go through many troubles if I migrate my application? If yes which? Are Tomcat 7 and JBoss EAP6 compatible?
It depends entirely on your application.
The servlet container in JBoss 6 is based on Tomcat 6. If you are using any new features in Tomcat 7 (e.g. extensions in the Servlet 3.0 or JSP 2.2 spec), these will not run on JBoss 6.
The general response will be yes, JBoss will provide all the standard elments Tomcat does. But it is always possible to make it not compatible (using directly some tomcat class, JBoss Web use a different name space and there is no 1:1 corespondances).
I most cases you will need to make some litle addaptation (add some configuraiton and properties, change datasource name...).
JBoss AS7 documentation contains some Spring integration elements.
Some elments provided by default in JBoss may give you some trouble (like JPA), but if you have full controle on the application source, you should be able to get it working without lot of efforts.
Without inside on your application it will be difficult to give concreate effort estimate.
Hi all i am developing a web app and deploy that in tomcat 7.0 and when i try to run the same thing in tomcat 5. i get the following exception while deploying itself.
Tomcat version 5.5 only supports J2EE 1.2, 1.3, and 1.4 Web modules
i think these cost the problem but not sure
import javax.servlet.annotation.MultipartConfig;
import javax.servlet.annotation.WebServlet;
#WebServlet(urlPatterns = "/ReadEmployeeAttendance")
#MultipartConfig
how to solve this?
You can't do this. You need container with support for Servlet 3.0 spec, and if you want Tomcat that is only Tomcat 7. If you want your app to run in Tomcat 5.5, you cannot use Servlet 3.0 features (e.g. annotations, also your web.xml must have version="2.4" or earlier).
Yes you are correct that Tomcat 5.5 doesn't support Java EE 5 and above, you will have to upgrade to latest tomcat if you want servlet 3.
Every web server or application server implements specification provided by JCP, hence not all version of your server can run every version of specification, though on a general note they are backward compatible, meaning on Tomcat 7 you can run J2EE 1.4 but on tomcat 5.5 you cannot run Java EE5.
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.