This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Web Component Certification (SCWCD/OCPJWCD) and the fly likes Cafe4Java Mock question Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Certification » Web Component Certification (SCWCD/OCPJWCD)
Bookmark "Cafe4Java Mock question" Watch "Cafe4Java Mock question" New topic

Cafe4Java Mock question

Nidhi Sar
Ranch Hand

Joined: Oct 19, 2009
Posts: 252

This question is from Cafe4Java mock SCWCD exam :

Q4) Which of the following events/ code will invoke the GET (doGet) method of a servlet?

<form action="/servlet/Cafe4Java" method="GET">

<form action="/servlet/Cafe4Java">

<a href="">Cafe4Java

<form action="/servlet/Cafe4Java" method="doGet">

The correct answers given are: A, B, C

I'm doubtful about the choice C. Is hyperlink-clicking the way to access doGet() method of a servlet?


"A problem well stated is a problem half solved.” - Charles F. Kettering
Piotr Nowicki
Ranch Hand

Joined: Jul 13, 2010
Posts: 610

And why do you think it isn't?

Hint: isn't the typing an URL into the browser somewhat similar to clicking a hyperlink?

OCP Java SE 6 Programmer, OCM Java SE 6 Developer, OCE Java EE 6 JSPSD, OCE Java EE 6 EJBD, OCE Java EE 6 JPAD, Spring 3.0 Core Professional.
Nidhi Sar
Ranch Hand

Joined: Oct 19, 2009
Posts: 252

Hi Pedro, yes it should be invoke GET method. Thanks.
I agree. Here's the link:
subject: Cafe4Java Mock question
Similar Threads
Map Doubt
doPost method ?
Confusion on doGet
Doubt in enums
cafe4java doubt