Re: [solved] How to debug 404s / How to enable error log
On Tue, Jan 31, 2023 at 5:48 PM Konstantin Kolinko wrote: > and your configuration is missing > catalina.properties > context.xml > logging.properties > > files that are required for proper operation. > Thanks. I have confirmed that also copying logging.properties results in a logs/catalina.2023-02-01.log file being created. For posterity (mostly for me actually), the complete procedure for creating a proper CATALINA_BASE is the following: Directories that need to be created in CATALINA_BASE are: bin conf logs work webapps temp Files that need to be copied from CATALINA_HOME\conf to CATALINA_BASE\conf are: server.xml tomcat-users.xml web.xml catalina.properties context.xml logging.properties A minimal bin/run.sh for Linux might look like: #!/bin/sh export JRE_HOME=/usr/local/java11 export CATALINA_HOME=/path/to/tomcat10 export CATALINA_BASE=/path/to/myapp-base ${CATALINA_HOME}/bin/catalina.sh run "$@" A minimal bin\run.bat for Windows might look like: 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 Mike -- Michael B Allen Java AD DS Integration http://www.ioplex.com/
Re: [solved] How to debug 404s / How to enable error log
ср, 1 февр. 2023 г. в 00:51, Michael B Allen : > > ├───conf > │ │ server.xml > │ │ tomcat-users.xml > │ │ web.xml > > It assumes that you are familiar with java.util.logging. > > > > That's unfortunate. It would be so much nicer if it was a simple one-liner. It is configured with logging.properties file, and your configuration is missing catalina.properties context.xml logging.properties files that are required for proper operation. Best regards, Konstantin Kolinko - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: [solved] How to debug 404s / How to enable error log
On Tue, Jan 31, 2023 at 4:33 PM Konstantin Kolinko wrote: > > 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. > Solved. That was it. After copying over the conf/web.xml into myapp-base/conf, the app now works. The REALLY embarrassing thing is that I just asked about this on Nov 15, 2021 and even after taking notes about it, I failed to include the web.xml in my notes. How have you configured your %CATALINA_BASE% directory? > These are all of the files that give me what appear to be a working config: C:\tmp\myapp-base>tree /f Folder PATH listing Volume serial number is BAF1-D00E C:. │ cmd.lnk │ ├───bin │ start.bat │ ├───conf │ │ server.xml │ │ tomcat-users.xml │ │ web.xml │ │ │ └───Catalina │ └───localhost ├───logs │ myapp.log │ localhost_access_log.2023-01-31.txt │ ├───temp ├───webapps │ └───myapp │ │ index.jsp │ │ │ └───WEB-INF │ │ example.prp │ │ web.xml │ │ │ └───lib │ myapp-jakarta-1.2.3.jar │ └───work └───Catalina └───localhost └───myapp └───org └───apache └───jsp index_jsp.class index_jsp.java > > > 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 > > > 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. > That's unfortunate. It would be so much nicer if it was a simple one-liner. Mike