diff --git a/src/main/java/controller/InvitePatient.java b/src/main/java/controller/InvitePatient.java
new file mode 100644
index 0000000..a6a0992
--- /dev/null
+++ b/src/main/java/controller/InvitePatient.java
@@ -0,0 +1,25 @@
+package controller;
+
+import model.service.condition.ConditionManager;
+import model.service.registration.Registration;
+
+import javax.servlet.annotation.WebServlet;
+import javax.servlet.http.HttpServlet;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import javax.servlet.http.HttpSession;
+import java.io.IOException;
+
+
+@WebServlet("/invitePatient")
+public class InvitePatient extends HttpServlet {
+
+ protected void doPost(HttpServletRequest request, HttpServletResponse response) throws IOException {
+ HttpSession session = request.getSession();
+ model.service.registration.Registration registration=new Registration();
+ registration.invitePatient((Integer) session.getAttribute("id"),(String) request.getParameter("email"),(String) request.getParameter("nome"),(String) request.getParameter("cognome"));
+ response.sendRedirect("JSP/homeTherapist.jsp");
+
+ }
+
+}
\ No newline at end of file
diff --git a/src/main/webapp/JSP/homeTherapist.jsp b/src/main/webapp/JSP/homeTherapist.jsp
index 94fd079..171b747 100644
--- a/src/main/webapp/JSP/homeTherapist.jsp
+++ b/src/main/webapp/JSP/homeTherapist.jsp
@@ -17,27 +17,27 @@
PAZIENTI
-
+
-
-
-
- <%
- if(session.getAttribute("type")!=null && session.getAttribute("type").equals("therapist")){
- @SuppressWarnings("unchecked")
- ArrayList list_user= new UserData().getUsersAndPersonalInfoByIdTherapist((Integer) session.getAttribute("id"));
- SimpleDateFormat sdf = new SimpleDateFormat("dd/MM/yyyy");
+
+
+
+ <%
+ if(session.getAttribute("type")!=null && session.getAttribute("type").equals("therapist")){
+ @SuppressWarnings("unchecked")
+ ArrayList list_user= new UserData().getUsersAndPersonalInfoByIdTherapist((Integer) session.getAttribute("id"));
+ SimpleDateFormat sdf = new SimpleDateFormat("dd/MM/yyyy");
- for(UserInfo u: list_user){
- %>
-
+ for(UserInfo u: list_user){
+ %>
+
|
<%=u.getFirstname()%> <%=u.getLastname()%> |
@@ -51,16 +51,16 @@
Visualizza
-
- <%
+
+ <%
+ }
+ } else {
+ response.sendRedirect("../errorPage/403.html");
}
- } else {
- response.sendRedirect("../errorPage/403.html");
- }
- %>
-
-
-
+ %>
+
+
+
@@ -84,15 +84,14 @@
-
+
-
-
+
+
+