Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/EjercitarWeb/src/src/IniciarCursoServlet.java
diff options
context:
space:
mode:
authorSamu <samurey@gmail.com>2013-06-15 15:40:16 (GMT)
committer Samu <samurey@gmail.com>2013-06-15 15:40:16 (GMT)
commit2703c29ca123bedee2899ba3273650b1a1d6183a (patch)
tree48f38e40b5e67f91ef85a5ea8fbf9d2e34132730 /EjercitarWeb/src/src/IniciarCursoServlet.java
parent5592cc2a6b46d3741b8ed1b16e69e18bc4d715e9 (diff)
iniciar curso
Diffstat (limited to 'EjercitarWeb/src/src/IniciarCursoServlet.java')
-rw-r--r--EjercitarWeb/src/src/IniciarCursoServlet.java70
1 files changed, 70 insertions, 0 deletions
diff --git a/EjercitarWeb/src/src/IniciarCursoServlet.java b/EjercitarWeb/src/src/IniciarCursoServlet.java
new file mode 100644
index 0000000..0f6644b
--- /dev/null
+++ b/EjercitarWeb/src/src/IniciarCursoServlet.java
@@ -0,0 +1,70 @@
+package src;
+
+import java.io.IOException;
+import java.util.List;
+
+import javax.ejb.EJB;
+import javax.persistence.EntityManager;
+import javax.persistence.PersistenceContext;
+import javax.servlet.RequestDispatcher;
+import javax.servlet.ServletException;
+import javax.servlet.annotation.WebServlet;
+import javax.servlet.http.HttpServlet;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+import model.Alumno;
+import model.Asignatura;
+import model.Concepto;
+import model.Curso;
+
+import beans.AdministracionBeanRemote;
+
+/**
+ * Servlet implementation class IniciarCursoServlet
+ */
+@WebServlet("/IniciarCursoServlet")
+public class IniciarCursoServlet extends HttpServlet {
+ private static final long serialVersionUID = 1L;
+
+ @PersistenceContext
+ EntityManager em;
+
+ @EJB
+ AdministracionBeanRemote abr;
+
+ /**
+ * @see HttpServlet#HttpServlet()
+ */
+ public IniciarCursoServlet() {
+ super();
+ // TODO Auto-generated constructor stub
+ }
+
+ /**
+ * @see HttpServlet#doGet(HttpServletRequest request, HttpServletResponse response)
+ */
+ protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
+ // TODO Auto-generated method stub
+
+ response.setContentType("text/html;charset=UTF-8");
+
+
+ int idAsignatura= Integer.valueOf(request.getParameter("asignatura"));
+ Asignatura asignatura = em.find(Asignatura.class, idAsignatura);
+
+ abr.calcularProbabilidades(idAsignatura);
+
+ abr.crearRedAlumnos(idAsignatura);
+
+
+ }
+
+ /**
+ * @see HttpServlet#doPost(HttpServletRequest request, HttpServletResponse response)
+ */
+ protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
+ // TODO Auto-generated method stub
+ }
+
+}