-3

which one is better for implementing restful architecture?

jax-rs example :

 @GET @Produces(MediaType.TEXT_XML) public String sayXMLHello() { return xmlHello(); } 

servlet example :

 protected void doGet( HttpServletRequest request , HttpServletResponse response ) throws ServletException , IOException { //showUsers( response); } 

UPDATE:

I can't DELETE THIS QUESTION... Please do not give me a negative rating... thanks.

And so, I prefer to use servlet for implementing the restful... Because of making easy and flexible designs...

0

1 Answer 1

1

This decision is entirely up to you and is primarily matter of preference.

However, Jax-RS will provide utilities (via annotations) which lead to cleaner code when developing RESTful applications.

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.