java-ee

Howto prevent JBoss from rewriting JAX-WS XSD import URLs to HTTPs

左心房为你撑大大i 提交于 2019-12-13 01:10:15
问题 We have a JAX-WS webservice deployed in a WAR in JBoss EAP 6.4.0 (JBoss AS 7.5.0) that delivers a predefined WSDL and XSD: @WebService(endpointInterface = "package.MyPortType", targetNamespace = "http://target.name.space", wsdlLocation = "/WEB-INF/classes/myService.wsdl", serviceName = "myService", portName = "myServicePort") public class MyService implements MyPortType { ... } JBoss correctly deploys the webservice and publishes the given WSDL as http://localhost:8080/myApp/myService and

Struts2 JSON interceptor not populating my Action class

自古美人都是妖i 提交于 2019-12-13 00:50:11
问题 I am working on a web app in which the client JavaScript library (ExtJS) sends requests to my Struts-enabled backend with a JSON request payload. My problem is that I can't figure out how to get the variables from the payload into my Action class. I know from using log statements that the correct method in my action class is being called by the frontend. It's just that the variables I am expecting are null when they shouldn't be. I'm trying to use struts2-json-plugin as an interceptor. Struts

JNDI Lookup on JBoss AS 6.0

旧巷老猫 提交于 2019-12-13 00:48:28
问题 I have an application deployed at localhost on JBoss 6.0 AS. This application has one remote EJB bean called ExampleEJB. Now I'm trying to code a simple client application that consumes ExampleEJB. This client application will not be deployed at any application server. The idea is to code a simple Java SE client program. I've written the following trying to perform a lookup: Properties env = new Properties(); env.put(Context.INITIAL_CONTEXT_FACTORY,"org.jnp.interfaces.NamingContextFactory");

Migrating EJB application from WebSphere Classic to Liberty Requires ejblite-3.1

↘锁芯ラ 提交于 2019-12-13 00:47:17
问题 I have inherited a legacy EJB application that was built as an EJB 3.0 with session beans and JPA. I am migrating from WebSphere 8.0 where the application worked without issues. I have tested on WebSphere 8.5.5 classic and have no issues, however, we have decided for strategic reasons to use WebSphere Liberty. I am deploying two ear files on the application server, 1 which is a front end EAR app and one which houses the EJB (JPA) application. Both applications run ins the same JVM. I have

Eclipse Maven Spring Project - Error

邮差的信 提交于 2019-12-13 00:45:23
问题 I need help with an error which make me crazy. I started to study Java EE and I am going through tutorial on youtube. Everything went well till I came to Spring, Hibernate, JSF preparing project. I added dependencies to my pom.xml project like you can see below, but in my config files I am having an error: "Build path is incomplete can't find class file for org/aspectj/weaver/BCException" I was looking on google and also here for an answer answer to my question. I found that I need to add

Java BounceBall mouse event

走远了吗. 提交于 2019-12-13 00:44:39
问题 I am working with the example below. And I have a difficulty. Necessary to make the balls escape the mouse pointer. Change direction when they find the pointer. I tried to pass as a parameter to the mouse position to the function "move" but get an error: "Exception in thread" Thread-2 "java.lang.NullPointerException" Can anyone give me a hint how to do this? I'm lost. Code: public class SimpleBalls { private Point mousePoint; public static void main(String[] args) { new SimpleBalls(); }

xml file doesn't update. What is the reason for this?

风流意气都作罢 提交于 2019-12-13 00:41:10
问题 There is a xml file in the blobstore which looks like : <?xml version="1.0" encoding="UTF-8"?> <Blobs> </Blobs> The following servlet uploads a file to the blobstore . After it uploads the file , it gets the file key and calls a Bean that updates the xml by adding a node whose text-content is the key. public class UploadImagesToAisle extends HttpServlet { /** * Handles the HTTP * <code>POST</code> method. * * @param request servlet request * @param response servlet response * @throws

EJBs and Storing Objects in a Data Structure (Map, List, etc)

对着背影说爱祢 提交于 2019-12-13 00:38:16
问题 Is it possible to have objects stored in a data structure for the duration of an App Server's uptime? Basically I want an EJB that interfaces with this Data Structure, but does not require a full fledged database solution. As an example I made this dummy animal object: package com.test.entities; public class Animal implements java.io.Serializable { private static final long serialVersionUID = 3621626745694501710L; private Integer id; private String animalName; public Integer getId() { // TODO

Validation message not being displayed in login form when the user enters wrong password

本秂侑毒 提交于 2019-12-13 00:15:50
问题 I am trying to understand why my login form does not display the validation message that says "wrong email or password" when the password is entered wrong. In all the other cases it works correctly(Just case 4 doesnt work): Case 1 works with no problem(No input given): Case 2 works with no problem(Only input given for email): Case 3 works with no problem(Only input given for password): Case 4 doesn't work (Both inputs given wrong) It is the case 4 that doesn't work correctly here is the

How to replace some tags and remove others with line break in j2ee

落爺英雄遲暮 提交于 2019-12-13 00:06:34
问题 The main problem was to get the content of an html file and remove all tags. I have read theses questions before: 1,2,3 after reading all of them I decided to use jsoup and it really helped me. I also realized how to keep line break and replace <p> tags with line break. now my problem is that I have an html file which has a <H1> tag inside which the title of the whole content is available and I wanna keep it with a line break but with jsoup the fist paragraph comes exactly after the title