jakarta-ee

Error: Projects containing version <unknown> deployment descriptors require XMI-format bindings or extensions files. ibm-web-bnd.xml

[亡魂溺海] 提交于 2020-01-22 19:44:05
问题 I have upgraded editor from Rad 7.5 to 8 and maven 2 to 3 . This happens just after importing existing maven projects in RAD 8, but I have no errors on any pom files. The issue is with two xml files : Projects containing version deployment descriptors require XMI-format bindings or extensions files. ibm-web-bnd.xml /DocViewerWeb/WebContent/WEB-INF Unknown Validation Message Projects containing version deployment descriptors require XMI-format bindings or extensions files. ibm-web-ext.xml

How do I configure Java EE running on GAE to work with Angular UI Router in html5Mode?

元气小坏坏 提交于 2020-01-22 17:46:06
问题 I am attempting to set the UI Router location provider html5Mode to true for my Angular application: locationProvider.html5Mode(true) . While this works client side (appropriately redirects) I am running into issues server side. I am running an instance Java Enterprise Edition on Google App Engine. I have configured my web.xml as outlined for Java EE section in the Angular ui-router FAQ: <?xml version="1.0" encoding="utf-8"?> <web-app xmlns="http://java.sun.com/xml/ns/javaee" version="2.5">

Uncaught SecurityError: Failed to construct 'WebSocket': An insecure WebSocket connection may not be initiated from a page loaded over HTTPS

淺唱寂寞╮ 提交于 2020-01-22 17:42:14
问题 I am using GlassFish Server 4.1/Java EE 7. In my web.xml file, I mentioned the following security constraints. <security-constraint> <display-name>UserConstraint</display-name> <web-resource-collection> <web-resource-name>Provide a Name</web-resource-name> <description/> <url-pattern>/admin_side/*</url-pattern> <http-method>GET</http-method> <http-method>POST</http-method> </web-resource-collection> <auth-constraint> <description/> <role-name>ROLE_ADMIN</role-name> </auth-constraint> <user

how to implement a cache in ejb 3.0?

为君一笑 提交于 2020-01-22 15:38:51
问题 I have a customer who's stuck in an EJB 3.0 environment. No @Singleton, no bean-managed concurrency :-( Considering thread management and synchronization is forbidden by the ejb specification, how to implement a cache? In essence, I want an non-synchronized object cache for some costly operations. 回答1: The restriction of using static field and synchronization is stated in EJB 3.0 spec chapter 21.1.2. It also explains why. • An enterprise bean must not use read/write static fields. Using read

Hide .xhtml source - facelets/icefaces?

微笑、不失礼 提交于 2020-01-22 15:27:12
问题 I'm new to Icefaces and Facelets both, but I'm using them on a new project. I've got everything working configured and working fine. However, when I visit mywebapp/file.xhtml, the entire facelets template source comes up in my browser. How could I hide this to prevent users from viewing my server-side templates? 回答1: Put all templates into WEB-INF/someDirectory/templates. Then according to the facelets documentation put this inside your web.xml for all other xhtml files: <security-constraint>

How to learn using content repository and Apache JackRabbit?

假装没事ソ 提交于 2020-01-22 14:56:06
问题 Where do I go after doing the "First hops" in the Apache JackRabbit website? I don't understand how to create a repository that is not in memory and how to configure it and so on. 回答1: You could look also at Silverpeas code. It's using Jackrabbit with some simple code to create nodes, browse them etc. For example take a look into https://github.com/Silverpeas/Silverpeas-Core/blob/master/lib-core/src/main/java/org/silverpeas/attachment/repository/DocumentRepository.java The tests are using in

JavaEE6: How to safeguard web application when the database shut down

≡放荡痞女 提交于 2020-01-21 14:50:45
问题 First of all, my framework is Java EE 6 with JSF, managed bean, EJB and JPA. I write a simple program to query information from the database. So when I click a button, it trigger an event to a managed bean, where an event listener method will access EJB method. The EJB method will do a simple select query to an Entity. If the database is shutdown before or during the time I select , I get an exception Exception [EclipseLink-4002] (Eclipse Persistence Services - 2.0.1.v20100213-r6600): org

display special characters in jsp page

ⅰ亾dé卋堺 提交于 2020-01-21 12:15:14
问题 How to display right content on jsp page or any configuration need to done in tomcat server...? display at jsp : Hello G�nter original content : Hello Günter We do the following but its not working. <%@ page language="java" contentType="text/html; charset=ISO-8859-15" pageEncoding="UTF-8"%> 回答1: As most other people have said, you should probably check the encoding of the actual file on the file system . Even if the server is instructed to serve out UTF-8, if the file is mangled, you'll get

HTML5 Server sent events and multiple clients (without using Comet)

一笑奈何 提交于 2020-01-21 09:27:25
问题 I have a usecase for which I would like to know if HTML5's Server-sent-Events is suitable. Multiple clients (Javascript+HTML5 browsers) connect to the web server (with a Java EE backend). Each client could be looking at a different view at any time, depending on what is their object of interest. My Question is: How to keep multiple clients (on different views) up-to-date on the updates happening on the server-side, without flooding all clients with all updates on all views ? Important points

best place to put properties file in IBM websphere 8.5?

五迷三道 提交于 2020-01-21 03:15:15
问题 In our existing application properties file is embedded in a jar file ,we decided to move properties file outside of ear(application) , what is the best place to put properties file in IBM websphere 8.5 ? so that i can retrieve path with WAS Environment variables and file should be available to all nodes in a cluster .. 回答1: You can use the classloader directories for that. I would use the directory classes (you might need to create) under $WEBSPHERE_HOME/AppServer/classes and drop your