Multipart file upload client for RESTFul web service (java/ example /httpclient)

Multipart file upload client: File upload client is capable of uploading different kind of files using apache httpclient. File upload client will upload files to RESTFul web service, exposing multipart resource. What is objective of File Upload client? File upload client will use “multipart/mixed” mime type. We have demonstrated the following file formats to be uploaded… Read More »

Sort objects on multiple fields /properties – Comparator interface (lambda stream java 8)

Given a the list of objects, we need to sort the objects by their multiple properties. We have used java 8 streams to sort the objects. In below example, we have take the Person object. We will sort the list of person objects by their firstName. Also we have shown the cascaded sorting wherein we have sorted the list on multiple fields.We have performed the following operations.

Jersey ExceptionMapper (user defined exceptions) in RESTful web Service

In this post, we will discuss Jersey (RESTFul Service) Exception mapper example for user defined or custom exceptions. We have already discussed, usage of standard exceptions in Example of ExceptionMapper – RESTFul web Service. We will create couple of user defined exceptions MyNullPointerException (extending NullPointerException). MyArithmeticException (extending ArithmeticException). We will define following exceptionmappers to catch application & user defined exceptions. ApplicationExceptionMapper… Read More »

Page 30 of 41« First...1020...2829303132...40...Last »