title: How to write a pretty URL in Struts 2?
body: <p>I want to rewrite my URL in Struts2.</p>
  <p>How can I customize URL which shouldn't show my parameter that I am passing and also show action with different name.</p>
  <p>I don't know how to do it. I have to use plugins for that or configure my code in <code>struts.xml</code>:</p>
  <pre class="lang-xml prettyprint-override"><code>&lt;!DOCTYPE struts PUBLIC
  &quot;-//Apache Software Foundation//DTD Struts Configuration 2.0//EN&quot;
  &quot;http://struts.apache.org/dtds/struts-2.0.dtd&quot;&gt;
  
  &lt;struts&gt;
      &lt;constant name=&quot;struts.action.extension&quot; value=&quot;action&quot; /&gt;
      &lt;constant name=&quot;struts.enable.DynamicMethodInvocation&quot; value=&quot;false&quot; /&gt;
      &lt;constant name=&quot;struts.devMode&quot; value=&quot;true&quot; /&gt;
      &lt;constant name=&quot;struts.ui.theme&quot; value=&quot;simple&quot; /&gt;  
      
      
      &lt;include file=&quot;struts-user.xml&quot;&gt;&lt;/include&gt;
      &lt;include file=&quot;struts-admin.xml&quot;&gt;&lt;/include&gt;
      &lt;include file=&quot;struts-common.xml&quot;&gt;&lt;/include&gt;
      &lt;include file=&quot;struts-masters.xml&quot;&gt;&lt;/include&gt;
  &lt;/struts&gt;
  </code></pre>
  <p>Tell me the way how to perform as well as give me solution.</p>
  <p>My URL is like this:</p>
  <pre><code>/operations/MatchPredictionLevel2_index.action?sgt=102&amp;lvl2=1&amp;tn=MatchPredictionLevel2
  </code></pre>
  <p>I want to show my URL like</p>
  <pre><code>/operations/prediction 
  </code></pre>
  <p>to the user and the same thing I want to do for all URLs based on its purpose.</p>