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
6
votes
1 answer

Difference between GrizzlyServerFactory.createHttpServer and new GrizzlyWebServer WebServer

I am creating RESTful web services using Jersey and an embedded Grizzly web server. I see that there are two ways to create an embedded Grizzly web server. Can anyone tell me the difference between the two? public static void main(String[] args)…
Sagar Bhosale
  • 71
  • 1
  • 3
6
votes
2 answers

How does Grizzly fit in with Glassfish?

I know Glassfish uses a component called Grizzly but I am unsure of to exactly what role Grizzly performs. I have read that it is a 'front-end' for Glassfish. Is this correct? What exactly does Grizzly do, say when a HTTP request comes in or a…
sonicboom
  • 4,928
  • 10
  • 42
  • 60
5
votes
1 answer

Embedded Java server using Grizzly: How do you enable http2

So I am trying to create a REST API server using Grizzly / Jersey and it is working fine but I am not able to figure out how to enable http2. Documentation on this subject is all but non-existent. This is what I have: private static SSLContext…
5
votes
1 answer

Get client ip in Jersey 2.22.2

I am trying to access the clients IP that are calling my rest server but I only get null as a response. The web-server is running and I can access it from the web browser. I have tried with @Context HttpServletRequest And also with @Context…
Fredrik
  • 484
  • 4
  • 13
5
votes
1 answer

GlassFish 4, Grizzly Framework 2.3.23: Instance could not be initialized. Class=interface org.glassfish.grizzly.http.server.AddOn

While starting GlassFish 4.1.1 server (Grizzly Framework 2.3.23), below warning message is displayed: Instance could not be initialized. Class=interface org.glassfish.grizzly.http.server.AddOn Do Grizzly Framework 2.3.23 to be separately installed…
Vivaswan
  • 337
  • 4
  • 17
5
votes
1 answer

how to disable chunked-transfer-encoding in grizzly based http-server

I am developing a grizzly-based-server that should communicate with a lot of clients. Basically, I created a listener that listens to a specific port and I add this listener to my http-server-instance. Since I need very simple communication between…
amitakCs
  • 355
  • 9
  • 25
5
votes
2 answers

Bean Validation 400 errors are returning default error page (html) instead of Response entity (json)

I have a JUnit testsuite: GrizzlyHttpServerFactory + Jersey + Bean Validation (jersey-container-grizzly2-servlet/jersey-bean-validation ver 2.12, grizzly-http-server ver 2.3.16, hibernate-validator ver 5.0.0.Final) The 400 errors generated by a…
mwnorman
  • 111
  • 2
  • 5
5
votes
1 answer

Programmatically add servlet to embedded grizzly

I am trying to integrate Swagger into my Java SE Application which is running an embedded grizzly server. To acchieve this i was following this tutorial and I'am shure that I'm 90% there. I want to configure swagger using this…
Zounadire
  • 1,496
  • 2
  • 18
  • 38
5
votes
1 answer

How to setup template base path for Jersey in Grizzly http server?

With Apache Jersey and Grizzly http server, how do I setup base template path ? Since I'm not using Servlet container, I assign template base path with absolute file path. But Jersey response a 404. Following is my project setup Project Directory…
Rangi Lin
  • 9,303
  • 6
  • 45
  • 71
5
votes
2 answers

Where to hook up authentication in Grizzly?

I'm using a Grizzly HttpServer which has two HttpHandler instances registered: under /api/* there is an Jersey REST - style application offering the API of the product, and under /* there is an StaticHttpHandler which serves static HTML /…
Waldheinz
  • 10,399
  • 3
  • 31
  • 61
5
votes
1 answer

GrizzlyWebServer + Spring + Jersey + serve static content from within JAR

I'm trying to deploy Jersey-Spring based REST API using Grizzly's com.sun.grizzly.http.embed.GrizzlyWebServer. I also want to serve static content using the same. Here is what I have: String host = "localhost"; int port = 8081; // For jersey +…
codemaniac
  • 879
  • 1
  • 11
  • 31
5
votes
1 answer

Integration Grizzly2.2.X with Jersey and Spring

I have successfully integrated Grizzly v2.1.9 with Jersey and Spring. But could not make it work when trying to migrate Grizzly to version 2.2.19. The original code with Grizzly v2.1.9 is as below. HttpServer server = new…
Willy
  • 1,828
  • 16
  • 41
4
votes
1 answer

How to fix "org.glassfish.jersey.inject.hk2.RequestContext.RequestContext must be in the Singleton scope"

I'd like to implement a simple REST-API with Jersey and grizzly. After beeing stuck in dependency-hell for a while, I ended up with an exception and I have no idea how to handle/interpret: java.lang.IllegalArgumentException: The implementation class…
MUmla
  • 445
  • 1
  • 8
  • 26
4
votes
0 answers

Jersey + Grizzly Http Container + shared ServiceLocator + custom Worker Thread Pool

I need to change the thread pool of the underlying Grizzly transport layer. According to the docs of GrizzlyHttpServerFactory: Should you need to fine tune the underlying Grizzly transport layer, you can obtain direct access to the corresponding…
Luca Sepe
  • 2,435
  • 1
  • 20
  • 26
4
votes
4 answers

how to deploy jar file to azure?

I've created a RESTFul service using grizzly and google guice. I am able to access it running on the command line: c:\Java\src\options\console>java -jar target\ServerConsole-V1.jar Nov 28, 2017 3:18:01 PM…
tatmanblue
  • 1,176
  • 2
  • 14
  • 30