Closed DyeKuu closed 3 years ago
This is how it works:
First by entering http://localhost:8080/inf553-web/QueryServlet?year=2011, this will send a request to the QueryServlet.java
.
After getting the result by calling the function in Postgresql.java
, where there is written the SQL script and connection to the database, it will forward the request to Index.jsp
.
Index.jsp
will receive the variable and display them as you see in the screenshot. Here each name is input button. By clicking it, you call the servlet InfoDisplay.java
passing pid as a variable.
In InfoDisplay.java
, it mainly does the same thing. This time it will forward the query result to another jsp file InfoDisplay.jsp
.
However, the functions at this stage are not completed.
http://localhost:8080/inf553-web/QueryServlet?year=2011
This will result in all the info like this.
Click on the name will pass the pid to the servelet. Note that the URL will be different.
The rest is to