mirror of
https://github.com/eclipse-sailing-analytics/sailing-analytics.git
synced 2026-11-02 09:09:37 +00:00
created overall leaderboard and added totalPoints column to both leaderboards
This commit is contained in:
1 parent
14f7e78275
commit
48ce5e2e05
7 files changed
+220
-64
No files matched your search
-41
@@ -1,41 +0,0 @@
|
||||
package com.sap.sailing.server.gateway;
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
import javax.servlet.RequestDispatcher;
|
||||
import javax.servlet.ServletContext;
|
||||
import javax.servlet.ServletException;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import com.sap.sailing.domain.leaderboard.Leaderboard;
|
||||
import com.sap.sailing.server.RacingEventService;
|
||||
|
||||
public class SimpleJspForwardServlet extends SailingServerHttpServlet {
|
||||
private static final long serialVersionUID = -1017961881555515288L;
|
||||
|
||||
private static final String PARAM_NAME_LEADERBOARDNAME = "leaderboardName";
|
||||
|
||||
@Override
|
||||
protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
|
||||
RacingEventService racingEventService = getService();
|
||||
if(racingEventService != null) {
|
||||
String query = request.getPathInfo();
|
||||
String jspPath = "/WEB-INF/jsp";
|
||||
String jspFile = "error.jsp";
|
||||
if(query.equals("/leaderboard")) {
|
||||
String leaderboardName = request.getParameter(PARAM_NAME_LEADERBOARDNAME);
|
||||
if (leaderboardName != null) {
|
||||
Leaderboard leaderboard = getService().getLeaderboardByName(leaderboardName);
|
||||
request.setAttribute("leaderboard", leaderboard);
|
||||
jspFile = "leaderboard.jsp";
|
||||
}
|
||||
}
|
||||
request.setAttribute("racingEventService", racingEventService);
|
||||
ServletContext sc = getServletContext();
|
||||
RequestDispatcher requestDispatcher = sc.getRequestDispatcher(jspPath + "/" + jspFile);
|
||||
requestDispatcher.forward(request, response);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
Reference in new issue
Block a user