-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix Stats navbar, all players on home page
Stats static serve
- Loading branch information
Showing
3 changed files
with
38 additions
and
2 deletions.
There are no files selected for viewing
36 changes: 36 additions & 0 deletions
36
MavenBack/src/main/java/ppp/staticServe/StatisticServe.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
package ppp.staticServe; | ||
|
||
import java.io.IOException; | ||
|
||
import jakarta.servlet.RequestDispatcher; | ||
/*import jakarta.servlet.ServletConfig; | ||
import jakarta.servlet.ServletException;*/ | ||
import jakarta.servlet.annotation.WebServlet; | ||
import jakarta.servlet.http.HttpServlet; | ||
import jakarta.servlet.http.HttpServletRequest; | ||
import jakarta.servlet.http.HttpServletResponse; | ||
|
||
@WebServlet("/stats") | ||
public class StatisticServe extends HttpServlet { | ||
|
||
@Override | ||
public void doGet(HttpServletRequest request, HttpServletResponse response) | ||
throws IOException { | ||
|
||
try { | ||
RequestDispatcher view = request.getRequestDispatcher("/stats.html"); | ||
|
||
System.out.println(view.toString()); | ||
view.forward(request, response); | ||
return; | ||
|
||
} catch (Exception e) { | ||
// TODO Auto-generated catch block | ||
e.printStackTrace(); | ||
response.setStatus(500); | ||
response.getWriter().print("{\"error\":\"" + e + "\"}"); | ||
return; | ||
|
||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters