java-ee-7

javax.faces.INTERPRET_EMPTY_STRING_SUBMITTED_VALUES_AS_NULL does not work anymore since Java EE 7 / EL 3.0

喜你入骨 提交于 2019-11-27 05:07:12
<context-param> <param-name>javax.faces.INTERPRET_EMPTY_STRING_SUBMITTED_VALUES_AS_NULL</param-name> <param-value>true</param-value> </context-param> Does not work with the latest Mojarra 2.2.5 on both glassfish 4 and wildfly 8 Final I have seen multiple bug reports on this, Manfried Riem says , It was determined this is an EL issue and the EL implementation has been fixed to fix this The fix versions says 2.2.5, and it is also stated in the release notes of 2.2.5, am I missing something? Fixed with a custom resolver: faces-config.xml: <application> <el-resolver>my.package

Required jars for RestEasy Client

混江龙づ霸主 提交于 2019-11-26 21:41:03
问题 I need to provide a java REST client, which should contain all required jars in one bundle. I chose RestEasy as REST framwork, since the server application is done on a JBoss. Nearly all examples I found so far use either an application container environment, where those libs are provided and thus only the Java EE API is needed during compile or are build with Maven and thus dependencies are resolved automatically, which maybe be a good idea and the current standard way to do it, but for

Which XML namespace to use with JSF 2.2 and up

醉酒当歌 提交于 2019-11-26 19:05:40
I have migrated my application from JSF 1.2 to 2.2. It used XML namespaces on java.sun.com domain like xmlns:f="http://java.sun.com/jsf/core" . However, Oracle's Java EE 7 tutorial is using XML namespaces on xmlns.jcp.org domain like xmlns:f="http://xmlns.jcp.org/jsf/core" . Which one is recommended and why was this changed? BalusC Which one is recommended? Go ahead with XML namespaces on xmlns.jcp.org domain. This was newly introduced since Java EE 7 in 2013 (which covers a.o. JSF 2.2, Servlet 3.1, CDI 1.1, etc). Do note that this not only affects Facelets files, but also XML configuration

Notify only specific user(s) through WebSockets, when something is modified in the database

守給你的承諾、 提交于 2019-11-26 14:17:02
问题 In order to notify all users through WebSockets, when something is modified in selected JPA entities, I use the following basic approach. @ServerEndpoint("/Push") public class Push { private static final Set<Session> sessions = new LinkedHashSet<Session>(); @OnOpen public void onOpen(Session session) { sessions.add(session); } @OnClose public void onClose(Session session) { sessions.remove(session); } private static JsonObject createJsonMessage(String message) { return JsonProvider.provider()

How to enable Cross domain requests on JAX-RS web services?

牧云@^-^@ 提交于 2019-11-26 11:10:35
I developed a set of restful web services. I couldn't call any of these methods from remote clients due to the error No 'Access-Control-Allow-Origin' header is present on the requested resource. The services work perfectly on localhost. Is there any changes or configs to do on the server side to resolve the issue. i.e. to enable cross domain requests. I'm using WildFly 8, JavaEE 7 I was wondering the same thing, so after a bit of research I found that the easiest way was simply to use a JAX-RS ContainerResponseFilter to add the relevant CORS headers. This way you don't need to replace the

Accessing HttpSession from HttpServletRequest in a Web Socket @ServerEndpoint

心已入冬 提交于 2019-11-26 10:16:24
Is it possible to get the HttpServletRequest inside a @ServerEndpoint? Primarily I am trying to get it so I can access the HttpSession object. Update (November 2016) : The information provided in this answer is for the JSR356 spec, individual implementations of the spec may vary outside of this information. Other suggestions found in comments and other answers are all implementation specific behaviors outside of the JSR356 spec. If the suggestions in here are causing you problems, upgrade your various installations of Jetty, Tomcat, Wildfly, or Glassfish/Tyrus. All current versions of those

Which XML namespace to use with JSF 2.2 and up

孤者浪人 提交于 2019-11-26 05:38:14
问题 I have migrated my application from JSF 1.2 to 2.2. It used XML namespaces on java.sun.com domain like xmlns:f=\"http://java.sun.com/jsf/core\" . However, Oracle\'s Java EE 7 tutorial is using XML namespaces on xmlns.jcp.org domain like xmlns:f=\"http://xmlns.jcp.org/jsf/core\" . Which one is recommended and why was this changed? 回答1: Which one is recommended? Go ahead with XML namespaces on xmlns.jcp.org domain. This was newly introduced since Java EE 7 in 2013 (which covers a.o. JSF 2.2,

How to enable Cross domain requests on JAX-RS web services?

让人想犯罪 __ 提交于 2019-11-26 03:27:43
问题 I developed a set of restful web services. I couldn\'t call any of these methods from remote clients due to the error No \'Access-Control-Allow-Origin\' header is present on the requested resource. The services work perfectly on localhost. Is there any changes or configs to do on the server side to resolve the issue. i.e. to enable cross domain requests. I\'m using WildFly 8, JavaEE 7 回答1: I was wondering the same thing, so after a bit of research I found that the easiest way was simply to

Accessing HttpSession from HttpServletRequest in a Web Socket @ServerEndpoint

限于喜欢 提交于 2019-11-26 02:06:35
问题 Is it possible to get the HttpServletRequest inside a @ServerEndpoint? Primarily I am trying to get it so I can access the HttpSession object. 回答1: Update (November 2016) : The information provided in this answer is for the JSR356 spec, individual implementations of the spec may vary outside of this information. Other suggestions found in comments and other answers are all implementation specific behaviors outside of the JSR356 spec. If the suggestions in here are causing you problems,

Real time updates from database using JSF/Java EE

落爺英雄遲暮 提交于 2019-11-26 00:47:57
问题 I have one application running in the following environment. GlassFish Server 4.0 JSF 2.2.8-02 PrimeFaces 5.1 final PrimeFaces Extension 2.1.0 OmniFaces 1.8.1 EclipseLink 2.5.2 having JPA 2.1 MySQL 5.6.11 JDK-7u11 There are several public pages which are lazily loaded from the database. A few CSS menus are displayed on the header of the template page like displaying category/subcategory-wise featured, top seller, new arrival etc products. The CSS menus are populated dynamically from the