title: Get Request in Struts 2
body: <p>I am new to struts2. In application there is Action called userLogin. when i enter to url <code>http://servername:9090/appName/userLogin</code>, It should forward the request directly to to /jsp/account/login.jsp. it should not call action method. how can i ensure that when request is through get then forword to loginPage else if Request is Post then it should call the action</p>
  
  <p>Struts.xml is as follows</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;!DOCTYPE struts PUBLIC
     "-//Apache Software Foundation//DTD Struts Configuration 2.0//EN"
     "http://struts.apache.org/dtds/struts-2.0.dtd"&gt;
  &lt;struts&gt;
      &lt;constant name="struts.devMode" value="true" /&gt;
      &lt;constant name="struts.custom.i18n.resources" value="ApplicationResources" /&gt;
      &lt;package name="default" extends="struts-default"&gt;
          &lt;action name="index"&gt;
              &lt;result&gt;jsp/index.jsp&lt;/result&gt;
          &lt;/action&gt;    
  
          &lt;action name="userLogin" class="com.ril.tc.action.LoginAction"&gt;
              &lt;result&gt;jsp/account/login.jsp&lt;/result&gt;
              &lt;result name="success"&gt;jsp/index.jsp&lt;/result&gt;
              &lt;result name="error"&gt;jsp/account/login.jsp&lt;/result&gt;
          &lt;/action&gt;
  
          &lt;action name="ministatement" class="com.ril.tc.action.MiniStatementAction"&gt;
              &lt;result&gt;jsp/account/ministatement.jsp&lt;/result&gt;
              &lt;result name="success"&gt;jsp/account/ministatementdetails.jsp&lt;/result&gt;
              &lt;result name="error"&gt;jsp/account/ministatement.jsp&lt;/result&gt;
          &lt;/action&gt;
      &lt;/package&gt;
  &lt;/struts&gt;
  </code></pre>