glassfish-3

How to remove (duplicate) X-Powered-By: JSF/2.0

有些话、适合烂在心里 提交于 2019-12-05 13:48:05
In my instance, I have Glassfish 3.1.1 / Mojarra 2.1.3 I could remove the X-Powered-By in Glassfish Admin Console in the Network listener (so it doesn't show the long text: Servlet/3.0 JSP/2.2 (GlassFish Server Open Source Edition 3.1.1 Java/Sun Microsystems Inc./1.6) but it still shows (yes, twice): X-Powered-By: JSF/2.0 X-Powered-By: JSF/2.0 I am using Jersey and JAXB to expose some web-services and have some servlets deployed using the @WebServlet Annotation but I don't think they add anything. It is not generated by mod_jk or Apache because I get those headers even when connecting to the

Netbeans 7.1.2 - Unable to add glassfish server 3.1.2

孤街浪徒 提交于 2019-12-05 12:39:25
I downloaded glassfish server from http://glassfish.java.net/downloads/3.1.2.2-final.html and installed in separately. Now I am trying to add this in Netbeans. But it does not work. I did the below steps Open Netbeans as administrator Open Tools -> Servers Click "Add Server" button Choose GlassFish Server 3+ Specify a name as "GlassFish" Choose the installation folder location - C:\glassfish3 Now it displays the error "Not a valid Glassfish server Installation". I am new to Netbeans & Glassfish & now don't know how to continue. My glassfish server is running successfully at localhost:8181 Can

Invoke soap webservice returning list of objects from java client with axis

不羁岁月 提交于 2019-12-05 09:37:40
I'm getting mad with webservices. I have a very simple soap webservice : @Remote public interface StudentService { public String sayHello(); public List<Student> getStudents(); } And @Stateless @WebService public class StudentServiceImpl implements StudentService { @Override public String sayHello() { return "Hello World"; } public List<Student> getStudents() { List<Student> students = new ArrayList<Student>(); Student st1 = new Student(); st1.setMatricule(1234); st1.setName("student1"); students.add(st1); Student st2 = new Student(); st2.setMatricule(5678); st2.setName("student2"); students

@Context returns Proxy instead of HttpServletRequest (No thread local value in scope for proxy)

吃可爱长大的小学妹 提交于 2019-12-05 06:47:09
I have a bit of a problem with understanding why @Context dependency injection returns collection of $Proxy(random number) instances instead of HttpServletRequest or HttpServletResponse. I am using Glassfish 3.1.2.2 with it's version of Jersey(Jersey: 1.11.1) and my app is built as EAR application. I have simple @Remote interface where I annotate my methods and REST services work without any problems, but the moment I try to access HttpServletRequest information it just causes problems. I have annotated private fields in my session bean: @Context private HttpServletRequest request; @Context

Admin port configuration not found' error while setting up Glassfish config in IntelliJ

旧街凉风 提交于 2019-12-05 02:23:58
When setting up Glassfish in IntelliJ IDEA I get the following Error message ´Admin port configuration not found´. Now I searched high an low but I found no place where I can set the admin port. Searching Google all I found was a dead link on the JavaRanch . So Im not the first but the solution is lost. Does anybody know what is to be done? IDEA GlassFish integration detects admin port from the file: <domain folder>/config/domain.xml XPaths checked: /configs/config[@name='server-config']/http-service/http-listener[@id='admin-listener']/@port /configs/config[@name='server-config']/network

Glassfish 3 has two configurations

柔情痞子 提交于 2019-12-04 22:47:22
I wanted to setup JDBC realm in Glassfish 3.1 and I am following this blog http://blog.gamatam.com/2009/11/jdbc-realm-setup-with-glassfish-v3.html But I notice in Glassfish 3.1 that there are two configuration namely default-config and server-config I just wanted to try out authentication using glassfish but I dont know where should I configure my realm? Any hints? Thanks Put it in server-config . From the Glassfish 3.1.1 doc : The default-config configuration is a special configuration that acts as a template for creating named configurations. Clusters and instances cannot refer to the

JavaEE + Glassfishv3.0.1: Losing session attribute (SessionId is not the same between request)

白昼怎懂夜的黑 提交于 2019-12-04 21:51:37
I have a home.jsf that invoke a login servlet that look into database and query out the user object given the username and password. Then I save that user object into session under attribute name user , like this request.getSession().setAttribute("user", user); protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { String username = request.getParameter("username"); String password = request.getParameter("password"); boolean remember = "true".equals(request.getParameter("remember")); //Hashing the password with SHA-256 algorithms

GlassFish (real) hot deployment of JSF pages and resources (CSS etc.) in Eclipse

≡放荡痞女 提交于 2019-12-04 19:08:32
We are wondering how to setup GlassFish 3.1.2 real hot deployment, that is not just the usual setting How can I hot deploy using the glassfish adapter in Eclipse but how to make it possible that the Eclipse GlassFish plugin will silently push changed XHTML, CSS, etc. files to the server as you save the file in Eclipse. How is it officially setup? Again, I tested this several times now, hot-deploying just-changed XHTML(/JSF), CSS files on save just doesn't work. When setting to Never publish automatically nothing happens when saving a JSF file. When setting to Automatically publish when

Logging using Log4j.xml in Glassfish

帅比萌擦擦* 提交于 2019-12-04 19:06:10
I was using WAS as my application server for deploying ear project.Presently changed to Glassfish . I am using log4j.xml file for logging. Logging is not working in Glassfish. Is there any dependency in using log4j.xml with glassfish. Any suggestions/pointers is appreciated If your log4j library is included within your EAR file, then check your app server's JVM properties to ensure the log4j.configuration property is set: Login to the Glassfish Admin Console (http://[hostname]:4848/) For your server, navigate to Configuration > JVM Settings > JVM Options If an entry for -Dlog4j.configuration

Atmosphere can't get session on Glassfish 3.1.2

倖福魔咒の 提交于 2019-12-04 18:15:31
I got the chat example working from Atmosphere, and now I want to get the session, but I get a null pointer exception. My configuration: GlassFish 3.1.2 Atmosphere 1.0.0-SNAPSHOT My ChatAtmosphereHandler.java file: @Override public void onRequest(AtmosphereResource r) throws IOException { AtmosphereRequest req = r.getRequest(); // First, tell Atmosphere to allow bi-directional communication by suspending. if (req.getMethod().equalsIgnoreCase("GET")) { /* ------- ADDED LINES BY ME ------- */ double i = Math.random(); System.out.println(i); req.getSession(true).setAttribute("user", i); //Null