title: Why does the existence of web.xml keep my JSP from working?
body: <p>I have a jsp file that looks like this:</p>
  
  <pre><code>&lt;html&gt;
  &lt;body&gt;
      &lt;div&gt;location: ${pageContext.request.scheme}://${pageContext.request.serverName}:${pageContext.request.serverPort}${pageContext.request.contextPath}/&lt;/div&gt;
      &lt;div&gt;(should have "verdagon.net" somewhere in there)&lt;/div&gt;
  
      &lt;div&gt;Included stuff should appear below here:&lt;/div&gt;
      &lt;jsp:include page="toinclude.html"/&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>and when I have no web.xml in my WEB-INF directory, it outputs correctly:</p>
  
  <pre><code>location: http://verdagon.net:80/strnowebxml/
  (should have "verdagon.net" somewhere in there)
  Included stuff should appear below here:
  I'm included!
  </code></pre>
  
  <p>Yet when I add a WEB-INF directory, and I put a bare-bones web.xml, with just this in it,</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;web-app id="WebApp_ID" version="3.0" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd"&gt;
  &lt;/web-app&gt;
  </code></pre>
  
  <p>with that web.xml just being present, I get this output:</p>
  
  <pre><code>location: ${pageContext.request.scheme}://${pageContext.request.serverName}:${pageContext.request.serverPort}${pageContext.request.contextPath}/
  (should have "verdagon.net" somewhere in there)
  Included stuff should appear below here:
  I'm included!
  </code></pre>
  
  <p><strong>The problem:</strong> Those dollar-sign replacements aren't happening.</p>
  
  <p><strong>The weird thing:</strong> I know JSP is running, because that jsp:include is doing fine.</p>
  
  <p>Anyone know why the JSP works when there's no web.xml, then breaks when I add it in?</p>