SpringFramework_2012

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

Back to Item Set

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

What is a correct way to support 'Last-Modified' HTTP requests, i.e. to check 'If-Modified-Since' header value and return response with status code 304 (Not Modified) if resource is not modified, in a controller method?

</div>

Select 1 correct answer(s)!

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

Call <tt>org.springframework.web.context.request.WebRequest.checkNotModified(String lastModifiedTimestamp)</tt> and return <tt>HttpStatus.NOT_MODIFIED</tt> if "true".
 

</li>
<li>

Call <tt>org.springframework.web.context.request.WebRequest.checkNotModified(String lastModifiedTimestamp)</tt> and return <tt>null</tt> if "true".

</li>
<li>

Call <tt>org.springframework.web.context.request.ServletWebRequest.checkNotModified(long lastModifiedTimestamp)</tt> and return <tt>HttpStatus.NOT_MODIFIED</tt> if "true".

</li>
<li>

Call <tt>org.springframework.web.context.request. ServletWebRequest.checkNotModified(long lastModifiedTimestamp)</tt> and return <tt>null</tt> if "true".

</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:17
    
This wiki is licensed under a Creative Commons 2.0 license
XWiki Enterprise 6.4 - Documentation