wildfly

How to setup angular 4 inside a maven based java war project

℡╲_俬逩灬. 提交于 2019-11-27 17:38:19
I'm becoming a bit crazy because I can't find a guide to setup an angular 4 app inside a java war project that will be built with maven. This is because I want to run it into a wildfly server. Any help? Thanks I had similar requirement to have one source project which has java web-services project as well as angular project(an angular-cli based project) and maven build should create a war with all angular files in it. I used maven-frontend-plugin with few configuration changes for base path. The goal was to create a war file with all the java code in it plus all the aot compiled angular code

Authentication/authorization in JAX-RS using interceptors and injection

白昼怎懂夜的黑 提交于 2019-11-27 16:45:10
问题 I am developing a new application in JavaEE 7 using WildFly 8. I am using JAX-RS to provide a RESTful service interface for remote applications. Something like an HttpHeaders object can be injected in a resource method arguments using the @Context annotation. Since the object is based on request parameters (of course, the HTTP headers), I came up with the idea of creating my own injectable User object which is created based on the presence of a valid token in the request (something like an

Spring Boot Websockets in Wildfly

可紊 提交于 2019-11-27 15:38:09
问题 Hi I need to deploy my Spring Boot app into Wildfly 8.1 and I'm getting the following exception: Caused by: java.lang.RuntimeException: java.lang.ClassCastException: org.apache.tomcat.websocket.server.WsServerContainer cannot be cast to io.undertow.websockets.jsr.ServerWebSocketContainer at io.undertow.servlet.core.DeploymentManagerImpl.deploy(DeploymentManagerImpl.java:219) at org.wildfly.extension.undertow.deployment.UndertowDeploymentService.startContext(UndertowDeploymentService.java:87)

wildfly: reading properties from configuration directory

无人久伴 提交于 2019-11-27 13:09:13
问题 I'm trying to read deployment specific information from a properties file in my wildfly configuration folder. I tried this: @Singleton @Startup public class DeploymentConfiguration { protected Properties props; @PostConstruct public void readConfig() { props = new Properties(); try { props.load(getClass().getClassLoader().getResourceAsStream("my.properties")); } catch (IOException e) { // ... whatever } } But apparently this is not working since the configuration folder is not in the

Override logging in WildFly

拥有回忆 提交于 2019-11-27 11:43:24
I used tomcat and simply override default logging system. How to enable logging with logback on wildfly in my spring app? My Logback.xml owrking on tomcat <?xml version="1.0" encoding="UTF-8"?> <configuration> <appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender"> <filter class="ch.qos.logback.classic.filter.LevelFilter"> <level>ERROR</level> <onMatch>ACCEPT</onMatch> <onMismatch>DENY</onMismatch> </filter> <encoder> <pattern>%-4relative [%thread] %-5level %logger{35} - %msg %n</pattern> </encoder> </appender> <logger name="org.springframework" level="WARN" /> <logger name="com

JBoss WildFly: Starts but can't connect?

老子叫甜甜 提交于 2019-11-27 11:40:33
I just configured JBoss WildFly. It is running and it is accessible from the same machine, everything is working fine... My problem is that it is not accessible from another system (I mean in a network, the server (hosted machine) URL can't access from another system). How can I solve this? By default jboss/wildfly binding to localhost, if you want change this, you can execute: standalone.sh -b 0.0.0.0 listen on all IP addresses of the machine (if multihomed) Another alternative is configure in standalone.xml the interfaces section. Change: <interfaces> <interface name="management"> <inet

Wildfly 9 http to https

痞子三分冷 提交于 2019-11-27 11:15:29
I want to redirect the request from HTTP to HTTPS. I am using wildfly 9. After a google search I found the following, but it is not working. I hope somebody <subsystem xmlns="urn:jboss:domain:undertow:2.0"> <buffer-cache name="default"/> <server name="default-server"> <http-listener name="default" socket-binding="http" redirect-socket="https"/> <https-listener name="https" socket-binding="https" security-realm="SSLRealm"/> <host name="default-host" alias="localhost"> <location name="/" handler="welcome-content"/> <filter-ref name="server-header"/> <filter-ref name="x-powered-by-header"/> <

How to change default port 8080 in WildFly

假如想象 提交于 2019-11-27 10:14:46
问题 I just started JAVA EE development with WildFly 8.2. My first problem is how to change the default port 8080 to something else? I found many xml files containing below line. <socket-binding name="http" port="${jboss.http.port:8080}"/> but I guess I don't have to change all of them?! 回答1: In your standalone.xml file, look for this element: <socket-binding-group name="standard-sockets" default-interface="public" port-offset="${jboss.socket.binding.port-offset:0}"> The port-offset attribute lets

ViewExpiredException on a WildFly-served webapp only in a particular webbrowser

六眼飞鱼酱① 提交于 2019-11-27 09:45:17
I have a jsf application running on Wildfly 8.1.0Final and, ONLY in Google Chrome, when I click on the Login button, i receive ViewExpiredException, in others browsers, or in Chrome Incognito Mode, works perfectly! Someone knows what could be? 20:29:18,531 INFO [stdout] (default task-49) 2014-09-16 20:29:18 ERROR context:218 - javax.faces.application.ViewExpiredException: viewId:/login.jsf - A exibição de /login.jsf não pôde ser restaurada. 20:29:18,532 INFO [stdout] (default task-49) at com.sun.faces.lifecycle.RestoreViewPhase.execute(RestoreViewPhase.java:210) 20:29:18,532 INFO [stdout]

SLF4J + Logback does not log in WildFly

[亡魂溺海] 提交于 2019-11-27 08:38:48
I run web application in WildFly 8 and for some reason it does not log. I use SLF4J with LOGBACK. The log file is created on deploy but it is empty. I do not see my log statements in wildfly logs either. The class contains: package com.blah.oops; import org.slf4j.Logger; import org.slf4j.LoggerFactory; static final Logger log = LoggerFactory.getLogger(EndpointImpl.class); log.debug("request called"); War contains: WEB-INF\lib\slf4j-api-1.7.5.jar WEB-INF\lib\logback-classic-1.1.1.jar WEB-INF\lib\logback-core-1.1.1.jar WEB-INF\classes\logback.xml Configuration file logback.xml contains: