<p dir="auto"><strong><a href="https://jira.spring.io/secure/ViewProfile.jspa?name=kdonald" rel="nofollow">Keith Donald</a></strong> opened <strong><a href="https://jira.spring.io/browse/SPR-4747?redirect=false" rel="nofollow">SPR-4747</a></strong> and commented</p>
<p dir="auto">Web Flow 2 introduces the following prefixes for specifying a location to redirect to, either via the flow itself using an externalRedirect: or a managing FlowHandler, which is a Spring MVC integration class.  It should be possible to get the same level of control in Spring MVC, and we should try to make the semantics as consistent as possible between MVC and Web Flow:</p>
<p dir="auto">Web Flow 2 location redirect rules:</p>
<ul dir="auto">
<li>The following prefixes are supported for qualifying the returned location string:</li>
<li></li>
</ul>
<p dir="auto">&lt;ul&gt;<br>
*</p>
<p dir="auto">&lt;li&gt;servletRelative: - the location is relative to the current servlet&lt;/li&gt;<br>
*</p>
<p dir="auto">&lt;li&gt;contextRelative: - the location is relative to the current web application&lt;/li&gt;<br>
*</p>
<p dir="auto">&lt;li&gt;serverRelative: - the location is relative to the server root&lt;/li&gt;<br>
*</p>
<p dir="auto">&lt;li&gt;url: - the location is a fully qualified URL to an external resource&lt;/li&gt;<br>
*</p>
<p dir="auto">&lt;/ul&gt;</p>
<ul dir="auto">
<li>Also, if the returned location no prefix, for example "/hotels/index", the location is treated as relative to the</li>
<li>current servlet by default.</li>
<li></li>
</ul>
<p dir="auto">&lt;p&gt;</p>
<ul dir="auto">
<li>For servlet-relative, context-relative, and server-relative URLs, a leading slash is optional.</li>
</ul>
<p dir="auto">Within an XML flow, the externalRedirect directive to request a redirect to a location would look like this:</p>
<p dir="auto">externalRedirect:/servlet-relative-path<br>
externalRedirect:servletRelative:/path<br>
externalRedirect:contextRelative:/path<br>
externalRedirect:serverRelative:/path<br>
externalRedirect:url:<a href="http://whatever" rel="nofollow">http://whatever</a></p>
<hr>
<p dir="auto"><strong>Affects:</strong> 2.5.3</p>
<p dir="auto"><strong>Issue Links:</strong></p>
<ul dir="auto">
<li><a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="398105355" data-permission-text="Title is private" data-url="https://github.com/spring-projects/spring-framework/issues/11888" data-hovercard-type="issue" data-hovercard-url="/spring-projects/spring-framework/issues/11888/hovercard" href="https://github.com/spring-projects/spring-framework/issues/11888">#11888</a> Add a shortcut for specifying the application context root in logical view name in a Controller. (<em><strong>"is duplicated by"</strong></em>)</li>
<li><a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="398071674" data-permission-text="Title is private" data-url="https://github.com/spring-projects/spring-framework/issues/7380" data-hovercard-type="issue" data-hovercard-url="/spring-projects/spring-framework/issues/7380/hovercard" href="https://github.com/spring-projects/spring-framework/issues/7380">#7380</a> RedirectView with more flexible URL-building</li>
</ul>
<p dir="auto">4 votes, 6 watchers</p>
<p dir="auto"><strong><a href="https://jira.spring.io/secure/ViewProfile.jspa?name=robertm" rel="nofollow">Robert Macaulay</a></strong> opened <strong><a href="https://jira.spring.io/browse/SPR-3398?redirect=false" rel="nofollow">SPR-3398</a></strong> and commented</p>
<p dir="auto">If you make a call to preventTransaction() in a subclass of AbstractTransactionalSpringContextTests , its onSetup method wont call onSetUpBeforeTransaction or onSetUpInTransaction, leaving your testcase without a setup method(since all the others are overridden final).</p>
<p dir="auto">If you use the annotation NoTransaction or call preventTransaction in constructor, the same behavior will occur. The onSetup() method in the AbstractTransactionalSpringContextTests will notice that there is no transaction, and will not run any setup method.</p>
<p dir="auto">A fix would be to insert a call to onSetupBeforeTransaction in onSetup() before the two tests of transactionManager or transactionDefinition, which would give you a setup method to call.</p>
<hr>
<p dir="auto"><strong>Affects:</strong> 2.0.4</p>
<p dir="auto"><strong>Issue Links:</strong></p>
<ul dir="auto">
<li><a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="398068137" data-permission-text="Title is private" data-url="https://github.com/spring-projects/spring-framework/issues/6964" data-hovercard-type="issue" data-hovercard-url="/spring-projects/spring-framework/issues/6964/hovercard" href="https://github.com/spring-projects/spring-framework/issues/6964">#6964</a> Provide non-transactional onSetup* hook in AbstractTransactionalSpringContextTests (<em><strong>"duplicates"</strong></em>)</li>
</ul>