Web Search Interfaces.

Slides:



Advertisements
Similar presentations
1 Web Search Interfaces. 2 Web Search Interface Web search engines of course need a web-based interface. Search page must accept a query string and submit.
Advertisements

Java Server Pages (JSP)
Server Side Programming Common Gateway Interface (CGI): Scripts generate Web pages or other files dynamically by processing form data and returning documents.
Introduction to Servlets Based on: Hall, Brown, Core Servlets and JavaServer Pages.
J.Sant Servlets Joseph Sant Sheridan Institute of Technology.
Objectives Ch. D - 1 At the end of this chapter students will: Know the general architecture and purpose of servlets Understand how to create a basic servlet.
Servlets Stoney Jackson
Servlets and a little bit of Web Services Russell Beale.
An introduction to Java Servlet Programming
Liang, Introduction to Java Programming, Sixth Edition, (c) 2005 Pearson Education, Inc. All rights reserved Chapter 34 Servlets.
JSP Java Server Pages Reference:
June 1, 2000 Object Oriented Programming in Java (95-707) Advanced Topics 1 Lecture 10 Object Oriented Programming in Java Advanced Topics Servlets.
Servlets. A form The HTML source Chapter 1 Please enter your name and password then press start Name: Password: In Netbeans you can graphically create.
1 Web Search Interfaces. 2 Web Search Interface Web search engines of course need a web-based interface. Search page must accept a query string and submit.
Introduction to Servlet & JSP
Servlet Session Tracking II Session API All material and examples are from
Java Server and Servlet CS616 Team 9 Kim Doyle, Susan Kroha, Arunima Palchowdhury, Wei Xu.
Servlets Compiled by Dr. Billy B. L. Lim. Servlets Servlets are Java programs which are invoked to service client requests on a Web server. Servlets extend.
Servlets. Our Project 3-tier application Develop our own multi-threaded server Socket level communication.
Java Servlets and JSP.
Java Servlets. What Are Servlets? Basically, a java program that runs on the server Basically, a java program that runs on the server Creates dynamic.
Gayle J Yaverbaum, PhD Professor of Information Systems Penn State Harrisburg.
1 Servlet How can a HTML page, displayed using a browser, cause a program on a server to be executed?
Servlets Pranav Maydeo. What is a Servlet ? Servlets are modules of Java code that run in a server application to answer client requests. Servlets are.
Servlets. - Java technology for Common Gateway Interface (CGI) programming. - It is a Java class that dynamically extends the function of a web server.
Chapter 5 Java Servlets. Objectives Explain the nature of a servlet and its operation Use the appropriate servlet methods in a web application Code the.
111 Java Servlets Dynamic Web Pages (Program Files) Servlets versus Java Server Pages Implementing Servlets Example: F15 Warranty Registration Tomcat Configuration.
Web Server Programming 1. Nuts and Bolts. Premises of Course Provides general introduction, no in-depth training Assumes some HTML knowledge Assumes some.
Chapter 3 Servlet Basics. 1.Recall the Servlet Role 2.Basic Servlet Structure 3.A simple servlet that generates plain text 4.A servlet that generates.
Session tracking There are a number of problems that arise from the fact that HTTP is a "stateless" protocol. In particular, when you are doing on- line.
Java Servlets & Java Server Pages Lecture July 2013.
Java Servlets Lec 27. Creating a Simple Web Application in Tomcat.
Chapter 6 Server-side Programming: Java Servlets
Saving Client State Session Tracking: Maintain state about series of requests from same client over time Using Cookies: Clients hold small amount of their.
20-Nov-15introServlets.ppt Intro to servlets. 20-Nov-15introServlets.ppt typical web page – source Hello Hello.
Java Servlet API CGI / HTTP Concepts Java Servlet API.
Introduction to Server-Side Web Development Introduction to Server-Side Web Development Session II: Introduction to Server-Side Web Development with Servlets.
Java Servlets and Java Server Pages Norman White Stern School of Business.
CSI 3125, Preliminaries, page 1 SERVLET. CSI 3125, Preliminaries, page 2 SERVLET A servlet is a server-side software program, Responds oriented other.
1 Introduction to Servlets. Topics Web Applications and the Java Server. HTTP protocol. Servlets 2.
Java Servlets and Java Server Pages
HTTP protocol Java Servlets. HTTP protocol Web system communicates with end-user via HTTP protocol HTTP protocol methods: GET, POST, HEAD, PUT, OPTIONS,
Session Tracking Parts of this presentation was provided by SSE.
Introduction To HTML Dr. Magdi AMER. HTML elements.
How CGI and Java Servlets are Run By David Stein 14 November 2006.
S ERVLETS Form Data 19-Mar-16. F ORM P ROCESSING You must have come across many situations when you need to pass some information from your browser to.
Speaker Name Speaker Title Speaker Title Oracle Corporation Olivier Le Diouris Principal Product Manager Oracle Corporation Building Servlet and JSP Applications.
Java Servlets References: Karen Anewalt, Mary Washington College.
Programming with Java Lecture 6 Elements of a Java Servlet
Introduction to Servlets
Computing with C# and the .NET Framework
Servlet Fudamentals.
Java Servlets By: Tejashri Udavant..
Net-centric Computing
Sessions Many interactive Web sites spread user data entry out over several pages: Ex: add items to cart, enter shipping information, enter billing information.
JDBC & Servlet CSE 4504/6504 Lab.
Session Tracking in Servlets
Sessions.
Servlet.
Chapter 26 Servlets.
Servlets and Java Server Pages
Servlets CEN /28/2018 Copyright 2001 Ege Consulting, Inc.
Handling FORM Data using Servlets
Sessions Many interactive Web sites spread user data entry out over several pages: Ex: add items to cart, enter shipping information, enter billing information.
Web Search Interfaces by Ray Mooney
Servlets.
Servlets Servlets are modules that extend the functionality of a “java-enabled” web-server They normally generate HTML code and web content dynamically.
Java Servlets Servlet Overview Servlets and HTML Forms Servlet Basics
Servlets Servlets are modules that extend the functionality of a “java-enabled” web-server They normally generate HTML code and web content dynamically.
Servlets: Servlet / Web Browser Communication I
Presentation transcript:

Web Search Interfaces

Web Search Interface Web search engines of course need a web-based interface. Search page must accept a query string and submit it within an HTML <form>. Program on the server must process requests and generate HTML text for the top ranked documents with pointers to the original and/or cached web pages. Server program must also allow for requests for more relevant documents for a previous query.

Submit Forms HTML supports various types of program input in forms, including: Text boxes Menus Check boxes Radio buttons When user submits a form, string values for various parameters are sent to the server program for processing. Server program uses these values to compute an appropriate HTML response page.

Simple Search Submit Form <form action="http://prospero.cs.utexas.edu:8082/servlet/irs.Search" method="POST"> <p> <b> Enter your query: </b> <input type="text" name="query" size=40> <p> <b>Search Database: </b> <select name="directory"> <option selected value="/u/mooney/ir-code/corpora/cs-faculty/"> UT CS Faculty <option value="/u/mooney/ir-code/corpora/yahoo-science/"> Yahoo Science </select> <p> <b>Use Relevance Feedback: </b> <input type="checkbox" name="feedback" value="1"> <br> <br> <input type="submit" value="Submit Query"> <input type="reset" value="Reset Form"> </form>

What’s a Servlet? Java’s answer to CGI programming for processing web form requests. Program runs on Web server and builds pages on the fly. When would you use servlets? Page is based on user-submitted data e.g search engines. Data changes frequently e.g. weather-reports. Page uses information from a databases e.g. on-line stores. Requires running a web server that supports servlets.

Basic Servlet Structure import java.io.*; import javax.servlet.*; import javax.servlet.http.*; public class SomeServlet extends HttpServlet { // Handle get request public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { // request – access incoming HTTP headers and HTML form data // response - specify the HTTP response line and headers // (e.g. specifying the content type, setting cookies). PrintWriter out = response.getWriter(); //out - send content to browser }

A Simple Servlet public class HelloWorld extends HttpServlet { import java.io.*; import javax.servlet.*; import javax.servlet.http.*; public class HelloWorld extends HttpServlet { public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { PrintWriter out = response.getWriter(); out.println("Hello World"); }

Generating HTML public class HelloWWW extends HttpServlet { public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { response.setContentType("text/html"); PrintWriter out = response.getWriter(); out.println("<HTML>\n" + "<HEAD><TITLE>HelloWWW</TITLE></HEAD>\n" + "<BODY>\n" + "<H1>Hello WWW</H1>\n" + "</BODY></HTML>"); }

HTML Post Form <FORM ACTION=“/servlet/hall.ThreeParams” METHOD=“POST”> First Parameter: <INPUT TYPE="TEXT" NAME="param1"><BR> Second Parameter: <INPUT TYPE="TEXT" NAME="param2"><BR> Third Parameter: <INPUT TYPE="TEXT" NAME="param3"><BR> <CENTER> <INPUT TYPE="SUBMIT"> </CENTER> </FORM>

Reading Parameters public class ThreeParams extends HttpServlet { public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { response.setContentType("text/html"); PrintWriter out = response.getWriter(); out.println(… +"<UL>\n" + "<LI>param1: " + request.getParameter("param1") + "\n" + "<LI>param2: " + request.getParameter("param2") + "\n" + "<LI>param3: " + request.getParameter("param3") + "\n" + "</UL>\n" + …); } public void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { doGet(request, response);

Form Example

Servlet Output

Session Tracking Typical scenario – shopping cart in online store. Necessary because HTTP is a "stateless" protocol. Common solutions: Cookies and URL-rewriting. Session Tracking API allows you to: Look up session object associated with current request. Create a new session object when necessary. Look up information associated with a session. Store information in a session. Discard completed or abandoned sessions.

Session Tracking API - I Looking up a session object: HttpSession session = request.getSession(true); Pass true to create a new session if one does not exist. Associating information with session: session.setAttribute(“user”, request.getParameter(“name”)) Session attributes can be of any type. Looking up session information: String name = (String) session.getAttribute(“user”)

Session Tracking API - II getId The unique identifier generated for the session. isNew true if the client (browser) has never seen the session. getCreationTime Time in milliseconds since session was made. getLastAccessedTime Time in milliseconds since the session was last sent from client. getMaxInactiveInterval # of seconds session should go without access before being invalidated. Negative value indicates that session should never timeout.

Simple Search Servlet Based on directory parameter, creates or selects existing InvertedIndex for the appropriate corpus. Processes the query with VSR to get ranked results. Writes out HTML ordered list of 10 results starting at the rank of the start parameter. Each item includes: Link to the original URL saved by the spider in the top of the document in BASE tag. Name link with page <TITLE> extracted from file. Additional link to local cached file. If all retrievals not already shown, creates a submit form for “More Results” starting from the next ranked item.

Simple Search Interface Refinements For “More results” requests, stores current ranked list with the user session and displays next set in the list. Integrates relevance feedback interaction with “radio buttons” for “NEUTRAL,” “GOOD,” and “BAD” in HTML form.

Other Search Interface Refinements Highlight search terms in the displayed document. Provided in cached file on Google. Allow for “advanced” search: Phrasal search (“..”) Mandatory terms (+) Negated term (-) Language preference Reverse link Date preference Machine translation of pages.

Clustering Results Group search results into coherent “clusters”: “microwave dish” One group of on food recipes or cookware. Another group on satellite TV reception. “Austin bats” One group on the local flying mammals. One group on the local hockey team. Northern Light used to group results into “folders” based on a pre-established categorization of pages (like DMOZ categories). Alternative is to dynamically cluster search results into groups of similar documents.

User Query Length Users tend to enter short queries. Study in 1998 gave average length of 2.35 words. Evidence that queries are getting longer.

Speech Queries are Longer