SpringFramework_2011

Last modified by superadmin on 2018-01-12 20:20

Back to Item Set

<p/>
<!-- START TestItem -->
<p/>
<div class="TestItem">
<div class="TestItemQuestion">2011 Question:\

What response status code will be returned to a client to the request:
"\<DispatcherServlet path\>/order?id=10", by the following code.

{code}
@ResponseStatus(value=HttpStatus.NOT_ACCEPTABLE)
public class InputNotAcceptableException extends RuntimeException {}

@Controller
public class OrderController {
    @RequestMapping(value="/order")
    public String viewOrder(@RequestParam("id") Long id){
     if (id < 1000){
      throw new InputNotAcceptableException();
     }
     ...
    }
}
{code}

</div>

Select 1 correct answer(s)!

<p/>
<ol class="MTestItemChoices" type='A'>
<li>

402

</li>
<li>

404

</li>
<li>

406

</li>
<li>

500

</li>
</ol>
<p/>
<div class="TestItemSkill"><!--$skillid>Skill: $skilltitle</div>
<p/>
</div>
<!-- END MTestItem -->
<p/>
<p/>


{{/velocity}}

Tags:
Created by Alina Vasiljeva on 2013-01-13 18:15
    
This wiki is licensed under a Creative Commons 2.0 license
XWiki Enterprise 6.4 - Documentation