<commit_before><%@ page language="java" contentType="text/html; charset=UTF-8"
        pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<head>
<title>User Documentation</title>
</head>
<body>
        <% //USER DOCUMENTATION PAGE (in html) %>
        <%@ page import="proj1.*"%>
        <%
                /* COOKIE RETRIEVAL */
         // use a cookie to retrieve oracle database information, as well as current username.
                String user = HtmlPrinter.getUserCookie(request.getCookies());
                if (user == null) {
                        response.setHeader("Refresh", "0; URL=index.jsp");
                        return;
                }
                
                // Print the header.
                HtmlPrinter.printHeader(out, user, null, null, null);
        %>
        <h1>Installation</h1>
        <p>
                The following steps will show the user how to install this system, for setting up the SQL database,
                as well as putting all website files in their proper place. This installation guide already assumes that
                the catalina server is installed on the system, as well as the SQL/Oracle database (not the actual tables).
                This guide also assumes you have the project source files, all unzipped to a folder named 'project'.
        </p>
        <h3>SQL Server and Tables</h3>
        <p>
        <blockquote>
                1. Navigate (in a terminal) to <i>project/sql/</i> to be in the same directory as the sql script files.
                <br><br>
                2. Type sqlplus, and enter the username and password, assuming that a database has been set up, and that there
                are no tables in said database.
                <br><br>
                3. Type <b>@setup</b> to run the setup script and fill the database with the default tables needed.
                <br><br>
                4. Type <b>@initial_script</b> to load the additional table, views, and sequences needed for the database.
                <br><br>
                5. (Optional) Type <b>@examples</b> to load the tables with sample information. These include users, groups,
                images, as well as image view counts.
                <br><br>
                The database setup is now complete. The next step below is setting up the website and servlets.
        </blockquote>
        </p>
        <h3>Web Pages and Servlets</h3>
        <p>
        <blockquote>
                1. Once the SQL tables have been set up, it is now time to move onto the actual web content.
                Navigate to your <i>catalina/webapps/proj1/</i> directory, and copy all <b>.jsp</b> files from the pages folder of the project
                to this location.
                <br><br>
                2. Now go into the <i>WEB-INF/</i> folder for the server, and copy <b>web.xml</b> to this location from the project folder.
                <br><br>
                3. Next, navigate into the <i>lib/</i> directory, and copy all <b>.jar</b> files from the lib folder of the project
                to this location.
                <br><br>
                4. Then for a last copy operation, first navigate up one directory so that now you reside in the <i>WEB-INF/</i> folder
                once again. Create a new folder called <i>classes</i>, and navigate into it. Grab all files/folders from the classes folder
                of the project, and drag them to the newly created classes folder. This concludes the copying of files.
                <br><br>
                5. To make sure the website will be connecting to the right SQL database, the user must now edit the file
                <b>SQLAdapter.java</b>, located within the classes/proj1 folder. At the top of this file are four variables:
                <b>'m_url'</b>, <b>'m_driverName'</b>, <b>'m_userName'</b>, and <b>'m_password'</b>. Each one must be edited so
                that not only is the right database is being accessed, but the right username and password are used as well. Hard code
                these values, then save the file.
                <br><br>
                6. What now must be done is the compilation process. A Makefile now exists in the <i>classes/</i> folder, which upon
                executing will compile all java files in this folder (and in subfolder <i>proj1/</i>). The user must open a terminal,
                navigate to the classes directory, and simply type <b><i>make</i></b> to compile the servlets.
                <br><br>
                The installation is now complete, and the user may now run the server with the command <b><i>starttomcat</i></b>.
        </blockquote><commit_msg>Updated the Help<commit_after><%@ page language="java" contentType="text/html; charset=UTF-8"
        pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<head>
<title>User Documentation</title>
</head>
<body>
        <% //USER DOCUMENTATION PAGE (in html) %>
        <%@ page import="proj1.*"%>
        <%
                /* COOKIE RETRIEVAL */
         // use a cookie to retrieve oracle database information, as well as current username.
                String user = HtmlPrinter.getUserCookie(request.getCookies());
                if (user == null) {
                        response.setHeader("Refresh", "0; URL=index.jsp");
                        return;
                }
                
                // Print the header.
                HtmlPrinter.printHeader(out, user, null, null, null);
        %>
        <h1>Installation</h1>
        <p>
                The following steps will show the user how to install this system, for setting up the SQL database,
                as well as putting all website files in their proper place. This installation guide already assumes that
                the catalina server is installed on the system, as well as the SQL/Oracle database (not the actual tables).
                This guide also assumes you have the project source files, all unzipped to a folder named 'project'.
        </p>
        <h3>SQL Server and Tables</h3>
        <p>
        <blockquote>
                1. Navigate (in a terminal) to <i>project/sql/</i> to be in the same directory as the sql script files.
                <br><br>
                2. Type sqlplus, and enter the username and password, assuming that a database has been set up, and that there
                are no tables in said database.
                <br><br>
                3. Type <b>@setup</b> to run the setup script and fill the database with the default tables needed.
                <br><br>
                4. Type <b>@initial_script</b> to load the additional table, views, and sequences needed for the database.
                <br><br>
                5. (Optional) Type <b>@examples</b> to load the tables with sample information. These include users, groups,
                images, as well as image view counts.
                <br><br>
                The database setup is now complete. The next step below is setting up the website and servlets.
        </blockquote>
        </p>
        <h3>Web Pages and Servlets</h3>
        <p>
        <blockquote>
                1. Once the project is extracted, copy <i>/proj1/</i> to your <i>catilina/webapps/</i> folder.<br><br>
                2. Now navigate to the <i>proj1/WEB-INF/classes</i> folder. Open a terminal and type <b>make</b>.
                <br><br>
                3. The installation is now complete, and the user may now run the server with the command <b><i>starttomcat</i></b>.
                <br><br>
                <b>Note:</b> To make sure the website will be connecting to the right SQL database, the user can edit the file
                <b>SQLAdapter.java</b>, located within the classes/proj1 folder before running the make file. At the top of this file are four variables:
                <b>'m_url'</b>, <b>'m_driverName'</b>, <b>'m_userName'</b>, and <b>'m_password'</b>. Each one must be edited so
                that not only is the right database is being accessed, but the right username and password are used as well. Hard code
                these values, then save the file.
                <br><br>
        </blockquote>
{'fraction_non_alphanumeric': 0.09653233364573571, 'fraction_numerical': 0.006911902530459231, 'mean_word_length': 1.910671667234913, 'pattern_counts': {'":': 0, '<': 175, '<?xml version=': 0, '>': 175, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 1}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3340560', 'n_tokens_mistral': 2326, 'n_tokens_neox': 2211, 'n_words': 960}