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/09/10 19:06] – [Tomcat - Mysql linking / JDK / JAVA cleanup / activate error page] dirkunraid:virtual:webpageu20.04 [2021/09/10 19:18] (current) dirk
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.1631318813.txt.gz · Last modified: by dirk