Dynamic Web Module option in Eclipse - eclipse

Could someone please explain the purpose of this option and what exactly it is for.
It looks like the default is on my eclipse installation is 3.0 but it wont run on a Tomcat 5.5 server and probably not Tomcat 6.0
Is it related to the servlet spec that the Tomcat server supports? If so which version do i need to use for Tomcat 5.5 and Tomcat 6.0?
And also, i think there is a link between the compiler version that i use and the web module version selected. Is there some kind of documentation that explains what this relationship is?
Edit
And also, why is it that if i select v2.4 web module, it defaults to JDK 1.4?
Thanks

That version correlates with Servlet API version. Servlet 3.0 (released at december 2009 as part of Java EE 6) runs on Servlet 3.0 containers only (Tomcat 7, Glassfish 3, JBoss AS 6, etc). Servlet 2.5 (released at 11 may 2006 as part of Java EE 5) runs on Servlet 2.5 containers only or newer (Tomcat 6, Glassfish 2, JBoss AS 5, etc). Servlet 2.4 (released at november 2003 as part of J2EE 1.4) runs on Servlet 2.4 containers only or newer, etcetera.
You just need to pick the right API version whatever you want to implement your webapp in. Or if you don't have the freedom in picking the servlet container used, then pick the API which suits the servlet container version the best.
As to why the JDK defaults to one or other, it's just the minimum JDK requirement of the Servlet API version in question. Often, when you're picking an older Servlet API, in reality the JRE/JDK used is also that old.

The below are the jdk requirement for servlet API.
Please find the compatibilty.
Servlet 4.0 Java EE 8
Servlet 3.1 Java EE 7
Servlet 3.0 Java EE 6, Java SE 6
Servlet 2.5 Java EE 5, Java SE 5
Servlet 2.4 J2EE 1.4, J2SE 1.3
Servlet 2.3 J2EE 1.3, J2SE 1.2
Servlet 2.2 J2EE 1.2, J2SE 1.2
I think this is helpful for you :)
Thanks

Related

How can I use JSF 2.3 with wildfly-swarm / thorntail?

What I have found out so far:
If one would use wildfly 12, it is possible to use JSF 2.3 by enabling ee8.preview.mode, since then you would have Java EE 8, which comes with JSF 2.3.
The currently newest release of wildfly-swarm (thorntail) 2018.5.0 uses wildfly 11, which comes with Java EE 7, and comes with JSF 2.2.13.
So my question is, how can I enable JSF 2.3 using wildfly-swarm/thorntail? Or if this is impossible, when will wildfly-swarm/thorntail be bundled with wildfly 12, so that it is also bundled with JSF 2.3?

Migration JBoss EAP 4.2 from java 1.5 to java 1.8?

right now my app use 4.2 jboss with java 1.5.
I manage to build my app (EJB, jsf, hibernate, seam) with java 1.8, but i get some problems with running jboss 4.2 with java 1.8.
So I wonder, whether it is even possible or it will be better to switch to another version of jboss(with will be also complicate)?
Thank you for clarification.
So another question appear, if I use new jboss and java8 , Am I need to change hibernate (eg. I use hibernate-ejb 3.3.2ga), jsf, etc. to newer version? Application was build with java 8 with success.
You can't run JBoss EAP 4.2 on Java 1.8 (Or any other java newer than 1.6)
Use new version of JBoss EAP instead. This will give you better performance some cool new features and server will be easier to monitor and maintain.
Here is the link

doesn't Jetty server support version 3.0 of the J2EE Web module specificaton?

I created a version 3.0 of J2ee web module with resin4, now I need to use jetty, so I installed eclipse plugin of jetty 6, but when I new server with it, eclipse point that The server does not support version 3.0 of the J2EE Web module specification, is there any way to fix it?
Jetty 6 is very old and was marked End of Life back in 2010.
Use Jetty 8 or Jetty 9 for Servlet 3.0 support.
http://www.eclipse.org/jetty/documentation/current/what-jetty-version.html

Seam in JBoss Application Server 7?

Which Seam framework version is supported in JBoss AS 7?
I am planning to use Seam2.2.2, is it compatible with Jboss AS 7?
Yes and no.
If you visualize yourself the timeline of Seam, the answer comes from alone:
Seam 2.x was created to ease development against Java EE 5 and to serve as an incubator for future standards, mainly Java EE 6 and JSF 2
Java EE 6 took the ideas from Seam 2 (and others) to specify CDI (and improve APIs like JSF)
Seam 3 brings new ideas to Java EE 6 and serves as an incubator for future standards, mainly Java EE 7 and JSF 2.x
Yes, Seam 2 is - more or less - compatible with JBoss AS 7. Why? Because Java EE 6 is downwards compatible with Java EE 5. But you will have to deal with some issues, like this and like that one. I just migrated a Seam 2.x application from JBoss AS 4 to JBoss AS 6, and it took me a good deal of a month.
No, don't use Seam 2 for a new project, not in 2011. CDI is so much more mature than Seam 2 bijection, JSF 2 is so much easier than JSF 1.2, that any kind of application development will simply be much more fun with Seam 3. And at the end, it's all about having fun at work, or?
I can tell about my experience : we recently migrated a seam 2.2.0 / jsf 1.2 / primefaces 1.1 / jpa 1.0 project on Jboss as 5.1 to seam 2.3.0 CR1 / jsf 2.1 / primefaces 3.4 / jpa 2.0 on Jboss as 7.1.
In fact the seam 2.3 branch was specifically developped to support jsf 2 and it "naturally" targets Jboss as 7.
Our application uses extensively the "Seam Application Framework" and the migration happened to be relatively straightforward, you can check this for instructions. In the other hand, as it already has been said above, for a new project there should be better alternatives.

What is the minimally required server to deploy JSF 2.0 project?

I can either install Tomcat or glassfish server in the production server inorder to deploy my JSF 2.0 project. Which from which versions of these servers are compatible with JSF 2.0? Please give suggestion.
I have developed with Mojarra 2.0.2, Facelets and PrimeFaces, Netbeans 6.8
In general you need at least a server that supports Servlet 2.5 or later for JSF 2.0 (found at coreservlets.com JSF 2.0 tutorial), e.g.:
Tomcat 6+
Glassfish 2.1+
Jetty 6+
Google App Engine
JBoss 5+
WebSphere 6+
WebLogic 9+
If not integrated, you then need jsf-api.jar and jsf-impl.jar for JSF 2.0
If you have a server that supports Java EE 6 (Glassfish 3, JBoss 6, WebLogic 11g) these jar's are already included.
JSF 2.0 uses version 2.5 of the servlet-api, which means it should be compatible with Tomcat version 6.0.x.
Sources:
http://javaserverfaces.java.net/nonav/rlnotes/2.0.0/releasenotes.html
http://tomcat.apache.org/whichversion.html