aspose file tools*
The moose likes JSF and the fly likes WEIRD...What is the Servelt spec and JSP spec for JSF1.2 and 1.1? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSF
Bookmark "WEIRD...What is the Servelt spec and JSP spec for JSF1.2 and 1.1?" Watch "WEIRD...What is the Servelt spec and JSP spec for JSF1.2 and 1.1?" New topic
Author

WEIRD...What is the Servelt spec and JSP spec for JSF1.2 and 1.1?

Ziyang Zhang
Ranch Hand

Joined: Jul 17, 2010
Posts: 47
1. I searched out that JSF 1.2 requires servler 2.5 and jsp 2.1. If I run JSF1.2 on a server which does not support the specs, what will happen?

2. I am currently working on a legacy project of my company. The JSF project ueses JSF1.2 Library. But the JBoss server the project runs on is JBoss4.0.2(with Tomcat 5.5.9 inside, Tomecat5.5.9 supports Servlet Spec 2.4 and jsp2.0. http://community.jboss.org/wiki/VersionOfTomcatInJBossAS). But it seems that the projects runs well.......WHY???

3. I also tried to use JSF2.0 jars instead of JSF1.2 ones which are currently using. And it also works!!! Could somebody tell me why???

4. I searched out that JSF1.1 works with servlet2.3 and jsp1.2. If I still use the current JBOSS4.0.2, does that mean I can only use JSF1.1?

5. Here is a piece of web.xml of the project. Does 2.5 means the servlet spec version? In the project, it is 2.5, but I don't think the jboss server we use support 2.5...But the application runs well...
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns="http://java.sun.com/xml/ns/javaee"

xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"

xsi:schemaLocation="http://java.sun.com/xml/ns/javaee

http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"

version="2.5">


Thank you very much for your answer. This is really confusing and drives me nuts....


Enjoy life!
Greg Charles
Sheriff

Joined: Oct 01, 2001
Posts: 2850
    
  11

Generally speaking, you should always try to get the versions of dependencies called out in the specifications, although newer versions should almost always be OK too. The culture of the Java world seems to favor keeping things backward compatible, though of course not forward.

That said, you're interested why your application is working despite the fact that it violates this guideline. There are a several possibilities. One is that the versions of JSP and Servlets called out by JSF 1.2 are just the versions they tested with, and there isn't any direct use of the new features added to Servlet 2.5 or JSP 2.1. Another possibility is that your application just isn't using the part of JSF that would make use of those new features. That means enhancing your application in ways legal to JSF 1.2 could cause an epic failure that will be hard to track down. Finally, and scariest, you might just have not hit the button that exercises the function that's using the new features of JSP or Servlet. That means that your application has one or more time bombs in it just waiting to blow up an unsuspecting user. My advice: modernize your dependencies ASAP.

By the way, I think JSF 2.0 has fewer dependencies on JSP than JSF 1.2 did, since you would typically write Facelets instead of JSPs as the presentation layer.
leo donahue
Ranch Hand

Joined: Apr 17, 2003
Posts: 327
I searched out that JSF 1.2 requires servler 2.5 and jsp 2.1. If I run JSF1.2 on a server which does not support the specs, what will happen?
Imagine the worst possible natural disaster ever recorded, or not recorded. It would be something like that.

Or, possibly, your computer will melt, burning a whole through the ground, all the way to the point at which whatever parts of your computer are left unmelted will melt due to the immense pressure, causing continental drift.

It's a very bad thing. Don't do it.

Enjoying life.


Thanks, leo
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: WEIRD...What is the Servelt spec and JSP spec for JSF1.2 and 1.1?