• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

doGet invocation

 
Ranch Hand
Posts: 84
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Bartender
Posts: 3225
34
IntelliJ IDE Oracle Spring Chrome Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Creator of Enthuware JWS+ V6
Posts: 3411
320
Android Eclipse IDE Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
reply
    Bookmark Topic Watch Topic
  • New Topic