glassfish-4

How to display images located in glass fish folder?

半腔热情 提交于 2019-11-30 16:10:07
问题 I am using JSF and glassfish 4.0. I know that all the images that are placed in images directory under the resources folder of the project can be accessed directly. I wanted to know how I can display images which are located in glass fish folder.I created a images folder under glass fish domains and I want to display this images in the JSF page. Could anyone let me know how I can do that? I am new to this so need some help. <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE glassfish-web-app

Why am I receiving JDBC driver warning and ThreadLocal errors?

谁说我不能喝 提交于 2019-11-30 16:05:53
I am running my application on GlassFish, I use Spring Security and Hibernate. When I run the application the following warning and errors will be shown on GlassFish console. How can I avoid them? WARNING: The web application [] registered the JDBC driver [com.mysql.jdbc.Driver] but failed to unregister it when the web application was stopped. To prevent a memory leak, the JDBC Driver has been forcibly unregistered. SEVERE: The web application [] created a ThreadLocal with key of type [java.lang.ThreadLocal] (value [java.lang.ThreadLocal@1087985b]) and a value of type [org.hibernate.internal

Jersey custom SecurityContext on EJB jax-rs resource

独自空忆成欢 提交于 2019-11-30 15:23:44
I am trying to implement my own ContainerRequestFilter and configure SecurityContext . It works well on jax-rs resources but EJB jax-rs throws javax.ejb.AccessLocalException Only relevant thing I found is 4 years old and the workaround doesn't seem pretty. https://java.net/projects/jersey/lists/users/archive/2010-05/message/265 My custom SecurityContext: @Provider @PreMatching public class SecurityFilter implements ContainerRequestFilter { @Override public void filter(ContainerRequestContext filterContext) throws IOException { filterContext.setSecurityContext(new Authorizer()); } public class

Glassfish v4 - java 7 - Port Unification - Error - not able to redirect http to https

送分小仙女□ 提交于 2019-11-30 10:31:24
I am trying to use port unification for glassfish 4 to redirect any http request to https. I could easily do this with V3 but I am having issues with glassfish v4 - Java 1.7. Commands that I executed in glassfish v4 - asadmin create-protocol --securityenabled=false http-redirect asadmin create-protocol-filter --protocol http-redirect --classname org.glassfish.grizzly.config.portunif.HttpRedirectFilter redirect-filter asadmin create-protocol --securityenabled=false pu-protocol asadmin create-protocol-finder --protocol pu-protocol --targetprotocol http-listener-2 --classname org.glassfish

java.lang.IllegalArgumentException: URLDecoder: Incomplete trailing escape () pattern

孤街浪徒 提交于 2019-11-30 09:20:59
问题 I have a URL like, http://localhost:8080/Project-war/utility/Login.jsf?fallback=%2FProject-war%2Fpublic_resources%2FShowDetails.jsf%3Fid%3D9 This URL is formed, when a login page is requested. The return URL to which the request is to be redirected after successful login is appended as a query-string parameter to the URL. If this URL is deliberately changed by a user like so, http://localhost:8080/Project-war/utility/Login.jsf?fallback=%2FProject-war%2Fpublic_resources%2FShowDetails.jsf%3Fid%

Configure Jackson as JSON Provider in JAX-RS 2.0

时光怂恿深爱的人放手 提交于 2019-11-30 08:53:59
I want to use Jackson as JSON provider for my JAX-RS 2.0 webservice. For JAX-RS I use Jersey 2.0 in GlassFish 4. With JAX-RS 1.x I can add <init-param> <param-name>com.sun.jersey.api.json.POJOMappingFeature</param-name> <param-value>true</param-value> </init-param> in my web.xml . How can i do this in Jax-RS 2.0 with Jersey 2.0? I implement a application class like this public class MyRESTExampleApplication extends ResourceConfig { public MyRESTExampleApplication() { packages("com.carano.fleet4all.restExample"); register(JacksonFeature.class); } } and add these lines to my web.xml . <init

Problems with glassfish 4 Debug in IDEA 12.1

依然范特西╮ 提交于 2019-11-30 02:45:18
问题 I'm trying to debug glassfish 4 application in IntelliJ IDEA12.1 and am getting the following: D:\tools\glassfish4\glassfish\bin\asadmin.bat start-domain --debug domain1 [2013-06-28 03:58:34,480] Artifact exchange-web:war: Server is not connected. Deploy is not available. Detected server admin port: 4848 Detected server http port: 8080 Attempting to start domain1.... Please look at the server log for more details..... But nothing started. And there is no error in log. So what should I do to

Why am I receiving JDBC driver warning and ThreadLocal errors?

▼魔方 西西 提交于 2019-11-29 23:01:44
问题 I am running my application on GlassFish, I use Spring Security and Hibernate. When I run the application the following warning and errors will be shown on GlassFish console. How can I avoid them? WARNING: The web application [] registered the JDBC driver [com.mysql.jdbc.Driver] but failed to unregister it when the web application was stopped. To prevent a memory leak, the JDBC Driver has been forcibly unregistered. SEVERE: The web application [] created a ThreadLocal with key of type [java

Deployment-Error: Java-Webproject from netbeans to glassfish 4.0

99封情书 提交于 2019-11-29 16:09:21
Setup I'm using Netbeans 7.4 on Mac OSX Mavericks and Glassfish 4.0 (build 89) on my dedicated server and JDK 1.7 . To use the server locally I setup and ssh-tunnel. The following way: ssh -L 4848:127.0.0.1:4848 -p 6122 glassfish@XXXXXXXXXX This is working perfectly fine, I can access the server via localhost without any problems. To use this server I added a server in Netbeans, see prinscreen: Problem Now I'd like to deploy the project to the server (Right-Click Project -> Deploy) but I get following Error: Building jar: /Users/tzhware7/NetBeansProjects/SkyLogicAddon/dist/SkyLogicAddon.war

Glassfish v4 - java 7 - Port Unification - Error - not able to redirect http to https

ε祈祈猫儿з 提交于 2019-11-29 15:48:41
问题 I am trying to use port unification for glassfish 4 to redirect any http request to https. I could easily do this with V3 but I am having issues with glassfish v4 - Java 1.7. Commands that I executed in glassfish v4 - asadmin create-protocol --securityenabled=false http-redirect asadmin create-protocol-filter --protocol http-redirect --classname org.glassfish.grizzly.config.portunif.HttpRedirectFilter redirect-filter asadmin create-protocol --securityenabled=false pu-protocol asadmin create