Memorynotfound Java Programming Tutorials
Low Level Streaming with JAX-RS StreamingOutput
When working with large data or files, it is recommended to stream the output rather than loading the entire response into memory. This helps protect the servers resources and avoids getting out of memory...
How to parse User-Agent using Java
In this tutorial we show you how to parse a user-agent string to get the information about the browser and operating system. We compare two open source libraries with each other and list the...
JAX-RS Path Segments and Matrix Parameters
Matrix Parameters are different from Query Parameters. Query parameters are typically placed at the end of the URI using the ? character. Matrix Parameters can be placed in every URI segment using the ;...
JAX-RS @BeanParam Example
The @BeanParam annotation is added to the JAX-RS 2.0 specification. It allows you to inject a pojo whose property methods or fields are annotated with any of the injection parameters supported by JAX-RS. To...
JAX-RS @CookieParam CRUD Example
Cookies are used to set up a session between the client and server or to remember the identity and user preferences between requests. These cookie values are transmitted to and from the client and...
JAX-RS @FormParam Example
We can post an HTML form directly to our JAX-RS service, we can read the request bodies by mapping the fields using the @FormParam annotation. Lets show how this works by a simple example....
Get HTTP Header Parameter in JAX-RS
When you need to get HTTP Header parameters with JAX-RS, you have a couple of options. You can use the @HeaderParam annotation provided by JAX-RS, Inject the HttpHeaders directly or inject the HttpServletRequest. Let’s...
JAX-RS @PathParam Example
The JAX-RS @PathParam annotation allows you to inject the value of named URI path parameters that were defined in the @Path annotation expression. In this example we’ll explore the different ways you can use...
JAX-RS @QueryParam Example
The JAX-RS @QueryParam annotation allows you to inject URI query parameters into your Java parameters. These query parameters are represented as a string of characters within the HTTP request. JAX-RS can convert this string...