title: Execute JSP at Tomcat Startup
body: <p>Please note that I am not the developer of this app and I realize that there are probably better ways to implement it.  However, I have been given the following objective:</p>
  
  <p>I need to automatically execute a jsp page when tomcat starts on an RHEL server.  The only kicker is that their are three URL Parameters that need to be passed.</p>
  
  <p>Here is an example of the URL:</p>
  
  <p><a href="http://www.myurl.com/app/getlistdata.jsp?param1=P1&amp;param2=P2&amp;param3=P3" rel="nofollow">http://www.myurl.com/app/getlistdata.jsp?param1=P1&amp;param2=P2&amp;param3=P3</a></p>
  
  <p>In my web.xml I have the following but it does not seem to be loading automatically.  I suppose I could modify the start_tomcat script to include a wget but I was hoping to make this independent from the server it is deployed to.</p>
  
  <pre><code>&lt;servlet&gt;
      &lt;servlet-name&gt;getlistdata&lt;/servlet-name&gt;
      &lt;jsp-file&gt;/getlistdata.jsp&lt;/jsp-file&gt;
          &lt;init-param&gt;
              &lt;param-name&gt;param1&lt;/param-name&gt;
              &lt;param-value&gt;P1&lt;/param-value&gt;
          &lt;/init-param&gt;
          &lt;init-param&gt;
              &lt;param-name&gt;param2&lt;/param-name&gt;
              &lt;param-value&gt;P2&lt;/param-value&gt;
          &lt;/init-param&gt;
          &lt;init-param&gt;
              &lt;param-name&gt;param3&lt;/param-name&gt;
              &lt;param-value&gt;P3&lt;/param-value&gt;
          &lt;/init-param&gt;
      &lt;load-on-startup&gt;3&lt;/load-on-startup&gt;
  &lt;/servlet&gt;
  </code></pre>