Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

doGet invocation

 
Ronan Dowd
Ranch Hand
Posts: 84
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,

Looking at the sample exam at http://www.cafe4java.com/mockexams/scwcd/mock1/q4.php
The correct answers that it gives are A, B and C.
It says that 'D' is incorrect because "...'doGet' is not a valid option for the attribute 'method' of tag 'form'. The correct value is 'GET'..."

I thought that it the value for the 'method' was anything which wasn't valid and recognized, i.e values such as 'blah' or 'doGet' or 'GGET' (mis-spelt) that it defaults to 'GET' in this case ?

Any thoughts would be great.
Cheers. Ro
 
Mohamed Sanaulla
Saloon Keeper
Posts: 3165
34
Google App Engine Java Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ronan Dowd wrote:I thought that it the action was anything which wasn't valid and recognized, i.e values such as 'blah' or 'doGet' or 'GGET' (mis-spelt) that it defaults to 'GET' in this case ?


I think when not mentioned it defaults to GET. Otherwise it will complain that the type of method is not identified or not known.
 
Frits Walraven
Creator of Enthuware JWS+ V6
Saloon Keeper
Pie
Posts: 2534
113
Android Chrome Eclipse IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Ronan,

It says that 'D' is incorrect because "...'doGet' is not a valid option for the attribute 'method' of tag 'form'. The correct value is 'GET'..."
I thought that it the value for the 'method' was anything which wasn't valid and recognized

The answer to this lies in the specifications: what is mentioned about handing requests with a unknown method? Actually nothing (at least I couldn't find anything).
The behaviour you are seeing makes sense, but it is not mandated by the specs. You shouldn't get a question like this on the exam.

Regards,
Frits
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic