JSoup is located in the lib directory under the JDK root directory. On acad: /usr/java/jdk-15.0.1/lib - It is an html parser. Servlet Reprise - Snoop servlet is accessed directly via its URL. * Most of the time you access a servlet via a front end on a regular web page. - When a servlet file has a package declaration, the entries (period separated) represent the path from the classes directory in the deployment * The classes directory of all servlet deployments is in the Tomcat classpath - Convert servlet is a goos example of a servlet with its front end in a remote web page * Front end location: /home/kutztown.edu/spiegel/public_html/cis521/ServletHTML which has URL https://acad.kutztown.edu/~spiegel/cis521/ServletHTML/Convert.html * Servlet location: /home/kutztown.edu/spiegel/webapps which is accessed (from the front end, not directly) here: https://spiegel.kutztown.edu:8443/convert/convertServ > This URL is not accessed directly (unless you want no result). The front end sends it a query string, appended to the address in the URL... for example ?units=233&metric=2&buttonGroup=Miles Servlet Load, Deploy, and Unload - A servlet is deployed when its war file is placed in webapps * It is not loaded until first access. > At this time, its init() is invoked + This is when a connection to the database should be established. * To update a servlet, overwrite its war file > The servlet will be removed, and the updated war file's contents will be deployed. * To remove a servlet, delete its war file. - When a servlet is unloaded, via remove or change, its destroy() executes. * This is when the database connection should be closed. - Query string * A query string follows an address in a URL. It starts with ? and is followed by a series of name=value pairs, each separated by & Project 2 - Service requests to the back end (servlet) of your project should be minimal * As much error checking as possible must occur on the client-side (front end) > The best strategy is eliminating the possibility of erroneous input. - Database tables - Maintain info on your stored tables, incl how many, # accesses, when stored, etc. * When full and another table is to be added, you need a purge strategy. - Maybe drop your tables when your servlet is unloaded (in destroy() method) - A script to keep form inputs correct could be Javascript. * Example: For a month and day, when the user selects the month from a combo box (drop down menu) that would trigger an onClick (an option on that element) that would call a Javascript to populate the combo box for selecting the day of month. Unix permissions - Designate who/what can access files, links, and directories. * Four parts: What the directroy entry is, and permissions for user, group, and world Example: drwxrwxr-x The d means the entry is a directory; l means link, - means file This is followed by three sets of three octal digits, represented as bits, i.e. one bit each for read, write, and execute (if program, run; if directory, cd to it) rwx means all 3, read, write and execute. r-x means read and execute, but not write ==> the world can read and change to this directory, but not write to it This permission was 775, where a 7 is rwx (111) and a 5 is r-x (101 binary) Design Patterns - Important in software design - Indispensable, actually. See links page for info/examples