QuestionQuestion

In this project you will demonstrate access to your Reston Real Estate Oracle database via Java servlet's and the virtual environment Java Web server.

For this project, it is intended that you do the steps in order. Note that Step 1 calls for the creation of a Student Web page that must be used to call the later Web-related steps.

Steps #2, #3, and #4 should be done in separate Netbeans Web projects, with separate .war files produced, and separate URLs to their servlets. The Step #1 Student Web Page should have a separate link for each of these servlet URLs.

Note that Steps #1 and #2 are counted twice.

Unfortunately JavaServer Pages (JSPs) will not execute in the VDA so you are limited to Java servlets.

Your submissions for this project will consist of screen snapshots and various files.

The Assignment

Step 1: Develop a Student Web Page for RRE for Project #3 that contains a customer welcome title and an appropriate business graphic. This Web page must contain links to the later steps.   

Your deliverables for this step include:
a screen snapshot of your Student Web Page in the VDA

Step 2: Using Netbeans create a .war file for the "Hello World"Java servlet and verify that it works properly.

Your deliverables for this step include:
an output screen snapshot showing that your servlet worked properly in the VDA by displaying the Hello World message
copies of all of your Java servlet source code files

Step 3: Develop a Java servlet that displays a list of your Oracle SALES table sorted by sales price, from lowest to highest. You must have data for two or more sales to demonstrate that your sort works properly via a single query.

Your deliverables for this step include:
an output screen snapshot showing that your servlet worked properly in the VDA by displaying your sorted SALES table data
copies of all of your Java servlet source code files

Step 4: Develop a Java servlet to retrieve all your Oracle SALES table data and then put this data, in sales price order from lowest to highest, into an XML document. Ensure that the output to your XML file is well-formed. It does not need to be validated.

Your deliverables for this step include:
an output screen snapshot showing that your servlet worked properly in the VDA by displaying your generated XML document of sales data sorted by sales price
copies of all of your Java servlet source code files

Solution PreviewSolution Preview

This material may consist of step-by-step explanations on how to solve a problem or examples of proper writing, including the use of citations, references, bibliographies, and formatting. This material is made available for the sole purpose of studying and learning - misuse is strictly forbidden.

@WebServlet(urlPatterns = {"/DisplaySalesData"})
public class DisplaySalesData extends HttpServlet {

    /**
    * Processes requests for both HTTP <code>GET</code> and <code>POST</code>
    * methods.
    *
    * @param request servlet request
    * @param response servlet response
    * @throws ServletException if a servlet-specific error occurs
    * @throws IOException if an I/O error occurs
    */
    protected void processRequest(HttpServletRequest request, HttpServletResponse response)
            throws ServletException, IOException {
       response.setContentType("text/html;charset=UTF-8");
                     
       try (PrintWriter out = response.getWriter()) {
                  
            out.println("<!DOCTYPE html>");
            out.println("<html>");
            out.println("<head>");
            out.println("<title>Servlet DisplaySalesData</title>");            
            out.println("</head>");
            out.println("<body>");
            try {
                /* TODO output your page here. You may use following sample code. */
                Class.forName("oracle.jdbc.driver.OracleDriver");
                Connection con = DriverManager.getConnection("jdbc:oracle:thin:@FA14-CMIS440-485:1521:CITEDB", "amccoy8", "GYso2007$");
                if (con == null) {
                   out.println("Cannot connect to server");
                } else {...
$73.00 for this solution

PayPal, G Pay, ApplePay, Amazon Pay, and all major credit cards accepted.

Find A Tutor

View available Web Development (HTML, XML, PHP, JavaScript, Adobe, Flash, etc.) Tutors

Get College Homework Help.

Are you sure you don't want to upload any files?

Fast tutor response requires as much info as possible.

Decision:
Upload a file
Continue without uploading

SUBMIT YOUR HOMEWORK
We couldn't find that subject.
Please select the best match from the list below.

We'll send you an email right away. If it's not in your inbox, check your spam folder.

  • 1
  • 2
  • 3
Live Chats