title: Can't display the table when running index.jsp
body: <p>In my web app the welcome page needs to show a table. However it (<a href="http://localhost:8080/MyApp" rel="nofollow noreferrer">http://localhost:8080/MyApp</a> ) shows "null" , but if I add 'ServlentToRead.java' I mean, <a href="http://localhost:8080/MyApp/ServlentToRead" rel="nofollow noreferrer">http://localhost:8080/MyApp/ServlentToRead</a> it displays the table. </p>
  
  <p>Why I can't  get the table as first page ? here is the index.jsp</p>
  
  <pre><code>&lt;%@ page language="java" contentType="text/html; charset=ISO-8859-1"
      pageEncoding="ISO-8859-1"%&gt;
  
  &lt;%
      String table=(String) request.getAttribute("table");
  
  %&gt;
  &lt;!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"&gt;
  &lt;html&gt;
  &lt;head&gt;
  &lt;meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"&gt;
  
  &lt;title&gt;Mytable&lt;/title&gt;
  
  &lt;/head&gt;
  
  &lt;body&gt;
  
  &lt;h1&gt;Mytable&lt;/h1&gt;
  
  &lt;%= table %&gt;
  
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p><strong>edit:</strong></p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      xmlns="http://xmlns.jcp.org/xml/ns/javaee"
      xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-app_3_1.xsd"
      version="3.1"&gt;
      &lt;display-name&gt;MyApp&lt;/display-name&gt;
      &lt;welcome-file-list&gt;
          &lt;welcome-file&gt;index.html&lt;/welcome-file&gt;
          &lt;welcome-file&gt;index.htm&lt;/welcome-file&gt;
          &lt;welcome-file&gt;index.jsp&lt;/welcome-file&gt;
          &lt;welcome-file&gt;default.html&lt;/welcome-file&gt;
          &lt;welcome-file&gt;default.htm&lt;/welcome-file&gt;
          &lt;welcome-file&gt;default.jsp&lt;/welcome-file&gt;
      &lt;/welcome-file-list&gt;
  &lt;/web-app&gt;
  </code></pre>