Is it possible to deploy a military file on any server?

Please forgive me if this question is stupid. Suppose I developed a J2EE web application using Spring infrastructure and MS SQL-Server database using WebSphere application server. Later I create a WAR file for this application.

Can I deploy this WAR file on a Tomcat server without any code changes? Or my question is, can this be hosted on a web hosting service that only provides Tomcat servers? If so, are there any changes to the code?

If it cannot be deployed, can you suggest me what to do, because I have not developed any application on the tomcat server. All the applications that I developed were on the Websphere application server using RAD.

+6
java tomcat deployment websphere
source share
1 answer

In principle, WAR files should be portable on Java EE servers. In practice, I would not expect many portability problems, but it really depends on the details of your application and how closely you adhere to Java EE standards. In addition, simply deploying your application in a different environment (your development machine versus the hosting environment) may cause a crash, not so much to WAS v Tomcat as to this environment v in this environment.

Possible problems, in decreasing order of probability:

one). You are targeting the same versions of standards.

2). You used any special WebSphere extensions other than the Java EE specifications. Most sellers have some additional goodies, you used them.

3). You have a hard-coded resource (file, directory, printer, database) that you access in different ways on your target platform.

4). Have you encountered spec ambiguity? Is there any angular case where the behavior of WAS is different from the behavior of Tomcat.

5). You depend on the fact that WAS or your platform is really fast and your platform does not do it.

My general rule for portability: Always test the early stages of your range of intended deployment platforms. There are almost always there. If you find out early, you can fix it with a little pain.

+4
source share

All Articles