ср, 1 февр. 2023 г. в 00:04, Michael B Allen <iop...@gmail.com>: > > This is embarrassing. I have apparently forgotten how to operate Tomcat. >
Welcome! The main help file for running Tomcat is RUNNING.txt, with additional information in webapps/docs/setup.html and webapps/docs/windows-service-howto.html > I just downloaded openjdk 17, Tomcat 10.1.5 to a clean Windows 10, upacked > everything, created a myapp-base with a .bat like: > > --8<-- bin\start.bat --8<-- > > setlocal > > set "JRE_HOME=C:\tmp\java17" > set "CATALINA_HOME=C:\tmp\tomcat10" > set "CATALINA_BASE=C:\tmp\myapp-base" > > %CATALINA_HOME%\bin\catalina.bat start > > -- > > Copied webapp files into the webapps dir. > > On bin\start I get some INFO in the console like: > > Jan 31, 2023 3:46:02 PM org.apache.coyote.AbstractProtocol init > INFO: Initializing ProtocolHandler ["http-nio-8080"] > Jan 31, 2023 3:46:02 PM org.apache.catalina.startup.Catalina load > INFO: Server initialization in [797] milliseconds > Jan 31, 2023 3:46:02 PM org.apache.catalina.core.StandardService > startInternal > INFO: Starting service [Catalina] > Jan 31, 2023 3:46:02 PM org.apache.catalina.core.StandardEngine > startInternal > INFO: Starting Servlet engine: [Apache Tomcat/10.1.5] > Jan 31, 2023 3:46:02 PM org.apache.catalina.startup.HostConfig > deployDirectory > INFO: Deploying web application directory [C:\tmp\myapp-base\webapps\myapp] > Jan 31, 2023 3:46:02 PM org.apache.catalina.startup.ContextConfig > getDefaultWebXmlFragment > INFO: No global web.xml found The above message is odd. Essentially, it means that the file %CATALINA_BASE%\conf\web.xml does not exist. How have you configured your %CATALINA_BASE% directory? The conf/web.xml configures all the defaults, shared by all web applications. That includes - declaration of DefaultServlet - declaration of JspServlet - "welcome-file-list" - "mime-mapping"s > Jan 31, 2023 3:46:03 PM org.apache.jasper.servlet.TldScanner scanJars > INFO: At least one JAR was scanned for TLDs yet contained no TLDs. Enable > debug logging for this logger for a complete list of JARs that were scanned > but no TLDs were found in them. Skipping unneeded JARs during scanning can > improve startup time and JSP compilation time. > Jan 31, 2023 3:46:03 PM org.apache.catalina.startup.HostConfig > deployDirectory > INFO: Deployment of web application directory > [C:\tmp\myapp-base\webapps\myapp] has finished in [656] ms > Jan 31, 2023 3:46:03 PM org.apache.coyote.AbstractProtocol start > INFO: Starting ProtocolHandler ["http-nio-8080"] > Jan 31, 2023 3:46:03 PM org.apache.catalina.startup.Catalina start > INFO: Server startup in [765] milliseconds > > The myapp servlet filter init runs. A localhost access log is created in > myapp-base\logs. > > But trying to access anything through localhost:8080 or remotely by > hostname fails with nothing but 404: > > 10.22.10.30 - - [31/Jan/2023:15:14:49 -0500] "GET /myapp/ HTTP/1.1" 404 682 > 10.22.10.30 - - [31/Jan/2023:15:14:49 -0500] "GET /favicon.ico HTTP/1.1" > 404 682 > 0:0:0:0:0:0:0:1 - - [31/Jan/2023:15:22:43 -0500] "GET / HTTP/1.1" 404 682 > 0:0:0:0:0:0:0:1 - - [31/Jan/2023:15:22:43 -0500] "GET /favicon.ico > HTTP/1.1" 404 682 > 0:0:0:0:0:0:0:1 - - [31/Jan/2023:15:22:49 -0500] "GET /myapp HTTP/1.1" 302 - At least the web application is there. A 302 redirect happens. > 0:0:0:0:0:0:0:1 - - [31/Jan/2023:15:22:49 -0500] "GET /myapp/ HTTP/1.1" 404 > 682 > 0:0:0:0:0:0:0:1 - - [31/Jan/2023:15:22:53 -0500] "GET /myapp/index.jsp > HTTP/1.1" 404 682 No JspServlet (to serve it as a JSP page), nor DefaultServlet (to serve it as a plain downloadable file) are configured. > So now I'm just trying to find out how to enable an error log and for the > life of me I'm completely blanking. > > How does one enable a debug log? The documentation about such things is > pretty cryptic. It assumes that you are familiar with java.util.logging. > How can I diagnose this further? > BTW, Note that Tomcat 10+ implements JakartaEE Servlet specification. If your web application is based on JavaEE Servlet specification, it cannot be put into webapps as is, and has to be converted. See Migration guide. https://tomcat.apache.org/migration-10.html#Specification_APIs Best regards, Konstantin Kolinko --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org