Logo/

CampusFind Architecture and Workflows

Log in

Made with ScholarlyMake flashcards like these from your own notes

CampusFind Architecture and Workflows

Questions and answers

58 cards
  1. Question:How does a CampusFind request travel from the browser to stored data and back?

    Answer:The browser sends an HTTP request to Tomcat, which runs the applicable filter and servlet. The servlet validates input and uses a DAO or service; a JSP generates the response HTML, which Tomcat returns to the browser. The takeaway is that each layer has a distinct role in the request cycle.

  2. Question:Why does CampusFind keep SQL inside DAO classes rather than servlets?

    Answer:DAOs separate data-access SQL from web logic. If the database changes, the DAO can change while the servlets remain the same. The takeaway is that separating responsibilities makes the code easier to maintain.

  3. Question:How does the matching engine decide whether two item reports are a match?

    Answer:It scores category, location, date, and keywords for a total of up to 100 points. A pair scoring 50 or more is saved as a match. The takeaway is that several explainable rules combine to determine a match.

  4. Question:Why must an administrator approve a submitted report before it becomes public?

    Answer:Anyone can submit report content, so every report begins as PENDING. An administrator checks it before approval, helping keep fake reports out and supporting return of items to their real owners. The takeaway is that review gates public visibility.

  5. Question:How do login sessions let the server recognize a user on later requests?

    Answer:After successful login, the application creates a new session and stores the user object and identifying details in it. The browser retains a JSESSIONID cookie, which lets the server associate later requests with that session. The takeaway is that the cookie identifies the session, not the user by itself.

  6. Question:How do CampusFind's Model, View, and Controller roles differ?

    Answer:The Model represents data, the View presents what users see through JSP pages, and the Controller decides what happens through servlets. The takeaway is that MVC separates data, presentation, and request handling.

  7. Question:How does a redirect differ from a forward after form submission?

    Answer:A forward passes the same request inside the server to a JSP, so the browser URL does not change. A redirect tells the browser to make a new request, changing the URL and helping prevent duplicate form submissions on refresh. The takeaway is that redirects start a browser-side request cycle.

  8. Question:Why does successful login destroy the old session before creating another?

    Answer:The old session is destroyed and a new one is created to prevent session fixation. This prevents an attacker from planting a known session identifier before the victim logs in. The takeaway is to regenerate the session at authentication.

  9. Question:How do the authentication and administrator filters enforce different access boundaries?

    Answer:AuthFilter redirects users without a logged-in session away from protected user pages and sends no-cache headers. AdminFilter allows only users with the ADMIN role to access paths under /admin/. The takeaway is that authentication and role authorization guard different boundaries.

  10. Question:Why does CampusFind use the same login error for an unknown email and wrong password?

    Answer:The error message is identical in both cases, so an attacker cannot learn whether an email belongs to an account. The takeaway is that uniform login errors reduce information exposed during authentication.

  11. Question:How do BCrypt and PreparedStatements address different security risks?

    Answer:BCrypt hashes passwords before they are saved, protecting them from being read as plain text if the database leaks. PreparedStatements use placeholders so user text is not glued into SQL, helping stop SQL injection. The takeaway is that these controls protect credentials and queries respectively.

  12. Question:What would happen if CampusFind ran on Tomcat 9 instead of Tomcat 10?

    Answer:The project uses the Jakarta EE namespace, including jakarta.servlet. Tomcat 9 understands the older javax.servlet names, so the application would not start. The takeaway is that the container version must support the application's namespace.

  13. Question:How does Maven turn CampusFind's project files into a deployable application?

    Answer:Maven reads pom.xml for dependencies and plugins, downloads libraries automatically, and packages the project. Running mvn clean package compiles the Java files and creates CampusFind.war. The takeaway is that Maven manages dependencies and builds the deployment archive.

  14. Question:Why are the Servlet API and JSP API marked as provided dependencies?

    Answer:Tomcat already contains the Servlet API and JSP API, so they are marked provided rather than packaged into the WAR. Other dependencies named in the guide, such as JSTL, the MySQL driver, and jBCrypt, are packaged inside it. The takeaway is that the container supplies the provided APIs.

  15. Question:How does Tomcat make CampusFind available after deployment?

    Answer:Tomcat finds CampusFind.war in its webapps folder and unpacks it. The resulting folder name becomes the application path, /CampusFind. The takeaway is that deployment location and archive name determine the application address.

  16. Question:Why does a JSP page load slightly more slowly the first time it is requested?

    Answer:JSP pages are compiled into servlets when they are first requested. That initial compilation adds work to the first load. The takeaway is that the first request triggers JSP compilation.

  17. Question:How do InnoDB and cascading deletion affect related database records?

    Answer:The database uses InnoDB so foreign keys work. With ON DELETE CASCADE, deleting a user or item automatically removes related rows. The takeaway is that foreign-key relationships can enforce dependent cleanup.

  18. Question:How do CampusFind's five tables represent its principal records?

    Answer:The tables are users, items, claims, notifications, and matches. They store accounts, lost or found reports, ownership claims, in-app alerts, and suggested lost-to-found pairs respectively. The takeaway is that each table represents a distinct record type.

  19. Question:How are users, items, claims, notifications, and matches related?

    Answer:A user can have many items, claims, and notifications. An item can have many claims, while each match links one lost item with one found item. The takeaway is that these relationships model account activity and candidate item pairs.

  20. Question:How do PreparedStatement placeholders reduce the risk of SQL injection?

    Answer:Each query uses a PreparedStatement with ? placeholders. User text is not glued into the SQL, which stops SQL injection. The takeaway is to keep user-supplied values separate from query structure.

  21. Question:Why does try-with-resources matter when database connections are used?

    Answer:try-with-resources closes connections automatically. This prevents connections from being left open and leaking. The takeaway is that automatic resource closure supports reliable database access.

  22. Question:How do a model class and a DAO class differ in this architecture?

    Answer:A model class is a plain Java object representing one table row. A DAO class holds SQL, with an interface and implementation separating data access from servlet logic. The takeaway is that models represent data while DAOs retrieve or store it.

  23. Question:How does the registration process validate and store a student account?

    Answer:RegisterServlet checks the email format, student ID, name, and password length. It hashes the password with BCrypt at work factor 10 and saves a STUDENT account. The takeaway is that validation and password hashing precede account storage.

  24. Question:What happens to a deactivated account during a login attempt?

    Answer:LoginServlet refuses a deactivated account. On successful login, the application instead creates a new session and redirects users according to their role. The takeaway is that account status is checked before an authenticated session is granted.

  25. Question:How do upload limits and file renaming reduce risks from submitted photos?

    Answer:FileUploadUtil accepts JPEG, PNG, and WEBP files up to 5 MB, renames each file to a random UUID, and saves it in images/uploads/. The renaming avoids clashes and dangerous file names; the checks reject unsupported or oversized files. The takeaway is to constrain and safely name uploads.

  26. Question:Why does a newly submitted lost or found report remain hidden?

    Answer:ItemDAO saves the report with PENDING status and the student receives an in-app notification that it awaits administrator review. The report remains hidden from the public until an administrator approves it. The takeaway is that submission does not equal publication.

  27. Question:How can a student search and filter approved CampusFind items?

    Answer:ItemListServlet displays approved items and searches keywords across name, description, and location using SQL LIKE. It also filters by type and category. The takeaway is that keyword search and categorical filters provide complementary ways to narrow results.

  28. Question:How does HTML escaping protect item descriptions from cross-site scripting?

    Answer:ValidationUtil.sanitize performs HTML escaping. This protects against a user entering script tags into a description and having them treated as executable content. The takeaway is to escape user-supplied text before it is rendered as HTML.

  29. Question:How does the matching engine score a pair with identical category, location, and date?

    Answer:The identical category contributes 30 points, identical location contributes 30, and the same date contributes 20. These criteria total 80 points before keyword points are added, exceeding the 50-point match threshold. The takeaway is that strong agreement across core fields can qualify a pair even before keyword scoring.

  30. Question:How does the matching engine score location text that partially overlaps?

    Answer:Identical location text scores 30 points. If one location contains the other, it scores 20; if they share a meaningful word, it scores 15; otherwise it scores 0. The takeaway is that progressively weaker textual overlap receives fewer points.

  31. Question:How does date proximity affect the matching score for two reports?

    Answer:The same day scores 20 points, dates within 3 days score 15, and dates within 7 days score 10. More distant dates score 0. The takeaway is that temporal proximity contributes a graded score.

  32. Question:How do keyword similarity and stop words affect matching scores?

    Answer:Keyword scoring uses Jaccard similarity: shared words divided by all different words, multiplied by 40 and capped at 20. At least two meaningful matching words guarantee a score of at least 10; common stop words are ignored to avoid false matches. The takeaway is that meaningful overlap matters more than generic words.

  33. Question:When does CampusFind run matching, and which items are eligible?

    Answer:Matching runs when an administrator approves a report and when a student opens the matches page for their lost items. Only approved items are compared, and a unique key prevents duplicate lost-found pairs. The takeaway is that matching is triggered by workflow events and restricted to approved reports.

  34. Question:How do in-app notifications keep users informed during item workflows?

    Answer:Notifications are created when reports are submitted, approved, or rejected; when claims are filed or decided; and when a match is found. NotificationDAO stores messages with an is_read flag, and NotificationServlet lists them in the application. The takeaway is that workflow events communicate through in-app alerts rather than email.

  35. Question:How does a claim move from submission through physical handover?

    Answer:The claimant submits verification details, and the claim is saved as PENDING. An admin reviews the proof and approves or rejects the claim. After an approved claim is physically handed over, the admin marks the item RETURNED.

  36. Question:Which verification details support a claim to a found item?

    Answer:Proof that only the true owner would know, such as marks, contents, or a lock-screen description.

  37. Question:How are the claimant and finder notified when a claim is filed?

    Answer:The claim is saved as PENDING, and both the claimant and the person who found the item receive notifications.

  38. Question:How does an admin decide whether to approve a claim?

    Answer:The admin compares the claimant’s verification proof and approves or rejects the claim with a response message. The claimant is notified of the decision.

  39. Question:When does an admin mark a found item RETURNED?

    Answer:After the physical handover. The item is kept at the storage location recorded in the report.

  40. Question:Which page do students use to track their claims?

    Answer:claims.jsp

  41. Question:How does the complete item life cycle progress from report to return?

    Answer:A submitted report becomes PENDING, then an admin approves or rejects it. An approved report triggers matching and makes the item public. A claim then becomes PENDING and is approved or rejected by an admin. An approved claim proceeds to physical handover, after which the item is marked RETURNED.

  42. Question:Which information does AdminStatisticsServlet provide about items and claims?

    Answer:It shows counts of lost, found, approved, pending, rejected, and returned items; total and approved claims; the return rate; and item distribution across categories.

  43. Question:How do the statistics help the college evaluate recovery?

    Answer:The totals, return rate, and category distribution indicate how well the system recovers belongings.

  44. Question:Which components supply count queries for AdminStatisticsServlet?

    Answer:ItemDAO and ClaimDAO.

  45. Question:How does DatabaseConnectionTest check the database setup?

    Answer:It checks the database connection and the tables.

  46. Question:How does EndToEndSystemTest demonstrate that system layers work together?

    Answer:It runs the full life cycle in code: registration, login, lost-item reporting, admin approval, found-item reporting, matching, claiming, claim approval, and handover to RETURNED.

  47. Question:In the live demonstration, what follows a student's lost-item report?

    Answer:The report has PENDING status, and a notification appears.

  48. Question:How does admin approval affect a lost-item report in the live demonstration?

    Answer:Matching runs, and the admin controls which items become public.

  49. Question:Which factors appear in the live matching score breakdown?

    Answer:Category, location, date, and keywords.

  50. Question:What does filing a claim on a found item require in the live demonstration?

    Answer:Verification details are required.

  51. Question:What changes when the admin marks an item RETURNED and opens Statistics?

    Answer:The return rate and totals update.

  52. Question:How does CampusFind combine system workflow and institutional benefits?

    Answer:It combines a reliable Java web stack with a verified workflow and transparent matching engine. Students gain a trusted place to recover belongings, while the college gains control, history, and statistics.

  53. Question:Which future improvements are proposed for CampusFind?

    Answer:Email or SMS alerts, image-based matching, a database connection pool, and stronger password-reset rules.

  54. Question:Is this artificial intelligence?

    Answer:No. It is a rule-based scoring system with four clear criteria. It is explainable and fast; AI or image recognition could be added later.

  55. Question:Why is the match threshold 50?

    Answer:It is a balance: lower values would show too many weak suggestions, higher values would miss real matches. It is a constant (MATCH_THRESHOLD) that can be changed in one place.

  56. Question:Can two students claim the same item?

    Answer:Yes, both claims are saved as PENDING, but the admin reviews the proof and approves only the genuine one.

  57. Question:Who can see a PENDING report?

    Answer:Only the reporter and admins. The public list shows approved items only.

  58. Question:What happens if an admin rejects a report?

    Answer:The status becomes REJECTED, the reason is stored in rejection_reason, and the reporter gets a notification.