title: tomcat 6 HTTP authentication
body: <p>I have a web app that I'm trying to deploy in Tomcat 6.0.9 on Redhat Enterprise 5.2. I was given j2ee-1.4.jar to place in the /lib directory. I found that after restarting tomcat several problems arose. But also note that removing the above jar fixes the problems listed below. I'm told I have to include j2ee-1.4.jar but I don't know what steps I need to complete to make this work.</p>
  
  <pre><code> First, when attempting to login to Tomcat Manager I am no longer presented with a login dialog. It jumps right to the 401 page stating "This request requires HTTP authentication ()"
  </code></pre>
  
  <p>manager log for this event show the following:</p>
  
  <pre><code> org.apache.catalina.core.ApplicationDispatcher invoke
  SEVERE: Servlet.service() for servlet jsp threw exception
  javax.servlet.ServletException: javax.servlet.jsp.JspFactory.getJspApplicationContext(Ljavax/servlet/ServletContext;)Ljavax/servlet/jsp/JspApplicationContext;
          at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:274)
          at javax.servlet.http.HttpServlet.service(HttpServlet.java:860)
          at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
          at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
          at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:687)
          at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:471)
          at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:403)
          at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:301)
          at org.apache.catalina.core.StandardHostValve.custom(StandardHostValve.java:424)
          at org.apache.catalina.core.StandardHostValve.status(StandardHostValve.java:343)
          at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:144)
          at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104)
          at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
          at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:212)
          at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
          at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:634)
          at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:445)
          at java.lang.Thread.run(Thread.java:662)
  </code></pre>
  
  <p>Second, I noticed that the JSP example for Basic Comparisons generates this:</p>
  
  <pre><code>org.apache.catalina.core.StandardWrapperValve invoke
  SEVERE: Servlet.service() for servlet jsp threw exception
  org.apache.jasper.JasperException: Unable to compile class for JSP:
  
  
  Stacktrace:
          at org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:85)
          at org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:330)
          at org.apache.jasper.compiler.JDTCompiler.generateClass(JDTCompiler.java:415)
          at org.apache.jasper.compiler.Compiler.compile(Compiler.java:308)
          at org.apache.jasper.compiler.Compiler.compile(Compiler.java:286)
          at org.apache.jasper.compiler.Compiler.compile(Compiler.java:273)
          at org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:566)
          at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:308)
          at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:320)
          at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266)
          at javax.servlet.http.HttpServlet.service(HttpServlet.java:860)
          at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
          at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
          at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:228)
          at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
          at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:433)
          at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
          at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104)
          at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
          at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:212)
          at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
          at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:634)
          at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:445)
          at java.lang.Thread.run(Thread.java:662)
  </code></pre>
  
  <p>Any help would be greatly appreciated </p>
  
  <p>Thanks</p>