Note that there are some explanatory texts on larger screens.

plurals
  1. POHide extension for action class in struts2.0.14 version
    text
    copied!<p>I need to hide action extension in Struts2.0.14 version.</p> <p>By configuring the below things it is working fine in Struts2.1.8 version. But it not working in the 2.0.14 version, i am getting these sort of errors(i mentioned the errors below) </p> <p>In the <code>web.xml</code> i updated the filter code as</p> <pre><code>&lt;filter&gt; &lt;filter-name&gt;struts2&lt;/filter-name&gt; &lt;filter-class&gt; org.apache.struts2.dispatcher.FilterDispatcher &lt;/filter-class&gt; &lt;/filter&gt; &lt;filter-mapping&gt; &lt;filter-name&gt;struts2&lt;/filter-name&gt; &lt;url-pattern&gt;/*&lt;/url-pattern&gt; &lt;/filter-mapping&gt; </code></pre> <p>Then in the struts.xml i updated like this</p> <pre><code>&lt;constant name="struts.action.extension" value=""/&gt; </code></pre> <p>Result of updating like this is: </p> <blockquote> <p>I can access the action file as <a href="http://ip.com:8080/project/actionName" rel="nofollow">http://ip.com:8080/project/actionName</a>. But javascript, css and image files are not loading. So i tried to use struts.action.excludePattern, but it is not available for 2.0.14 version</p> </blockquote> <p>Then in the struts.xml i updated like this</p> <pre><code>&lt;constant name="struts.action.extension" value=","/&gt; </code></pre> <p>Result of updating like this is: </p> <blockquote> <p>I can access the action file as <a href="http://ip.com:8080/project/actionName" rel="nofollow">http://ip.com:8080/project/actionName</a>. If not giving the dot in the end, it is not working. Same result is coming when giving the value=",,action" or value=",action"</p> </blockquote> <p>Can anyone tell me, whether we can remove the extension in struts2.0.14 version.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload