Skip to content

Commit

Permalink
added @OverRide in doGET|POST where missing
Browse files Browse the repository at this point in the history
  • Loading branch information
panuozzo77 committed Jan 19, 2024
1 parent 959763a commit 16f6c5a
Show file tree
Hide file tree
Showing 17 changed files with 21 additions and 5 deletions.
4 changes: 2 additions & 2 deletions src/main/java/controller/AddRemovePatientCondition.java
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@

@WebServlet("/AddRemovePatientCondition")
public class AddRemovePatientCondition extends HttpServlet {
//mammt

@Override
protected void doPost(HttpServletRequest request, HttpServletResponse response) throws IOException {
String referer = request.getHeader("Referer");
ConditionManager conditionService= new ConditionManager();
Expand All @@ -33,5 +34,4 @@ protected void doPost(HttpServletRequest request, HttpServletResponse response)
response.sendRedirect(referer);

}

}
1 change: 1 addition & 0 deletions src/main/java/controller/ChangePassword.java
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
@WebServlet("/ChangePassword")
public class ChangePassword extends HttpServlet
{
@Override
protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException
{
String password = request.getParameter("password");
Expand Down
2 changes: 2 additions & 0 deletions src/main/java/controller/ChangeUserInfo.java
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
@WebServlet("/changeDate")
public class ChangeUserInfo extends HttpServlet
{
@Override
protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
HttpSession session = request.getSession();
int userId = (int) session.getAttribute("id");
Expand All @@ -26,6 +27,7 @@ protected void doPost(HttpServletRequest request, HttpServletResponse response)
response.sendRedirect("JSP/userArea.jsp?errorMessage=" + risultato);
}


private boolean updatePersonalInfo(HttpServletRequest request, int userId, UserRegistry userRegistry) {
String firstName = request.getParameter("firstname");
String lastName = request.getParameter("lastname");
Expand Down
1 change: 1 addition & 0 deletions src/main/java/controller/CheckCurrentPassword.java
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
@WebServlet("/ControllPassword")
public class CheckCurrentPassword extends HttpServlet
{
@Override
protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException
{
String password = request.getParameter("password");
Expand Down
1 change: 1 addition & 0 deletions src/main/java/controller/ExerciseController.java
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@

@WebServlet("/exerciseController")
public class ExerciseController extends HttpServlet {
@Override
protected void doPost(HttpServletRequest request, HttpServletResponse response) throws IOException {
ExerciseManager em = new ExerciseManager();
String id = request.getParameter("exerciseID");
Expand Down
1 change: 1 addition & 0 deletions src/main/java/controller/ExerciseEvaluator.java
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
@WebServlet("/exerciseEvaluator")
@MultipartConfig
public class ExerciseEvaluator extends HttpServlet {
@Override
protected void doPost(HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException {
HttpSession s = request.getSession();
String contentType = request.getContentType();
Expand Down
1 change: 1 addition & 0 deletions src/main/java/controller/ExerciseLogger.java
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
maxFileSize=1024*1024*50, // 50 MB
maxRequestSize=1024*1024*100) // 100 MB
public class ExerciseLogger extends HttpServlet {
@Override
protected void doPost(HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException {
String contentType = request.getContentType();
if ("application/json".equals(contentType)) {
Expand Down
2 changes: 2 additions & 0 deletions src/main/java/controller/GetSendMessages.java
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@

@WebServlet("/GetMessages")
public class GetSendMessages extends HttpServlet {
@Override
protected void doGet(HttpServletRequest request, HttpServletResponse response) throws IOException {
HttpSession session = request.getSession();
int userId = (int) session.getAttribute("id");
Expand Down Expand Up @@ -52,6 +53,7 @@ protected void doGet(HttpServletRequest request, HttpServletResponse response) t
response.getWriter().write(jsonArray.toString());
}

@Override
protected void doPost(HttpServletRequest request, HttpServletResponse response)
throws IOException {
try {
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/controller/InvitePatient.java
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

@WebServlet("/invitePatient")
public class InvitePatient extends HttpServlet {

@Override
protected void doPost(HttpServletRequest request, HttpServletResponse response) throws IOException {
HttpSession session = request.getSession();
model.service.registration.Registration registration=new Registration();
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/controller/Login.java
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ public void init() {
this.userData = new UserData();
this.userReg = new UserRegistry();
}

@Override
protected void doPost(HttpServletRequest request, HttpServletResponse response)
throws IOException {

Expand Down
1 change: 1 addition & 0 deletions src/main/java/controller/Logout.java
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
@WebServlet("/logout")
public class Logout extends HttpServlet {

@Override
protected void doPost(HttpServletRequest request, HttpServletResponse response) throws IOException {
HttpSession session = request.getSession(false);
if (session != null) {
Expand Down
1 change: 1 addition & 0 deletions src/main/java/controller/ManageAIExercise.java
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
@WebServlet("/ManageExercise")
public class ManageAIExercise extends HttpServlet
{
@Override
protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException{
String referer = request.getHeader("Referer");
String action = request.getParameter("action");
Expand Down
2 changes: 2 additions & 0 deletions src/main/java/controller/Registration.java
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
@WebServlet("/register")

public class Registration extends HttpServlet {
@Override
protected void doPost(HttpServletRequest request, HttpServletResponse response) throws IOException {

response.setContentType("text/html");
Expand Down Expand Up @@ -47,6 +48,7 @@ private void sessionAttributesForTesting(HttpServletRequest request) {
session.setAttribute("surname", "Selenium");
}

@Override
protected void doGet(HttpServletRequest request, HttpServletResponse response) throws IOException {
UserData ud = new UserData();
HttpSession session = request.getSession();
Expand Down
1 change: 1 addition & 0 deletions src/main/java/controller/ResetPassword.java
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
@WebServlet("/login/resetpassword")
public class ResetPassword extends HttpServlet {

@Override
protected void doPost(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException {

Expand Down
1 change: 1 addition & 0 deletions src/main/java/controller/ScheduleManager.java
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@

@WebServlet("/ScheduleServlet")
public class ScheduleManager extends HttpServlet {
@Override
protected void doPost(HttpServletRequest request, HttpServletResponse response) throws IOException {
int userId = (Integer) request.getSession().getAttribute("id");
response.getWriter().append("Served at: ").append(request.getContextPath());
Expand Down
1 change: 1 addition & 0 deletions src/main/java/controller/SendResetPin.java
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@

@WebServlet("/login/reset")
public class SendResetPin extends HttpServlet {
@Override
public void doPost(HttpServletRequest request, HttpServletResponse response) throws IOException {
String email = request.getParameter("email");
UserData checker = new UserData();
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/controller/exerciseRecommendation.java
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

@WebServlet("/exerciseRecommendation")
public class exerciseRecommendation extends HttpServlet {

@Override
protected void doPost(HttpServletRequest request, HttpServletResponse response) throws IOException {
String referer = request.getHeader("Referer");
ExerciseManager exerciseService= new ExerciseManager();
Expand Down

0 comments on commit 16f6c5a

Please sign in to comment.