JSF 2.2.6 ValueExpression API - jsf-2.2

Where i can find the ValueExpression API in JSF 2, javax impl?
Working in a PF project, the value expresoion type was depreciated as eclipse shows this;
javax.faces.el.ValueExpression is depreciated.
needed in this line;
ValueExpression ve = getValueExpression(name);

Where is javax.faces.el.ValueExpression coming from in your project? The Unified EL is not part of the JSF specification (I think it was introduced along with JSF 1.2 as part of the JSP spec).
The correct full qualified name of the class should be javax.el.ValueExpression. This class is available in any servlet container and unless you explicitly use it in your source code you don't have to add it to your project. If you add it, you should make sure the version matches the servlet version of the container you deploy it to (and do not deploy the jar unless you know what you are doing):
Java EE 5: EL API 1.0
Java EE 6: EL API 2.2
Java EE 7: EL API 3.0

Related

Omifaces #Push and Spring integration

I have an application with Spring 4.x and Primefaces 7. Now I need to introduce push functionality. Starting from Primefaces 7, push function was removed (in previous releases it was provided by atmosphere framework). Now in release notes of version 7, the developer team suggests using Omnifaces or JFS 2.3. I tried to integrate Omnifaces but, if I understand correctly, the #Push tag is interpreted by CDI only and ignored by Spring. I've all my beans and services managed with Spring. Is there a way to make #Push to works with Spring?
For JFS 2.3 I've the same problem.

Spring mvc compatibile with Servlet 2.5

I have developed some rest services with Spring mvc 3.0.9. In some case I have an exception. It depends that my spring version use Servlet 3.0 api (my application server is jboss eap 5.1). What is latest spring mvc version compatible with Servlet 2.5? Thanks.
Spring 3.2 should work with Servlet 2.5 API.
Only Spring 4.0 requires Serlvet 3.0:
refer this official documentation for more info.
3 New Features and Enhancements in Spring Framework 4.0)
3.4 Java EE 6 and 7
Java EE version 6 or above is now considered the baseline for Spring
Framework 4, with the JPA 2.0 and Servlet 3.0 specifications being of
particular relevance.
Spring 4.0 work with Servlet 2.5.
See document: (https://docs.spring.io/spring/docs/4.3.14.RELEASE/spring-framework-reference/htmlsingle/)
3.4 Java EE 6 and 7
Java EE version 6 or above is now considered the baseline for Spring
Framework 4, with the JPA 2.0 and Servlet 3.0 specifications being of
particular relevance. In order to remain compatible with Google App
Engine and older application servers, it is possible to deploy a
Spring 4 application into a Servlet 2.5 environment. However, Servlet
3.0+ is strongly recommended and a prerequisite in Spring’s test and mock packages for test setups in development environments.
3.7 General Web Improvements
Deployment to Servlet 2.5 servers remains an option, but Spring
Framework 4.0 is now focused primarily on Servlet 3.0+ environments.
If you are using the Spring MVC Test Framework you will need to ensure
that a Servlet 3.0 compatible JAR is in your test classpath.

What EL version should I use along with JSF 2.1.29-01?

When we were using JSF 1.2-09 we had the following dependency:
<dependency>
<groupId>el-impl</groupId>
<artifactId>el-impl</artifactId>
<version>1.0</version>
</dependency>
But now, we're updating to the JSF 2.1.29-01 and it's not clear what version I should use by now?
Judging by Maven repository information, JSF 2.1 depends on el-api 1.0.
The EL implementation as well as the el-api jar you are using is part of your application container distribution. As JSF 2.0/2.1 is part of the Java EE 6 technology stack which is implemented by Tomcat 7, you should link to that api spec.
To compile your sources you will need to reference the needed el-api 2.2 with <scope>provided</scope> in your pom so that your web archive will not contain any EL libraries and possible conflicts with container provided libraries are avoided.
The minimum requirements from the JSF Tag Info:
JSF 2.1 uses some Servlet 3.0 specific features, but is backwards
compatible with Servlet 2.5. Those Servlet 3.0 features are optional.
And if we take a look to the JSF 2.0 minimum requirements we can find that: EL 2.1 which goes hand in hand with Servlet 2.5
So the conclusion is that EL 2.1 is the recommended EL for JSF 2.1

JSP/servlet version in WAS 8?

Which version of JSP/servlet is in websphere 8? I use IBM RAD 8 with websphere 8 and wonder whether the JSP/servlet container supports method calls in EL which "the latest" servlet containers are supposed to do. Can it?
Thank you
WebSphere 8/8.5/8.5.5 has support for same Servlet ( 3.0 ), JSP ( 2.2 ) and JSF ( 2.0 ) versions. Only change is in JDBC version, which you may not that dependent.
Ref: https://en.wikipedia.org/wiki/IBM_WebSphere_Application_Server#Version_history
Side note: IBM start having internal ibm-web-bnd and ibm-web-ext files having extension xml instead of xmi since Servlet/WebApp version 2.5 declared in web.xml
Refer below chart.
According to Specifications and API documentation in the InfoCenter, WebSphere v8 supports JEE6, Java Servlet 3.0, and JSP 2.2.

How do I make JaxWsPortProxyFactoryBean use JAX-WS 2.1?

I'm working on a project that delivers web services using Jersey, which has a dependency on JAXB 2.1. I have to add a feature that fetches data from another web service. The way this has been implemented elsewhere uses a Spring JaxWsPortProxyFactoryBean.
When Spring tries to initialize this bean it fails with a : ClassCastException (com.sun.xml.bind.v2.runtime.JAXBContextImpl cannot be cast to com.sun.xml.bind.api.JAXBRIContext).
It appears that this is because JavaSE6 includes JAX-WS 2.0 API.
The only solution I have found suggests putting the 2.1 jars in the JRE endorsed directory. This isn't an option - I'm sharing a server with other application teams so I can't mess with the JRE.
Does anybody know of another way to make Spring use the 2.1 jars?

Resources