Sự khác biệt giữa servlet 3.0 và 3.1trong java [Non-blocking I/O, HTTP protocol (WebSocket)]

Written by IT Phú Trần on 29/06/2019 in Câu hỏi phỏng vấn and KINH NGHIỆM LẬP TRÌNH and LẬP TRÌNH JAVA and LẬP TRÌNH WEB VỚI JSP/SERVLET with 131 comments.

Servlet 3.0 đã được phát hành như một phần của Java EE 6 và đã thực hiện các thay đổi lớn tập trung vào tính dễ sử dụng. Ý tưởng là tận dụng các tính năng ngôn ngữ mới nhất, chẳng hạn như chú thích annotation và khái quát, và hiện đại hóa cách thức Servlets có thể được viết. Một trong những thay đổi trong version servlet 3.1 chính là Async Servlets. Servlet 3.1, được phát hành như một phần của Java EE 7, tập trung vào tính năng Non-blocking I/O.

Bài viết này tập trung đi vào ví dụ theo Oracle .

Có thể bạn quan tâm: 

Sự khác biệt servlet 2.5 và 3.0 trong java

Các bạn làm theo ví dụ dưới đây để hiểu hơn về tính năng Non-blocking I/O:

Tạo file index.jsp

File ReadListenerImpl.java

File WriteListenerImpl.java

Tạo file servlet: UploadServlet.java

Trên là ví dụ của oracle đưa ra cho một ví dụ cụ thể non-blocking.

Các bạn có thể đọc và tìm hiểu thêm tại:

Link:

  1. https://en.wikipedia.org/wiki/Java_servlet#History
  2. https://www.oracle.com/webfolder/technetwork/tutorials/obe/java/HTML5andServlet31/HTML5andServlet%203.1.html#section6

131 Responses to “Sự khác biệt giữa servlet 3.0 và 3.1trong java [Non-blocking I/O, HTTP protocol (WebSocket)]

  1. I simply want to say I am all new to blogging and site-building and actually enjoyed your blog site. Probably I’m likely to bookmark your website . You really come with awesome articles. Thanks a bunch for revealing your website.

  2. I have observed that in the world the present moment, video games are classified as the latest phenomenon with children of all ages. Occasionally it may be difficult to drag young kids away from the games. If you want the very best of both worlds, there are lots of educational activities for kids. Interesting post.

  3. I’m impressed, I have to admit. Rarely do I come across a blog that’s equally educative and interesting, and let me tell you, you have hit the nail on the head. The issue is something which not enough folks are speaking intelligently about. Now i’m very happy I found this during my search for something relating to this.

  4. I have realized some points through your blog post. One other stuff I would like to express is that there are plenty of games available and which are designed specially for preschool age young children. They incorporate pattern acknowledgement, colors, family pets, and models. These often focus on familiarization as an alternative to memorization. This makes a child occupied without having the experience like they are learning. Thanks

  5. I’m pretty pleased to discover this page. I want to to thank you for your time just for this wonderful read!! I definitely loved every part of it and i also have you bookmarked to look at new stuff in your blog.

  6. That is a good tip especially to those new to the blogosphere. Simple but very accurate information… Thank you for sharing this one. A must read post!

  7. Good post. I learn something totally new and challenging on sites I stumbleupon every day. It will always be useful to read through articles from other authors and practice a little something from other sites.

  8. I’m impressed, I must say. Rarely do I encounter a blog that’s both educative and amusing, and without a doubt, you have hit the nail on the head. The issue is something too few folks are speaking intelligently about. I’m very happy I came across this during my search for something regarding this.

  9. May I just say what a relief to discover someone who truly understands what they are discussing on the internet. You definitely know how to bring an issue to light and make it important. A lot more people need to read this and understand this side of your story. I was surprised you’re not more popular since you definitely possess the gift.

  10. MetroClick specializes in building completely interactive products like Photo Booth for rental or sale, Touch Screen Kiosks, Large Touch Screen Displays , Monitors, Digital Signages and experiences. With our own hardware production facility and in-house software development teams, we are able to achieve the highest level of customization and versatility for Photo Booths, Touch Screen Kiosks, Touch Screen Monitors and Digital Signage. Visit MetroClick in NYC at http://www.metroclick.com/ or , 121 Varick St, New York, NY 10013, +1 646-843-0888.

  11. Sapid Agency is a Search Engine Optimization company in New York City that provides SEO Services. Their proprietary SEO strategies help struggling websites and aspiring business owners to rank their websites higher in multiple search engines like Google , Yahoo and Bing. They provide local and gmb map ranking for businesses in NYC and many other local areas. Find more at https://www.sapidagency.com/ @ 145 E 57TH NEW YORK, NY 10022, USA, +1 971 341 5608 USA

  12. I’m impressed, I have to admit. Rarely do I encounter a blog that’s both equally educative and entertaining, and let me tell you, you have hit the nail on the head. The problem is something that too few folks are speaking intelligently about. Now i’m very happy that I found this during my search for something relating to this.

  13. The very next time I read a blog, I hope that it won’t fail me as much as this one. I mean, Yes, it was my choice to read through, however I really believed you would probably have something helpful to talk about. All I hear is a bunch of complaining about something that you could possibly fix if you weren’t too busy looking for attention.

  14. It’s amazing to pay a quick visit this web site and reading the views of all colleagues
    on the topic of this post, while I am also keen of getting know-how.

  15. I do not even know the way I finished up here, however I thought this post was
    great. I don’t understand who you might be but definitely
    you are going to a famous blogger should you are not already.
    Cheers!

  16. Wow, that’s what I was exploring for, what a material! existing here at this web site, thanks admin of this web page.

  17. Because the admin of this web page is working, no uncertainty
    very soon it will be well-known, due to its feature contents.

  18. Hey there, I think your blog might be having browser
    compatibility issues. When I look at your blog in Safari, it looks fine but when opening in Internet Explorer,
    it has some overlapping. I just wanted to give you a quick
    heads up! Other then that, terrific blog!

  19. I do not even know how I stopped up here, however I thought
    this post used to be great. I don’t recognize who you’re however definitely
    you are going to a famous blogger should you
    aren’t already. Cheers!

  20. Wow! This blog looks exactly like my old one!
    It’s on a totally different subject but it has pretty much the same
    layout and design. Excellent choice of colors!

  21. Nice post. I learn something totally new and challenging on blogs I stumbleupon everyday. It will always be interesting to read through articles from other writers and use a little something from their websites.

  22. Hello to every one, the contents present at this website are genuinely remarkable for people knowledge, well, keep up the nice work fellows.

  23. Hey! Quick question that’s entirely off topic.
    Do you know how to make your site mobile friendly?

    My weblog looks weird when browsing from my apple iphone.

    I’m trying to find a theme or plugin that might be able
    to correct this issue. If you have any suggestions, please share.
    Thank you!

  24. Greetings! Very useful advice within this article!
    It is the little changes which will make the greatest changes.
    Thanks for sharing!

  25. I was suggested this website by my cousin. I am not
    sure whether this post is written by him as no one else know
    such detailed about my trouble. You’re incredible!

    Thanks!

  26. Hello to all, it’s genuinely a fastidious for
    me to pay a visit this web site, it consists of helpful Information.

  27. Howdy, I think your website could be having web browser compatibility issues.

    When I take a look at your web site in Safari, it looks fine however when opening in IE, it’s got some overlapping issues.
    I just wanted to provide you with a quick heads up!
    Apart from that, wonderful blog!

  28. My developer is trying to convince me to move to .net from
    PHP. I have always disliked the idea because of the costs.
    But he’s tryiong none the less. I’ve been using WordPress on several
    websites for about a year and am nervous about
    switching to another platform. I have heard very good things
    about blogengine.net. Is there a way I can transfer all my wordpress
    content into it? Any help would be really appreciated!

  29. A fascinating discussion is worth comment. There’s no doubt that that you need to publish more about this issue,
    it might not be a taboo subject but usually people do not discuss
    these topics. To the next! All the best!!

  30. Thank you for every other wonderful article.
    Where else could anyone get that type of information in such an ideal approach of writing?
    I have a presentation next week, and I am on the look for such information.

  31. I really like looking through a post that can make men and women think.

    Also, thanks for allowing me to comment!

  32. Wow that was odd. I just wrote an very long comment but after I clicked submit
    my comment didn’t appear. Grrrr… well I’m not writing all that over
    again. Anyways, just wanted to say fantastic blog!

  33. Quality posts is the crucial to interest the people to pay a quick
    visit the site, that’s what this website is
    providing.

  34. Since the admin of this site is working, no hesitation very rapidly it will be well-known, due to its quality contents.

  35. I simply could not depart your site before suggesting that I really enjoyed the standard information a person provide to your
    guests? Is gonna be back frequently in order to check up on new posts

  36. I have read so many content on the topic of the blogger lovers however
    this post is actually a pleasant paragraph, keep it up.

  37. Hi there! This post could not be written any better!
    Reading through this post reminds me of my old room mate!
    He always kept chatting about this. I will forward this article to him.

    Pretty sure he will have a good read. Thank you for sharing!

  38. Hurrah, that’s what I was seeking for, what a data! existing here at this web
    site, thanks admin of this web site.

  39. I think the admin of this web site is actually working hard for his site,
    for the reason that here every data is quality based material.

  40. Hi, I believe your site could be having internet browser compatibility problems. Whenever I take a look at your site in Safari, it looks fine however when opening in Internet Explorer, it’s got some overlapping issues. I simply wanted to give you a quick heads up! Besides that, fantastic blog!

  41. Thank you for every other informative web site. Where
    else could I get that type of info written in such
    an ideal way? I have a venture that I’m just
    now running on, and I’ve been on the glance out for such info.

  42. Good blog you’ve got here.. It’s hard to find excellent writing like yours nowadays. I seriously appreciate individuals like you! Take care!!

  43. I pay a quick visit every day some websites and sites
    to read articles or reviews, except this web site offers quality based
    articles.

  44. Greetings! Very useful advice within this article! It is the little changes that will make the biggest changes. Thanks a lot for sharing!

  45. Superb blog you have here but I was wondering if you knew of
    any user discussion forums that cover the same topics discussed
    here? I’d really love to be a part of online community
    where I can get opinions from other experienced individuals that
    share the same interest. If you have any suggestions,
    please let me know. Thanks a lot!

  46. Howdy! I could have sworn I’ve visited this website before but after browsing through many of the posts I realized it’s new to me. Nonetheless, I’m certainly happy I discovered it and I’ll be bookmarking it and checking back often!

  47. Pretty part of content. I just stumbled upon your web site and in accession capital to claim that
    I get in fact loved account your blog posts. Any way I will be subscribing to your augment and even I fulfillment you get
    entry to consistently fast.

  48. Hello, I think your website might be having browser compatibility issues.
    When I look at your blog in Opera, it looks fine but when opening in Internet Explorer,
    it has some overlapping. I just wanted to give you a quick
    heads up! Other then that, terrific blog!

  49. Ahaa, its pleasant dialogue on the topic of this post at this
    place at this webpage, I have read all that, so now me also commenting here.

  50. I’m not that much of a online reader to be honest but your blogs really nice,
    keep it up! I’ll go ahead and bookmark your site to come back
    down the road. Cheers

  51. Greetings! I know this is kinda off topic but I’d figured I’d ask.
    Would you be interested in trading links or maybe guest
    authoring a blog post or vice-versa? My site discusses a lot of the same subjects as yours and
    I think we could greatly benefit from each other. If you’re interested feel free to shoot me an e-mail.
    I look forward to hearing from you! Great blog by the way!

  52. I am curious to find out what blog platform you’re using?
    I’m experiencing some small security issues with my latest blog and
    I’d like to find something more safeguarded.

    Do you have any recommendations?

  53. I have read so many articles or reviews concerning the blogger lovers however this paragraph is really a good post,
    keep it up.

  54. This website was… how do you say it? Relevant!! Finally I’ve found something which helped me. Appreciate it!

  55. Woah! I’m really enjoying the template/theme of this blog.
    It’s simple, yet effective. A lot of times it’s difficult to get that “perfect balance”
    between usability and visual appeal. I must say you’ve done a
    very good job with this. In addition, the blog loads extremely fast for me on Firefox.

    Excellent Blog!

  56. I blog frequently and I seriously appreciate your content. This great article has really peaked my interest. I’m going to take a note of your site and keep checking for new information about once per week. I subscribed to your RSS feed too.

  57. I simply hope to notify you that I am new to wordpress blogging and very much admired your post. Very likely I am prone to bookmark your blog post . You indeed have superb article information. Appreciate it for telling with us your main site article

  58. First off I would like to say terrific blog! I had
    a quick question that I’d like to ask if you do not mind.
    I was curious to find out how you center yourself and clear your thoughts before writing.
    I’ve had a hard time clearing my thoughts in getting my thoughts out there.
    I truly do enjoy writing but it just seems like the first 10 to 15 minutes
    are usually lost simply just trying to figure out how to begin. Any recommendations or tips?
    Appreciate it!

  59. Spot on with this write-up, I actually believe this web site needs a lot more attention. I’ll probably be back again to read through more, thanks for the advice!

  60. Great web site you have got here.. It’s hard to find quality writing like yours nowadays. I really appreciate individuals like you! Take care!!

  61. Good day! I could have sworn I’ve visited this website before but after looking at some of the posts I realized it’s new to me. Anyhow, I’m definitely pleased I came across it and I’ll be book-marking it and checking back often.

  62. You’ve made some decent points there. I checked on the web for more information about the issue and found most individuals will go along with your views on this site.

  63. It’s practically impossible to find well-aware individuals on this area, yet somehow you seem like you fully understand the things you’re talking about! With Thanks

  64. Having read this I believed it was really informative. I appreciate you spending some time and effort to put this information together. I once again find myself personally spending a lot of time both reading and leaving comments. But so what, it was still worthwhile.

  65. I’m very pleased to uncover this great site. I need to to thank you for your time due to this fantastic read!! I definitely appreciated every bit of it and i also have you bookmarked to check out new things in your site.

  66. I’m impressed, I must say. Seldom do I come across a blog that’s both equally educative and amusing, and let me tell you, you’ve hit the nail on the head. The problem is an issue that not enough men and women are speaking intelligently about. I am very happy I came across this in my hunt for something regarding this.

  67. I’m amazed, I must say. Rarely do I encounter a blog that’s both educative and interesting, and without a doubt, you’ve hit the nail on the head. The problem is something too few men and women are speaking intelligently about. I am very happy that I came across this during my search for something concerning this.

  68. Oh my goodness! Impressive article dude! Thank you, However I am experiencing troubles with your RSS. I don’t know why I can’t join it. Is there anyone else having the same RSS issues? Anyone that knows the answer will you kindly respond? Thanx!

  69. I have recently started a website, the info you offer on this site has helped me greatly. Thanks for all of your time & work. “The only winner in the War of 1812 was Tchaikovsky” by Solomon Short.

  70. Hello! I just want to offer you a huge thumbs up for your great information you’ve got here on this post. I will be returning to your site for more soon.

  71. This is the right web site for anybody who hopes to understand this topic. You know so much its almost hard to argue with you (not that I actually would want to…HaHa). You definitely put a fresh spin on a topic that has been discussed for years. Excellent stuff, just wonderful.

  72. Hi, I do believe this is a great blog. I stumbledupon it 😉 I’m going to revisit yet again since i have book marked it. Money and freedom is the greatest way to change, may you be rich and continue to help other people.

  73. Having read this I thought it was very enlightening. I appreciate you taking the time and effort to put this short article together. I once again find myself spending a significant amount of time both reading and commenting. But so what, it was still worth it!

  74. I blog often and I genuinely appreciate your information. This great article has truly peaked my interest. I am going to take a note of your website and keep checking for new information about once a week. I subscribed to your RSS feed as well.

  75. Aw, this was an incredibly good post. Taking a few minutes and actual effort to create a very good article… but what can I say… I procrastinate a lot and never seem to get nearly anything done.

  76. You’ve made some good points there. I checked on the internet to find out more about the issue and found most individuals will go along with your views on this site.

  77. I was extremely pleased to discover this page. I wanted to thank you for ones time for this particularly wonderful read!! I definitely savored every little bit of it and I have you book-marked to see new things on your website.

  78. Good web site you’ve got here.. It’s hard to find quality writing like yours these days. I really appreciate people like you! Take care!!

  79. Aw, this was a very nice post. Taking the time and actual effort to create a top notch article… but what can I say… I hesitate a lot and never manage to get nearly anything done.

  80. An outstanding share! I have just forwarded this onto a coworker who had been conducting a little research on this. And he in fact ordered me dinner simply because I found it for him… lol. So allow me to reword this…. Thank YOU for the meal!! But yeah, thanks for spending time to discuss this topic here on your site.

  81. You’re so interesting! I do not believe I’ve read through anything like this before. So good to discover somebody with original thoughts on this subject. Seriously.. thanks for starting this up. This web site is something that’s needed on the internet, someone with a little originality.

  82. Having read this I believed it was rather informative. I appreciate you finding the time and effort to put this informative article together. I once again find myself personally spending a significant amount of time both reading and commenting. But so what, it was still worth it.

  83. May I simply say what a comfort to discover someone that truly knows what they’re talking about online. You definitely understand how to bring an issue to light and make it important. More and more people have to look at this and understand this side of your story. It’s surprising you are not more popular since you surely have the gift.

  84. That is a very good tip especially to those new to the blogosphere. Short but very precise information… Appreciate your sharing this one. A must read post.

  85. You’ve made some good points there. I looked on the internet for additional information about the issue and found most people will go along with your views on this web site.

Trả lời

Email của bạn sẽ không được hiển thị công khai. Các trường bắt buộc được đánh dấu *