jboss

@MultipartForm How to get the original file name?

送分小仙女□ 提交于 2020-06-10 08:23:53
问题 I am using jboss's rest-easy multipart provider for importing a file. I read here http://docs.jboss.org/resteasy/docs/1.0.0.GA/userguide/html/Content_Marshalling_Providers.html#multipartform_annotation regarding @MultipartForm because I can exactly map it with my POJO. Below is my POJO public class SoftwarePackageForm { @FormParam("softwarePackage") private File file; private String contentDisposition; public File getFile() { return file; } public void setFile(File file) { this.file = file; }

@MultipartForm How to get the original file name?

烂漫一生 提交于 2020-06-10 08:22:30
问题 I am using jboss's rest-easy multipart provider for importing a file. I read here http://docs.jboss.org/resteasy/docs/1.0.0.GA/userguide/html/Content_Marshalling_Providers.html#multipartform_annotation regarding @MultipartForm because I can exactly map it with my POJO. Below is my POJO public class SoftwarePackageForm { @FormParam("softwarePackage") private File file; private String contentDisposition; public File getFile() { return file; } public void setFile(File file) { this.file = file; }

Java EE security - Not redirected to initial page after login

匆匆过客 提交于 2020-06-09 12:13:48
问题 I just started learning Java EE. My goal is to implement a web portal (with EJB 3 and JSF) for badminton players, where the users can post and analyze their results. To keep it simple (well it turns out it really isn't) I have decided to use the security system the container provides (JBoss as7). After some problem I have managed to get the authentication/authorization to work. However, I have one issue which I haven't been able to solve. When I try to access a protected page I get, as

How to disable HTTPS on Keycloak

断了今生、忘了曾经 提交于 2020-06-09 04:37:05
问题 Like in the title: How to disable the requirement of https on Keycloak? Using only the terminal, as I can't log in to the administrator panel, because... there's no https. 回答1: You could change "Require SSL" in Realm settings, Login tab. The options are external requests Keycloak can run out of the box without SSL so long as you stick to private IP addresses like localhost, 127.0.0.1, 10.0.x.x, 192.168.x.x, and 172..16.x.x. If you don’t have SSL/HTTPS configured on the server or you try to

ScheduledExecutorService Java EE how to start it in web service (JBoss)? [duplicate]

。_饼干妹妹 提交于 2020-06-09 04:07:47
问题 This question already has answers here : How to run a background task in a servlet based web application? (5 answers) Closed 2 years ago . In Java SE I have a scheduled tasks waiting to be executed when I run main(). But in Java EE (JBoss webservice) the methods are run when there's a web request. Is there a way to start scheduling tasks once the application is deployed? I was looking to use ScheduledExecutorService. 回答1: Caveat: This Answer addresses the app servers such as Apache Tomcat and

Docker on Windows: how to connect to container from host using container IP?

一曲冷凌霜 提交于 2020-06-06 21:18:43
问题 I have Windows 10 Docker for Windows V. 1.12.5 Rev. 9503, which does not rely on boot2docker or VirtualBox anymore. I have a number of JBoss instances running in Docker images (172.18.0.2 is a database): instance 1: name: jboss-eap, IP: 172.18.0.3 instance 2: name: jboss-eap-arquillian, IP: 172.18.0.4 that shall be running at the same time. Each JBoss instance exports e.g. its 8787, 8080 and 8443 ports. I have also created a bridged network: docker network create --driver bridge --subnet 172

Hibernate: Error activating Bean Validation integration

微笑、不失礼 提交于 2020-05-16 06:11:10
问题 I can't get hibernate connection worked !! I'm using Hibernate 4.2.1 I Got this error Initial SessionFactory creation failed.org.hibernate.cfg.beanvalidation.IntegrationException: Error activating Bean Validation integration public class HibernateUtil { private static final SessionFactory sessionFactory; private static ServiceRegistry serviceRegistry; static { try { Configuration configuration = new Configuration(); configuration.configure(); serviceRegistry = new ServiceRegistryBuilder()

How to map third party IdP SAML attributes to my local application roles using keycloak-saml adapter

两盒软妹~` 提交于 2020-05-15 21:34:08
问题 My setup is: EAP 6.4.18 keycloak-saml adapter Third party IdP server (not a keycloak server) I'm trying to secure one of the web applications inside an EAR. Currently my standalone.xml looks like this: <subsystem xmlns="urn:jboss:domain:keycloak-saml:1.3"> <secure-deployment name="myapp.war"> <SP entityID="https://mydomain/myapp/" sslPolicy="EXTERNAL" nameIDPolicyFormat="urn:oasis:names:tc:SAML:2.0:nameid-format:persistent" logoutPage="/logout.jsp" forceAuthentication="false" isPassive="false

How to map third party IdP SAML attributes to my local application roles using keycloak-saml adapter

泪湿孤枕 提交于 2020-05-15 21:33:11
问题 My setup is: EAP 6.4.18 keycloak-saml adapter Third party IdP server (not a keycloak server) I'm trying to secure one of the web applications inside an EAR. Currently my standalone.xml looks like this: <subsystem xmlns="urn:jboss:domain:keycloak-saml:1.3"> <secure-deployment name="myapp.war"> <SP entityID="https://mydomain/myapp/" sslPolicy="EXTERNAL" nameIDPolicyFormat="urn:oasis:names:tc:SAML:2.0:nameid-format:persistent" logoutPage="/logout.jsp" forceAuthentication="false" isPassive="false

java.lang.ClassNotFoundException On first call of the rest Service

梦想的初衷 提交于 2020-05-14 07:52:40
问题 Hello I am trying to develop rest application for jboss 6.3 using Red Hat JBoss Developer Studio I have very strange issue: When i access my rest service first time via fiddller i get following exception: 15:49:18,053 ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[default-host].[/OASExtention-war].[javax.ws.rs.core.Application]] (http-localhost/127.0.0.1:8080-2) JBWEB000236: Servlet.service() for servlet javax.ws.rs.core.Application threw exception: java.lang