Win a copy of Testing JavaScript Applications this week in the HTML Pages with CSS and JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Carey Brown

Which method is used to start a new asynchronous request/response cycle?

 
Ranch Hand
Posts: 101
Netbeans IDE Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
OCEJWCD Study Companion Third Edition, pg 200 question 3
The answers of this question are
A. ServletContext.newAsync()
B. ServletContext.startAsync()
C. ServletRequest.newAsync()
D. ServletRequest.runASync()
E. ServletRequest.getAsyncContext()

And the correct regards to the book is C, but I can find that method in the API.

The explanation of the book is that the method returns an AsyncContext but is executed on ServletRequest(not ServletContext).

Is it possible that the answer is ServletRequest.startAsync() and the book has a mistake?
 
Sheriff
Posts: 11604
178
Hibernate jQuery Eclipse IDE Spring MySQL Database AngularJS Tomcat Server Chrome Java
  • Likes 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I can only find ServletRequest.startAsync() in the JavaEE 6 API. So yes, I think the book has a mistake
 
Joey Sanchez
Ranch Hand
Posts: 101
Netbeans IDE Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Sebastien Minne wrote:Hi,

yes it's a mistake : https://coderanch.com/t/600322/java-Web-Component-SCWCD/certification/OCEJWCD-study-companion-errors



Have you got the complete Code Bundle of the book? because when I read chapter 18 it talks about a lot of code snippets and I couldn't find any!

Code bundle
 
Sebastien French
Greenhorn
Posts: 26
Firefox Browser Oracle Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
No, no way to get it ...
 
    Bookmark Topic Watch Topic
  • New Topic