ajax代写-PA 3
时间:2021-05-18
2021/5/17 PA 3: Building a web application using JSP and RESTful web services https://canvas.eee.uci.edu/courses/36179/assignments/754075 1/3 PA 3: Building a web application using JSP and RESTful web services Due Thursday by 5pm Points 100 Submitting a file upload Start Assignment Prerequisites PA3 will build off of the code that you have written for PA2. In this assignment, you will be revising your web application to use JSP and Ajax. Assignment 1. Use JSP to reimplement the home page (the page that contains the list of your products) for your website. Additionally, select two Java Servlets and reimplement them using JSP. Servlets that are mostly Java logic and do not produce a lot of HTML code can stay as Servlets, while those that produce a lot of HTML code with minimal Java logic are good candidates for turning into JSP. 2. Use Ajax to make your website dynamic and interactive. Among others, you could use Ajax to assist the user with filling the order forms, e.g., when the user chooses a particular state for delivery, obtain the corresponding tax rate from the backend database to update the total price for the product dynamically, or as another example, provide autocomplete capability, such as suggesting states as the user types the name of a state. You can use these files to help with this task: zip codes and tax rates. You have the freedom in identifying other opportunities for using Ajax in making your website dynamic and interactive. At the very least, your website should make use of Ajax for two non-trivial features that the grader can verify. 3. [Extra credit] Create REST services to allow for interaction with the order and product resources stored in your application database. You will need to implement three services that use one of the following methods: (GET, PUT, POST, DELETE) Ensure that proper REST principles and conventions are followed while creating your REST services. For example: A GET method should be used only for retrieving an existing resource, A POST method should be used for creating a new resource, etc. Do not forget to perform validation for certain methods. For instance, when implementing methods like GET, PUT and DELETE to interact with existing resources, you will need to verify if the resource being queried actually exists. If the resource is not found. You will need to throw a 404 - Not Found response. You are required to create your new REST service application in Java. It is mandatory that you use the Jersey REST framework. For the scope of this assignment, it is sufficient that your REST services communicate in JSON. (You are free to implement support for other media types, but 2021/5/17 PA 3: Building a web application using JSP and RESTful web services https://canvas.eee.uci.edu/courses/36179/assignments/754075 2/3 you will have to make sure that your e-commerce web application communicates successfully with the REST service.) You will now need to replace the database interactions for these services in your web application with REST calls. Your web application will now act as a REST client and retrieve the MySQL data indirectly through the new RESTful web service. That is, you will have two applications: A backend application that provides RESTful APIs that essentially exposes the available operations in your database, and An application that is the client of the RESTful APIs, generates the HTML pages and handles requests from the user. Grading This assignment is worth 100 points; 60 points for implementing the 1st requirement, and 40 for the 2nd one. 30 points extra credit, for satisfying the 3rd requirement. The grader may deduct points for the overall quality of the website, its look and feel, performance, and generally how professional the website looks. Submission You need to submit a compressed file containing all of the files comprising your website using Canvas. Include a readme file that specifies your website's general layout/design to help the grader navigate the site. The readme file should make it clear where in the website each requirement is satisfied. If this is a group submission, the readme file should specifically state the name of group members. Only one group member needs to submit the assignment in that case. The grader will uncompress your files and will look for this readme file in the base directory to find the URL where your website is running. Failure to include this file will result in grade deduction. Additionally, in the readme file, provide proper documentation highlighting the details for each RESTful service method that you implement. Your documentation should include the following at the very least Method Type. Request URL. Sample Response. Sample Request (if applicable) Each group member is expected to contribute to all phases of software development, including coding. It is recommended, but not required, to use a version control system, such as Github. (https://github.com/) , for managing your code. This way, team members can collaborate and work effectively on the same code base. You are not allowed to work with anyone outside of your group to complete this assignment. Please be informed that we will be using automated tools to catch potential cases of plagiarism in this class. 2021/5/17 PA 3: Building a web application using JSP and RESTful web services https://canvas.eee.uci.edu/courses/36179/assignments/754075 3/3















































































学霸联盟


essay、essay代写