RESTful JAVA Web Services Interview Questions You'll Most Likely

Price: $19.95
Sale: $15.76
Save: 21% off


RESTful JAVA Web Services Interview Questions You'll Most Likely Be Asked is a perfect companion to stand ahead above the rest in today’s competitive job market. Rather than going through comprehensive, textbook-sized reference guides, this book includes only the information required immediately for job search to build an IT career. This book puts the interviewee in the driver's seat and helps them steer their way to impress the interviewer.



Table of Contents
1. RESTful Basics / Annotations
2. Deploying a RESTful Web Service
3. Request Parameters
4. Responses
5. Sub-Resources
6. Building URIs
7. Exceptions as Responses
8. Life Cycle
9. Injection
10. Params Extraction
11. Jersey
12. JSON
13. Links
14. JAX-RS client - Jersey Client API
15. HR Questions



a) 203 RESTful JAVA Web Services Interview Questions, Answers and Proven Strategies for getting hired as an IT professional

b) Dozens of examples to respond to interview questions

c) 51 HR Questions with Answers and Proven strategies to give specific, impressive, answers that help nail the interviews

d) 2 Aptitude Tests download available on



Sample from the book
(Below Questions and Answers are randomly taken from different pages of the book)

37: Can RESTful Web Services support multiple types of response (MIME) formats?


RESTful Web Services, by confirming to HTTP, does support multiple types of response (MIME) formats e.g. XML, JSON, PLAIN etc


40: What does HATEOAS mean?


Hypermedia As The Engine Of Application State (HATEOAS) means that state of the exchange in a session is neither kept by the client nor server. All the necessary information is stored in the exchanged HTTP messages


47: How will you declare JAX-RS application details in web.xml?

As per JAX-RS 1.1 specifications, a fully qualified name of the class implementing Application has to be declared in the <servlet-name> element of the JAX-RS application's web.xml.
This is supported in a Web container implementing Servlet 3.0.

element is not required in the servlet declaration.


53: How to declare default value of resource method parameter?

@Default annotation is used to declare default value of resource method parameter.

public Response getName(@DefaultValue("1") @QueryParam("id") int id){


56: Review the following resource method. If query parameter is not present in the request, what will be the value of resource method parameter 'id'?
public Response getName(@QueryParam("id") int id){

JAVA primitive types get JAVA-defined default values if not present in the query parameter. In the given scenario, id will be 0.


Questions 86, 87, 88 are based on the following code snippet


public class AResource {

public String doGetAsPlainText() {

public String doGetAsHtml() {


86: Which MIME type can be produced by doGetAsPlainText()?

doGetAsPlainText() can produce text/plain which is defined at class level.


87: doGetAsHtml() declares that it produces text/html where as the class is declaring that it produces text/plain. Does this mean that doGetAsHtml() produces text/plains and text/html?

No. doGetAsHtml() is overriding the class defined MIME type and is producing only text/plain.


88: If AResource is capable of producing more than one MIME media type, how will the resource method be chosen?

The most acceptable media type declared by the client is the accept header, defines which resource method will be chosen and executed.


140: Give an example of JAXB Bean that could be used with JAXB JSON approach.

JAXB bean for JSON is simply a JAVA Bean annotated with JAXB annotations. e.g.

public class TestBean {
public String name;
public int id;
public TestBean() {}
public TestBean(String name, int id) { = name; = id;


141: How can you produce JSON from a resource method?

A resource method can be annotated with @Produces ("application/json") in order to produce application / JSON response.
public MyTestBean getMyBean() {
return new TestBean("abc", 1);

Where TestBean is a JAXB annoted bean class.


Customers who bought this product also purchased...