seam

How do I send JSon as BODY In a POST request to server from an Android application?

最后都变了- 提交于 2019-11-28 03:10:04
问题 I am working on my first Android Application. What I am trying to do is a POST request to a REST service I want the BODY of this request to be a JSON String. I am using google's GSON to generate the JSON that is sent to the server. Here is the code doing POST request: HttpPost requisicao = new HttpPost(); requisicao.setURI(new URI(uri)); requisicao.setHeader("User-Agent", sUserAgent); requisicao.setHeader("Content-type", "application/json"); HttpResponse resposta = null; //I can see the json

How to use regular expressions with Hibernate/Oracle

寵の児 提交于 2019-11-28 01:45:09
问题 I'm trying to implement a web service which accepts a list of strings, each of which is a regular expression. These need to be compared against six columns of a database, and any rows which match need to be returned. I believe Oracle has a regexp_like() function which I might be able to use, but I'm looking for the best way to do this using Hibernate, so I'm not working against the persistence engine. I started with something like this, in which the participants collection contains the

Faces Servlet threw exception java.lang.StackOverflowError

夙愿已清 提交于 2019-11-28 00:56:31
问题 Ok, I've run across my first StackOverflowError since joining this site, I figured this is a must post :-). My environment is Seam 2.0.1.GA, JBoss 4.2.2.GA and I'm using JSF. I am in the process of converting from a facelets view to JSP to take advantage of some existing JSP tags used on our existing site. I changed the faces-config.xml and the web.xml configuration files and started to receive the following error when trying to render a jsp page. Anyone have any thoughts? 2008-09-17 09:45:17

Use message bundle in Java class with Seam

て烟熏妆下的殇ゞ 提交于 2019-11-27 22:41:42
问题 I want to use my message bundle (messages_fr.properties) in a Java class with seam. In a jsf file, all work fine like this: <h2>#{msg.newCustomer}</h2> But in my Java class, I tried to do this: statusMessages.addToControlFromResourceBundle("refArbor", "#{messages['error_refArborDoesntExist']}"); or this: statusMessages.addToControlFromResourceBundle("refArbor", "error_refArborDoesntExist"); or again this: statusMessages.addToControlFromResourceBundle("refArbor", "#{msg.error

Seam 2.2 App on JBoss 7.1?

让人想犯罪 __ 提交于 2019-11-27 22:40:56
问题 We have deployed our JBoss Seam 2.2 application on JBoss 5.1 with PostgreSQL as the database. It makes use of EJBs, JPA (Hibernate), JSF (Richfaces and Primefaces), Servlets, and JMS queues and topics. Recently, we've decided to migrate the platform to JBoss 7.1 to take advantage of its lower overhead, as well as to keep in step with changes in technology. Is it possible to run Seam 2.2 applications on JBoss 7.1? I realize the Hibernate/JPA version is different, and I'm assuming the JSF

What is the best method to GZIP a JSF-Seam web app pages

我怕爱的太早我们不能终老 提交于 2019-11-27 22:37:54
I'm developing an JSF web app on Tomcat, planning to use Seam in the near future, and I want to add compression of our web pages and resources (i.e. Javascript & CSS files). I'm aware of three methods to GZIP responses in a Java web : Use Ehcache GZIP filter: it's used in Appfuse, so it's probably solid and it checks if the user agent supports GZIP before applying it, but it seems to have problems with Seam, which we will be using http://seamframework.org/Community/EHCacheGZipFilterIncompatibleWithSeam . Use pjl-filter. From the stackoverflow question: Tomcat Compression Does Not Add a Content

Jboss Seam: Enabling Debug page on WebLogic 10.3.2 (11g)

|▌冷眼眸甩不掉的悲伤 提交于 2019-11-27 15:43:36
SKIP TO UPDATE 3 I want to enable the Seam debug page on Weblogic 10.3.2 (11g). So, I have done the following: I have the jboss-seam and jboss-seam-debug jars as dependency in both my ejb and web maven projects (both are modules of my superproject) I put this context parameter in my web.xml: <context-param> <param-name>org.jboss.seam.core.init.debug</param-name> <param-value>true</param-value> </context-param> Now, when I hit the URL of my application, I get the debug page with this exception (full stacktrace at the end of the post): Caused by java.lang.IllegalStateException with message: "No

java library for reading RSS and ATOM feeds [duplicate]

偶尔善良 提交于 2019-11-27 14:24:34
问题 This question already has an answer here : How to write an RSS feed with Java? (1 answer) Closed 4 years ago . I am looking for libraries which can read RSS / ATOM feeds in my J2EE application (based on JBoss Seam). Is Rome the only application there for reading feeds? I am assuming the Seam RSS integration is only for generating RSS feeds and not for reading feeds. 回答1: Have you had a look into the following list? http://java-source.net/open-source/rss-rdf-tools Even though it has been

Force refresh of collection JPA entityManager

一曲冷凌霜 提交于 2019-11-27 13:57:26
I am using SEAM with JPA (implemented as a Seam Managed Persistance Context), in my backing bean I load a collection of entities (ArrayList) into the backing bean. If a different user modifies one of the entities in a different session I want these changes to be propagated to the collection in my session, I have a method refreshList() and have tried the following... @Override public List<ItemStatus> refreshList(){ itemList = itemStatusDAO.getCurrentStatus(); } With the following query @SuppressWarnings("unchecked") @Override public List<ItemStatus> getCurrentStatus(){ String s = "SELECT

How to externalize properties from JPAs persistence.xml?

依然范特西╮ 提交于 2019-11-27 12:14:47
问题 I would like to put some of the hibernate configuration in a property file to make it editable without build and deploy. I tried to solve my problem by following the instructions from Create JPA EntityManager without persistence.xml configuration file app.properties: hibernate.show_sql=true hibernate.dialect=org.hibernate.dialect.MySQLDialect hibernate.hbm2ddl.auto=validate hibernate.show_sql=true hibernate.format_sql=true hibernate.default_schema=myschema persistence.xml <?xml version="1.0"