title: Weblogic Application server logs JSP error on servlet mapping to HTML file
body: <p>I got a Weblogic (12c) application server and deploy an EAR (contining my WAR) to it.
  In the web.xml I have a servlet-mapping to redirect to a HTML page like the following:</p>
  
  <pre><code>&lt;?xml version="1.0"?&gt;
  &lt;web-app 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"
           version="3.0"&gt;
      &lt;description&gt;my webapp&lt;/description&gt;
      &lt;servlet&gt;
          &lt;servlet-name&gt;servlet_name&lt;/servlet-name&gt;
          &lt;jsp-file&gt;/webapp/index.html&lt;/jsp-file&gt;
      &lt;/servlet&gt;
    &lt;servlet-mapping&gt;
      &lt;servlet-name&gt;servlet_name&lt;/servlet-name&gt;
      &lt;url-pattern&gt;/webapp/*&lt;/url-pattern&gt;
    &lt;/servlet-mapping&gt;
  &lt;/web-app&gt;
  </code></pre>
  
  <p>This seems working but in my server log I got folloing error message:</p>
  
  <pre><code>####&lt;Oct 31, 2018, 1:25:16,132 PM GMT&gt; &lt;Error&gt; .... &lt;[ServletContext@563785877[app:myApp module:myApp-client path:null spec-version:3.1]] Root cause of ServletException.
  weblogic.servlet.jsp.CompilationException: Failed to compile JSP /webapp/index.html
  Exception occurred while processing '/opt/oracle/product/fusionMy/myDomain/domains/myDomain/servers/myApp/tmp/_WL_user/myApp-client/sz8ux3/war/webapp/index.html'java.lang.NullPointerException
      at weblogic.jsp.internal.ProxySourceFile._check(ProxySourceFile.java:151)
      at weblogic.jsp.internal.SourceFile.masterCheck(SourceFile.java:782)
      at weblogic.jsp.internal.SourceFile.check(SourceFile.java:314)
      at weblogic.jsp.internal.SourceFile.check(SourceFile.java:335)
      at weblogic.jsp.internal.ProxySourceFile.codeGen(ProxySourceFile.java:229)
      at weblogic.jsp.internal.SourceFile.codeGen(SourceFile.java:327)
      at weblogic.jsp.internal.client.ClientUtilsImpl$CodeGenJob.run(ClientUtilsImpl.java:626)
      at weblogic.jsp.internal.client.Job.performJob(Job.java:85)
      at weblogic.jsp.internal.client.ThreadPool$WorkerThread.run(ThreadPool.java:219)
  index.html: java.lang.NullPointerException
  
      at weblogic.servlet.jsp.JavelinxJSPStub.reportCompilationErrorIfNeccessary(JavelinxJSPStub.java:247)
      at weblogic.servlet.jsp.JavelinxJSPStub.compilePage0(JavelinxJSPStub.java:183)
      at weblogic.servlet.jsp.JavelinxJSPStub.access$000(JavelinxJSPStub.java:50)
      at weblogic.servlet.jsp.JavelinxJSPStub$1.run(JavelinxJSPStub.java:111)
      at java.security.AccessController.doPrivileged(Native Method)
      at weblogic.servlet.jsp.JavelinxJSPStub.compilePage(JavelinxJSPStub.java:108)
      at weblogic.servlet.jsp.JspStub.prepareServlet(JspStub.java:267)
      at weblogic.servlet.jsp.JspStub.prepareServlet(JspStub.java:218)
      at weblogic.servlet.internal.ServletStubImpl.getServlet(ServletStubImpl.java:414)
      at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:304)
      at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:247)
      at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.wrapRun(WebAppServletContext.java:3679)
      at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3649)
      at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:326)
      at weblogic.security.service.SecurityManager.runAsForUserCode(SecurityManager.java:197)
      at weblogic.servlet.provider.WlsSecurityProvider.runAsForUserCode(WlsSecurityProvider.java:203)
      at weblogic.servlet.provider.WlsSubjectHandle.run(WlsSubjectHandle.java:71)
      at weblogic.servlet.internal.WebAppServletContext.doSecuredExecute(WebAppServletContext.java:2433)
      at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2281)
      at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2259)
      at weblogic.servlet.internal.ServletRequestImpl.runInternal(ServletRequestImpl.java:1691)
      at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1651)
      at weblogic.servlet.provider.ContainerSupportProviderImpl$WlsRequestExecutor.run(ContainerSupportProviderImpl.java:270)
      at weblogic.invocation.ComponentInvocationContextManager._runAs(ComponentInvocationContextManager.java:348)
      at weblogic.invocation.ComponentInvocationContextManager.runAs(ComponentInvocationContextManager.java:333)
      at weblogic.work.LivePartitionUtility.doRunWorkUnderContext(LivePartitionUtility.java:54)
      at weblogic.work.PartitionUtility.runWorkUnderContext(PartitionUtility.java:41)
      at weblogic.work.SelfTuningWorkManagerImpl.runWorkUnderContext(SelfTuningWorkManagerImpl.java:640)
      at weblogic.work.ExecuteThread.execute(ExecuteThread.java:406)
      at weblogic.work.ExecuteThread.run(ExecuteThread.java:346)
  </code></pre>
  
  <p>based on other SO posts I assumed that that should work - but what is this error message saying?<br>
  Is this not allowed - to redirect to a HTML page in the jsp-file tag?<br>
  What is the right way of doing this in a WAR file?  </p>
  
  <p>On my local Tomcat (8.5) it seem to work without that error in logs (deployed WAR).<br>
  In Weblogic I first get an error but every further request is working ...</p>
  
  <p>HTML file (one version I tested):</p>
  
  <pre><code>&lt;!doctype html&gt;
  &lt;html lang="en"&gt;
  &lt;head&gt;
    &lt;meta charset="utf-8"&gt;
    &lt;title&gt;Simple Test!&lt;/title&gt;
    &lt;base href="/webapp/"&gt;
  &lt;/head&gt;
  &lt;body&gt;
      &lt;h1&gt;HALLO&lt;/h1&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>