Questions tagged [grizzly]

The Grizzly NIO and Web framework leverage Java™ NIO API capabilities. Grizzly's helps developers to build scalable and robust servers using NIO and we are also offering extended framework components: Web Framework (HTTP/S), Bayeux Protocol, Servlet, HttpService OSGi and Comet.

The Grizzly NIO and Web framework leverage Java™ NIO API capabilities. Grizzly's helps developers to build scalable and robust servers using NIO and is also offering extended framework components: Web Framework (HTTP/S), Bayeux Protocol, Servlet, HttpService OSGi and Comet.

Resources:

482 questions
119
votes
8 answers

Can not deserialize instance of java.lang.String out of START_OBJECT token

I'm running into an issue where my deployable jar hits an exception that doesn't happen when I run this locally in IntelliJ. Exception: Receiving an event {id=2, socket=0c317829-69bf-43d6-b598-7c0c550635bb, type=getDashboard,…
Ben
  • 60,438
  • 111
  • 314
  • 488
30
votes
3 answers

How to find out incoming RESTful request's IP using JAX-RS on Heroku?

I'm writing a Java RESTful service hosted on Heroku based on an example -> https://api.heroku.com/myapps/template-java-jaxrs/clone My sample service is: package com.example.services; import com.example.models.Time; import javax.ws.rs.GET; import…
Luke
  • 1,053
  • 2
  • 16
  • 26
23
votes
4 answers

Which NIO library (Netty, Grizzly, kryonet, ...) for simple backend server implementation in Java?

Our frontend is simple Jetty (might be replaced with Tomcat later on) server. Through servlets, we are providing a public HTTP API (more or less RESTful) to expose our product functionality. In the backend, we have a Java process which does several…
Japer D.
  • 754
  • 1
  • 9
  • 18
19
votes
1 answer

Set Query Parameters on a Jersey Test Call

I have a Jersey based Java servlet: @Path("foo") class Foo { @GET @Path("bar") public Response bar(@QueryParam("key") String value) { // ... } } I can call it in Tomcat just fine…
kwiqsilver
  • 1,017
  • 2
  • 11
  • 24
17
votes
4 answers

jersey 2: How to create custom HTTP param binding

I am trying to create a custom http param binding for my restful service. Please see the example below. @POST @Path("/user/{userId}/orders") @Produces(MediaType.APPLICATION_JSON) @Consumes(MediaType.APPLICATION_JSON) public MyResult…
yzandrew
  • 785
  • 1
  • 11
  • 25
14
votes
1 answer

Tyrus WebSockets (Java) - how to set client local ip address

Is there a way to specify the local ip-address and port when using WebSockets (Tyrus)? I'm looking for the same thing you can do with the full 4 parameters constructor of Socket EDIT: I have found that the low level Grizzly TCPNIOTransport does have…
Yasei No Umi
  • 1,574
  • 9
  • 23
14
votes
4 answers

grizzly http server should keep running

Below is the code to start Grizzly Http Server. If I press any key the server stops. Is there any way to keep it alive. Jetty has join() method, which will not exit the main program. Is there anything similar to that in Grizzly also. public static…
user2017420
  • 141
  • 1
  • 3
13
votes
3 answers

How to get instance of javax.ws.rs.core.UriInfo

Is there any implementation of javax.ws.rs.core.UriInfo which I can use to create an instance quickly for testing. This interface is long, I just need to test something. I don't want to waste time on whole implementation of this interface. UPDATE: I…
Aqeel Ashiq
  • 1,988
  • 5
  • 24
  • 57
13
votes
3 answers

How to enable CDI inject in web service (jaxrs/jersey) on java se running grizzly?

How do I allow CDI injection of resources into restful web service resources? I am running on standard java using weld 2 (cdi), jersey (jaxrs), and grizzly (web server). Here is my simple web resource: import…
Brice Roncace
  • 10,110
  • 9
  • 60
  • 69
12
votes
1 answer

Configuring Grizzly with a web.xml

I can start grizzly and deploy Jersey webservices on it with the following lines. protected HttpServer create() throws Throwable { ResourceConfig rc = new PackagesResourceConfig("com.resource", "com.provider"); HttpServer server =…
yves amsellem
  • 7,106
  • 5
  • 44
  • 68
12
votes
1 answer

Grizzly Server with static content and REST resource

I have a Jersey REST 2.5.1 service which is served through a Grizzly server. Everything works fine so far. I want to add some static content, which is also served through Grizzly and provided from my JAR file. Therefore I use CLStaticHttpHandler.…
qqilihq
  • 10,794
  • 7
  • 48
  • 89
12
votes
2 answers

Using filters with Grizzly server running a Jersey REST service

I'm trying to use Grizzly to create a server to run a REST service that I've developed using Jersey. I'm creating the Grizzly server using: final String baseUri = "http://localhost:9998/"; final Map initParams = new HashMap
Andy
  • 8,870
  • 1
  • 31
  • 39
11
votes
4 answers

Node.js vs Java for Comet application

We look to build a high-performance, scalable Comet server, and thought first about using Java Grizzly with GlassFish. But after some research, we see that Node.JS is taking rapidly as the preferred choice due to extreme simplicity, and claimed…
SyBer
  • 5,407
  • 13
  • 55
  • 64
11
votes
4 answers

GRIZZLY0023 Glassfish warning

I have deployed 2 web application in java on GlassFish server. I am using Glassfish Server 3.1.2.2. They both have java servlet pages from where they receive http requests, also the code is identical, only different parameters (for different…
AdrianES
  • 670
  • 3
  • 13
  • 29
11
votes
5 answers

SSL with Grizzly and Jersey

I'm trying to get grizzly to use SSL encryption and still work fine with Jersey. I've looked all over the Internet, and I find all kinds of different attempts at SSL with Grizzly and Jersey. Seems like there are different ways of doing it depending…
user1389906
  • 275
  • 1
  • 3
  • 12
1
2 3
32 33