User Tools

Site Tools


unraid:virtual:webpageu20.04

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
unraid:virtual:webpageu20.04 [2021/07/21 20:09] – [VM Settings] dirkunraid:virtual:webpageu20.04 [2021/09/10 19:18] (current) dirk
Line 125: Line 125:
   * Note: New in mysqlserver v8: files writen from mysql are only readable by root and the mysql group so you have to add the use tomcat (the one reading the files in the march madness bracket) to the mysql group (the one creating the files)<code>sudo usermod -a -G mysql tomcat</code>   * Note: New in mysqlserver v8: files writen from mysql are only readable by root and the mysql group so you have to add the use tomcat (the one reading the files in the march madness bracket) to the mysql group (the one creating the files)<code>sudo usermod -a -G mysql tomcat</code>
   * Changes will take effect after restart<code>sudo reboot -h now</code>   * Changes will take effect after restart<code>sudo reboot -h now</code>
-==== Tomcat - Mysql linking / JDK / JAVA cleanup ====+==== Tomcat - Mysql linking / JDK / JAVA cleanup / Activate error page ====
   * Install Java Development Kit<code> sudo apt-get install default-jdk</code>   * Install Java Development Kit<code> sudo apt-get install default-jdk</code>
   * Install Java / Mysql connector<code> sudo apt-get install libmysql-java</code>   * Install Java / Mysql connector<code> sudo apt-get install libmysql-java</code>
Line 141: Line 141:
   * If webinf files need to be compiled:<code>sudo javac -cp /usr/share/java/servlet-api-3.0.jar:/usr/share/java/jsp-api-2.2.jar util/*.java</code>   * If webinf files need to be compiled:<code>sudo javac -cp /usr/share/java/servlet-api-3.0.jar:/usr/share/java/jsp-api-2.2.jar util/*.java</code>
   * reboot<code>sudo reboot -h now</code>   * reboot<code>sudo reboot -h now</code>
 +  * To activate Error Pages (instead of actual code showing)
 +    * At bottom of /var/lib/tomcat9/conf/web.xml page before </web-app> put: <code>
 +    <error-page>
 +        <error-code>404</error-code>
 +        <location>/error.jsp</location>
 +    </error-page>
 +    <error-page>
 +        <error-code>403</error-code>
 +        <location>/error.jsp</location>
 +    </error-page>
 +    <error-page>
 +        <error-code>500</error-code>
 +        <location>/error.jsp</location>
 +    </error-page></code>
 +    * At bottom of /var/lib/tomcat9/conf/server.xml page before </Host> put: <code>
 +    <Valve className="org.apache.catalina.valves.ErrorReportValve" showReport="false" showServerInfo="false" /></code>
 +    * make an error.jsp file and put it in each webapps folder you would like it to show up
 +    * Link: https://ravisankar1.wordpress.com/2020/05/21/tomcat-9-customize-default-404-error-page/
 +    * Link: https://www.javatpoint.com/exception-handling-in-jsp
 ==== Install Samba ==== ==== Install Samba ====
 <code>sudo apt-get install samba <code>sudo apt-get install samba
unraid/virtual/webpageu20.04.1626916188.txt.gz · Last modified: by dirk