This question already has answers here:
What is the difference between Tomcat, JBoss and Glassfish?
(8 answers)
Closed 8 years ago.
I would like to start using JEE6 in the next project that I have to work on at my job, but there is also a limitation (sort of): Tomcat 5.5
My question is, what improvements would bring GlassFish to the table (security/speed) vs the existing Tomcat(5.5) or an upgrade to the newer version 7?
Q: My question is, what improvements would bring GlassFish to the table
(security/speed) vs the existing Tomcat(5.5) or an upgrade to the
newer version 7?
Tomcat 7 compared to Tomcat 5.5 supports newer version of JSR specifications. Therefore, if you wish to use for example Servlet 3.0 or Websockets, you don't have other choice but to upgrade the Tomcat version. See this link for the full list of Tomcat versions and supported specifications.
However, Tomcat is not Java EE container, but only a servlet container. In other words, if you plan to use full Java EE (which includes security and many other things), you have to switch from Tomcat to some of full Java EE application servers. Glassfish is one of them, others are TomEE (similar to Tomcat, so perhaps a good starting point), WildFly, IBM Websphere, Oracle Weblogic etc. Unfortunately, Oracle recently decided to abandon commercial support for Glassfish, so maybe it would be wise choice to go with some other application server if you would like to use it commercially.
One way or another, move from Tomcat 5.5 because it is a quite old version of Tomcat.
See also:
Java EE containers vs Web containers
Oracle abandons commercial support for Glassfish JEE Server
Related
I am having a problem with Netbeans and when I tried to create a Java Web by following their instructions:
Choose File | New Project.
Under Categories, select Java Web.
Under Projects, select Web Application.
Click Next. Web Server-- Apache Tomcat 7.0.42
but Java EE version-is only EE6 and EE5. Why does it not Show EE7??
should i need to install any plugin?
I have the follwong installed:
JDK 1.7_upadte_42
Netbeans 7.3.1
Apache Tomcat 7.0.42
Tomcat is not a Java EE compliant application server to begin with, it is a servlet container1. It is clearly stated in the official site:
Apache Tomcat™ is an open source software implementation of the Java Servlet, JavaServer Pages, Java Expression Language and Java WebSocket technologies.
In order to use Java EE 7+ capabilities, you need to use a Java EE 7+ compliant server. Currently, AFAIK this is done by GlassFish 4 only. When you visit the official site, it is stated in the top: World's first Java EE 7 Application Server. Make sure you configure your project to use GlassFish 4 and then you may use Java EE 7 benefits for your applications.
Note that this is also covered in Netbeans 7.3.1 community news:
NetBeans IDE 7.3.1 is an update to NetBeans IDE 7.3 and includes the following highlights (emphasys mine):
Support for Java EE 7 development
Deployment to GlassFish 4 (not Tomcat)
Support for major Java EE 7 specifications: JSF 2.2, JPA 2.1, JAX-RS 2.0, WebSocket 1.0 and more
1 At least not until Tomcat 7. Looks like from Tomcat 8 it will support Java EE 7 profile (from the official site linked above):
The Apache Tomcat Project is proud to announce the next release candidate for Apache Tomcat 8 - 8.0.0-RC5 (alpha). Tomcat 8 is aligned with Java EE 7.
Short Answer: You need to use Tomcat 8+ for Java EE 7 web projects. Additionally (as mentioned), you may need to use a later version of NetBeans (7.4+) for full support.
Long Answer:
I'm a little late answering here, but I'm posting an answer for the record in case others see this question and to clear up misconceptions. Contrary to the prevailing belief, you can deploy Java EE apps to Tomcat.
There are two Java EE profiles relevant here: the "Full" profile (which includes the full Java EE stack) and the "Web" profile (a subset of the full profile which is designed to be implemented more easily by servlet containers). As mentioned, if you must use functionality only available in the full Java EE 7 profile you will need to deploy to an app server such as Glassfish 4+, [Jboss] Wildfly 8.1+, or JEUS 8.
However, Tomcat does comply with the Java EE Web profile, so you can deploy Java EE apps to it so long as you stick to just the functionality provided by the Web profile.* Often (if not usually) the web profile is all you need. The web project mentioned by the asker only uses stuff from the web profile. Tomcat 7 complies with the Java EE 6 Web profile and Tomcat 8 complies with the Java EE 7 Web profile, so the OP just needs to upgrade to Tomcat 8 if he wants to use EE 7.
* Oracle makes it easy to stick to one profile or another by distributing specific API jars for each profile ("javaee-api" for the full profile, "javaee-web-api" for the web profile, etc). That's the only dependency you need** to create Java EE apps, and you don't even have to (and shouldn't) bundle it in your WAR. In reality you may need to bundle (but not compile against) some libraries a la carte--or use the TomEE variant of Tomcat--to use all EE 7 web features.
** If you see gobbledygook about "endorsed dirs" and "endorsed APIs" in your build files, that's not a real dependency and is just to ensure that your code compiles against the correct class versions. For example, the standard (non-EE) Java 7 runtime already includes a version of JPA, but Java EE 7 includes a different version so the compiler needs to know which version to use. Don't take out that gobbledygook or you could (but probably won't) have runtime "class version incorrect" issues.
At the moment, Java EE 7 is only partially supported by Netbeans 7.3.1. They will support it in NB 8.0. Also, you need Tomcat 8 for Java EE 7, but their support is still partial too. Glassfish 4.0 is the way for now.
Here are some useful docs:
http://wiki.netbeans.org/JavaEE7
http://tomcat.apache.org/whichversion.html
http://docs.oracle.com/javaee/7/tutorial/doc/
I have been working on stress testing a Java web application (JSP+Tomcat6+Struts2+Hibernate+mysql) and well the results I was getting wasn't something to brag about! So I upgraded the tomcat version to 7, and wow! the requests/sec I got was 5 times better than before.
So enlighten me, is there this much difference between tomcat6 and tomcat7's performance? or there is something wrong with my configuration and stuff?
The Tomcat "Which Version" page includes a high level overview of the differences between different Tomcat versions. The section for Tomcat 7.x does not claim massive performance increases for Tomcat 7.x versus Tomcat 6.x. A Google search didn't offer any clear evidence either.
I'd be inclined to think that a 5-fold throughput improvement is either:
a Java / Tomcat configuration and/or tuning issue,
something a bit unusual about your web application, or
an unidentified artefact of the way you are doing your performance measurements.
What is the difference between Tomcat 7.0 and Tomcat 6.0?
Tomcat 7.0 has improved the security over Tomcat 6.0 due to several security code fixes and additions (such as CSRF prevention filter).
Tomcat 7.0 includes Servlet 3.0 API, which it self is an improved version over its previous version (used by Tomcat 6.0).
So, 3rd party applications that need Servlet 3 containers are supported by Tomcat 7.0.
Configurability is better in Tomcat 7.0, which includes new container components (e.g. ExpiresFilter and AddDefaultCharsetFilter) that allow better handling of problems previously left to the web applications to resolve.
Tomcat 7.0 supports Java 6 or further version, while Tomcat 6.0 supports Java 5 or further version.
Finally, Tomcat 7.0 includes cleaner and modernized code that uses generics in the required places.
I am using Jboss 2.4.11, if i upgrade JDK from 1.4 to 6 How is the jboss server going to handle the application?. What are the common things i should start investigating while i am in the process of the upgrade. I am looking at the Oracle's documentation and other posts in stackoverflow related to jdk 6 backwards compatibility with v1.4. My question is more specific towards using Jboss server. Also the application uses ejb 1.1
I'd recomment to move from one consistent system to another one. Even JBoss 4 needs a special version for JDK1.6. Java 5 brought MBeans rigth into the VM and older versions of JBoss used MBeans for configuration. As there must not be to MBean servers within a single VM this was a big issue, when migrated to java5. As EJB 1.1 is still supported I'd recomment to move at least to JBoss 4.2 as this is still kind of similar to older versions, while JBoss 7 is totally different.
The only thing that will really help you to get the migration a little bit smother are tests. At least quite a number of integration tests.
I have Java 6 SE, Tomcat 6, Eclipse Helios for J2EE, Chrome Browser Dev for JS up and working. Sometimes I need the source and doc for java libraries I believe are in the EE kit. What is the best way to get the source and doc and be able to use it in my dev environment without messing it up?
Is this as simple as running the Java 6 EE install package on Vista 64bit?
If I have the download, is there a way to extract the files and manually place them?
This question is confusing. You mention Java EE 6 in the title and then Tomcat 6 in the body but Tomcat 6 doesn't implement any of the standards from Java EE 6. Sure, you can run some parts of the Java EE 6 specification on it like JSF 2.0, CDI, JPA 2.0. But still, Tomcat 6 only implements Servlet 2.5 and JSP 2.1 and has thus little to do with Java EE 6 (and Tomcat 7 also only implements Servlet 3.0, not the Java EE 6 Web profile, and they don't plan to implement it).
I'm not suggesting to move away from Tomcat if it suits your needs, I'm just clarifying that neither Tomcat 7 nor Tomcat 6 do provide a Java EE 6 (Web Profile) implementation.
If Tomcat 6 appears to be what you're looking for, you can download a "Source Code" distribution from their website (go to the bottom of the page) and attach the sources in Eclipse, as suggested by BalusC.
If you really want to "move to Java EE 6", you'll need a Java EE 6 server (either supporting the full Java EE 6 specification or only the Web Profile) like GlassFish 3.0.1, GlassFish 3.0.1 Web Profile, JBoss 6.0, Resin 4.0 (Web Profile implementation). They all provide sources of their implementation. If you go this way, let me know and I'll add more details if necessary.
The Java EE is an abstract API. The application server is the concrete implementation. The Java EE 6 kit provided by Sun Oracle contains basically the Glassfish server. But you already have Tomcat as server. Just get its source from http://tomcat.apache.org. You need to ensure that the source version matches the Tomcat version. If you're using an older version than currently latest 6.0.29, then you need to get it from the archive. It's in the /src folder of the version folder. You can download it as zip, put it somewhere on your disk (I myself put it directly in Tomcat installation folder). Finally have Eclipse point to the zip file whenever you want to view the source for the first time (e.g. HttpServlet and so on).
Noted should be that Tomcat 6 only implements Servlet 2.5 / JSP 2.1 which are part of Java EE 5, not 6. But it may be more than sufficient for your needs. For the remnant of the detail see #Pascal's answer.
What is the best Java EE server to deploy coldfusion 9 on? I know there is Tomcat but i'm sure there are others.
The ColdFusion support matrix lists a limited number of Java EE servers that they support:
WebLogic Server 9.2, 10.3
WebSphere Application Server ND 6.1, ND 7
JRun Updater 7
JBoss 4.2, 5.01
Your choice from this list is going to be dictated by commercial realities, not technical ones - WebLogic and Websphere are the leading servers, but commercial (and expensive); JBoss is free (although you can pay for a support contract); JRun is just rubbish, and I suspect only supported because if I remember correctly, JRun and ColdFusion used to be the same platform.
Having said all that, CF may run just fine on any other appserver, but that would be unsupported.
You need to answer two or three questions to decide:
Do you know enough about it to not
want to just use JRun?
Which Java EE servers do you know well
enough to support (or know the best)?
Which of those are on the supported
servers list?
If you can deploy Cold Fusion on any Java EE app server, there are lots to choose from:
WebLogic
JBOSS
Glassfish
Jetty
WebSphere
Pick the one that fits your budget.
I've listed these in my order of preference. I think WebLogic is still the best Java EE app server out there. Let's hope Oracle doesn't kill it.
I built a ColdFusion 6.1 application for a national 401k provider deployed on JBoss and it worked very well. Actually, I was able to run CF 6 on a 64-bit JVM because I was no longer hindered by JRun.