glassfish

JSF how upgrade to Mojarra 2.1.21 in Netbeans7.1 (just sub jsf-api.jar and jsf-impl.jar fails)

﹥>﹥吖頭↗ 提交于 2019-12-18 05:22:39
问题 I want to upgrade from JSF implementation Mojarra 2.1.3 in Netbeans7.1 (Glassfish 3.1.1). You might ask first why I don't just upgrade to Netbeans7.3, and the reasons include that it it runs Glassfish 3.1.2.2 and that I have some other 3rd party software in my web application that is not yet compatible with Glassfish higher than 3.1.1, and besides it only has Mojarra 2.1.6 anyway. I used to be able to upgrade Mojarra by simply replacing jsf-api.jar and jsf-impl.jar under /glassfish/modules,

JSF how upgrade to Mojarra 2.1.21 in Netbeans7.1 (just sub jsf-api.jar and jsf-impl.jar fails)

╄→尐↘猪︶ㄣ 提交于 2019-12-18 05:22:07
问题 I want to upgrade from JSF implementation Mojarra 2.1.3 in Netbeans7.1 (Glassfish 3.1.1). You might ask first why I don't just upgrade to Netbeans7.3, and the reasons include that it it runs Glassfish 3.1.2.2 and that I have some other 3rd party software in my web application that is not yet compatible with Glassfish higher than 3.1.1, and besides it only has Mojarra 2.1.6 anyway. I used to be able to upgrade Mojarra by simply replacing jsf-api.jar and jsf-impl.jar under /glassfish/modules,

How to do Distributed Transactions XA in Spring and GlassFish 5?

匆匆过客 提交于 2019-12-18 05:02:35
问题 I am trying to create a transaction comprising two REST web services, whose data source point to the same data base. The first service, named 1 , invokes another web service named 2 using Spring RestTemplate. To implement the transaction I am using a JNDI connection pool, the MySql JDBC driver (version 5.1.35), JTA, XA, Spring and the GlassFish 5 AppServer. Now, I have downloaded the maven dependencies in the Spring project, defined a configuration class using JtaTransactionManager , and

How to do Distributed Transactions XA in Spring and GlassFish 5?

不想你离开。 提交于 2019-12-18 05:02:06
问题 I am trying to create a transaction comprising two REST web services, whose data source point to the same data base. The first service, named 1 , invokes another web service named 2 using Spring RestTemplate. To implement the transaction I am using a JNDI connection pool, the MySql JDBC driver (version 5.1.35), JTA, XA, Spring and the GlassFish 5 AppServer. Now, I have downloaded the maven dependencies in the Spring project, defined a configuration class using JtaTransactionManager , and

A message body writer for Java class … and MIME media type text/html was not found [duplicate]

别等时光非礼了梦想. 提交于 2019-12-18 04:38:14
问题 This question already has answers here : How to produce JSON output with Jersey 1.6 using JAXB (6 answers) Closed 6 years ago . I am using the jms/atmosphere framework to make communication between two applications. One of the applications is a message producer for a topic, sending custom objects of the following type: @XmlRootElement public class A implements Serializable{ public A(){} /* some private properties */ } On the other side more than one consumers are listening on the topic and

Set HTTP headers properly to force caching on JS, CSS and PNG files

偶尔善良 提交于 2019-12-18 03:44:18
问题 How can I tell to GlassFish server, to store all JS, CSS and PNG files into browser cache in order to reduce HTTP GET requests? I am using JSF and PrimeFaces. 回答1: Just make use of JSF builtin resource handler. I.e. use <h:outputStylesheet name>, <h:outputScript name> and <h:graphicImage name> with files in /resources folder instead of "plain vanilla" <link rel="stylesheet"> , <script> and <img> . <h:outputStylesheet name="css/style.css" /> <h:outputScript name="js/script.js" /> <h

Custom Glassfish Security Realm does not work (unable to find LoginModule)

本秂侑毒 提交于 2019-12-18 03:38:25
问题 I'm trying to get a Custom Security Realm in Glassfish working (i tried 3.0.1 final and 3.1 B33). I read nearly all tutorials about this, but it doesn't not work on my System. I'm getting the error Login failed: javax.security.auth.login.LoginException: unable to find LoginModule class: com.company.security.realm.CustomLoginModule when trying to login. Here is what i did: I created a little Maven project, which contains the needed Realm class, CustomRealm, and the corresponding LoginModule,

sharing session in web applications

一笑奈何 提交于 2019-12-18 02:57:30
问题 I am developing A Web Application using JSP & Servlets (Container: Tomcat7 , Database: Oracle10 ) I have developed some web applications like Profile , Reports , Leads . Then I have developed A Login application. In this application I am storing USERID in Session with some more session attributes. After user logs in he will be shown menu which contains links to other Applications like links to Profile Application. So when I access Session after user log in: If I try to access session withing

Where is the p:fileUpload uploaded file saved and how do I change it?

人走茶凉 提交于 2019-12-18 02:48:30
问题 I use the simple File upload of Primefaces in development with Netbeans. My test example is similar to to the Primefaces manual. My question: where does the file get uploaded on my local computer? How can I change the path for it? Thx! The jsf file: <?xml version='1.0' encoding='UTF-8' ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xmlns:h="http://java.sun.com/jsf/html"

Stateless session bean with instance variables

倖福魔咒の 提交于 2019-12-17 22:41:23
问题 I have a stateless session bean that contains one public method, several private methods, and some instance level variables. Below is a pseudo code example. private int instanceLevelVar public void methodA(int x) { this.instanceLevelVar = x; methodB(); } private void methodB() { System.out.println(instanceLevelVar); } What I'm seeing is that methodB is printing values that weren't passed into MethodA. As best I can tell it's printing values from other instances of the same bean. What would