java-ee

how to Hide JSF URL after the application name?

不问归期 提交于 2019-12-21 02:34:37
问题 i have a jsf application and i want hide the url and keep just the name of application in URL while swiching between pages . thats the url that i have : > http://localhost:8080/PlanificationDrapageWeb/faces/admin/adminHome.xhtml > http://localhost:8080/PlanificationDrapageWeb/faces/cuisson/Home.xhtml and thats what i want always have : > http://localhost:8080/PlanificationDrapageWeb/ how can i get this result ?? 回答1: As MaVRoSCy said you can use Prettyfaces to rewrite your URLs. Their docs

Using a CommonJ implementation with GlassFish and Spring 3

左心房为你撑大大i 提交于 2019-12-21 02:03:27
问题 In my quest to unify deployment among Websphere 7 and GlassFish 3 environments, I decided to try implementing a CommonJ WorkManager and TimerManager in GlassFish. But it isn't quite working as expected. I have done the following: Use the myFOO CommonJ implementation found at: http://commonj.myfoo.de/ and include the libraries into my domain/lib folder (including the Spring libs) Added the following to the <resources> section of the glassfish domain.xml: <custom-resource res-type="commonj.work

What is called session store?

早过忘川 提交于 2019-12-20 23:56:09
问题 What is called session store in context of web applications/websites ? Is it anything more than a temporary store of session variables? 回答1: Typically the user's first request to the site establishes a session. The session has a key which is passed to the user as a cookie, so that with every subsequent request the same session is retrieved. The session store can store information about that user you don't want (or can't due to the length limit of cookies) to put in a cookie, for example the

How to send messages from server to client?

拟墨画扇 提交于 2019-12-20 22:08:11
问题 I am going to implement something similar to Facebook notification and this website (StackOverflow's notification which is notifying us if anyone write a comment/answer etc for our question). Please note users are going to use my application as a website not mobile application. I came across following answer which fetch the results, but I need to push the results not fetch. Based on suggestions I have created a simple method in my entity class and added the @PostPersist to it but it has not

How to add data of different records to a single record?

限于喜欢 提交于 2019-12-20 22:00:04
问题 If do not have time please have a look at the example I have two types of users, temporary users and permanent users. Temporary users use the system as guest just provide their name and use it but system needs to track them. Permanent users are those that are registered and permanent. Once user create a permanent record for himself, I need to copy all the information that has been tracked while user was a guest to his permanent record. Classes are as following, @Entity public class PermUser{

EJB 3.1 application deployed as WAR-only: What about ejb-jar.xml?

一世执手 提交于 2019-12-20 21:05:03
问题 I have a JavaEE6 application, consisting of Web stuff and EJBs and which is deployed as WAR-only (using EJB3.1). The build is based on Maven. I just read about a new possibility to order the module initialization in Java EE 6 here which i also need for my application. Also, i would like to have an option to define some EJB properties in XML. Since the example is deployed as an EAR-project the order is defined in the application.xml. But in a WAR-deployed project, there is no application.xml.

EJB 3.1 application deployed as WAR-only: What about ejb-jar.xml?

时光总嘲笑我的痴心妄想 提交于 2019-12-20 21:03:52
问题 I have a JavaEE6 application, consisting of Web stuff and EJBs and which is deployed as WAR-only (using EJB3.1). The build is based on Maven. I just read about a new possibility to order the module initialization in Java EE 6 here which i also need for my application. Also, i would like to have an option to define some EJB properties in XML. Since the example is deployed as an EAR-project the order is defined in the application.xml. But in a WAR-deployed project, there is no application.xml.

How to run a Scheduled Method in a Cluster for one Node and for All?

我们两清 提交于 2019-12-20 20:38:45
问题 I have a Glassfish 3.1.2 that runs in a cluster and a EJB 3.1 application. And I need two kind of Scheduled Methods in my application: one kind that runs only once (on a single node) once a day and other kind that runs on all nodes (every 1-2 Minutes) -- They do NOT need to run a syncron way! The requirement is just that this kind run on every node. I have no clue how to start with this cluster - problem, is this possible with @Schedule (and how) or do I need something else? 回答1: I faced the

what happens if we put two different versions of jar files in classpath? [closed]

↘锁芯ラ 提交于 2019-12-20 19:43:54
问题 Closed . This question needs details or clarity. It is not currently accepting answers. Want to improve this question? Add details and clarify the problem by editing this post. Closed 3 years ago . If i put two different versions of jar files in class path, what willl happen? for example: log4j1.4.jar and log4j1.5.jar kept in classpath what will happen? 回答1: While I also recommend not to do this, I still like to try to answer your original question: Java has a classloader hierarchy, so if you

Closing JAX-RS StreamingOutput's OutputStream

…衆ロ難τιáo~ 提交于 2019-12-20 19:41:32
问题 Should the StreamingOutput 's OutputStream be closed by the implementing class? The java-doc does not give any recommendations. I guess it just delegates to the underlying ServletOutputStream which means it should not be closed, but my guess might be wrong :) Also the javadoc makes a reference to the MessageBodyWriter interface where it's explicitly said that the output stream must not be closed. https://docs.oracle.com/javaee/7/api/javax/ws/rs/core/StreamingOutput.html 回答1: Being unable to