Struts2 Wildcard Mapping - more specific one is being handled by generic one
<p>I'm currently playing around with my Struts2 config for wildcard testing and I'm stuck with this one.</p>
<pre class="lang-xml prettyprint-override"><code>    &lt;action name=&quot;/*/*&quot; class=&quot;checkBlogUrl&quot; method=&quot;testing&quot;&gt;
        &lt;param name=&quot;blogSiteUrl&quot;&gt;{1}&lt;/param&gt;
        &lt;param name=&quot;test&quot;&gt;{2}&lt;/param&gt;
        &lt;result name=&quot;success&quot;&gt;/WEB-INF/jsp/cmsPages/index.jsp&lt;/result&gt;
    &lt;/action&gt;
    
    &lt;action name=&quot;/*/postPreview1&quot; class=&quot;blogPostAction&quot; method=&quot;test&quot;&gt;
        &lt;param name=&quot;blogSiteUrl&quot;&gt;{1}&lt;/param&gt;
        &lt;result name=&quot;success&quot;&gt;/WEB-INF/jsp/cmsPages/templatePicker.jsp&lt;/result&gt;
    &lt;/action&gt;
</code></pre>
<p>If I access <code>myurl.com/hello/hi</code> I will be redirected to <code>index.jsp</code>.</p>
<p>But if I access <code>myurl.com/hello/postPreview1</code> I will also be redirected to <code>index.jsp</code> instead of <code>templatePicker.jsp</code>.</p>
<p>Am I doing something wrong here? The <a href="https://struts.apache.org/core-developers/wildcard-mappings.html" rel="nofollow noreferrer">struts wildcard doc</a> said that the last one will win</p>
<p><strong>EDIT:</strong></p>
<p>Just tried to switch them around and it worked! Am I misreading the doc?</p>