packagecom.roshka.proyectofinal.lenguaje;importcom.roshka.proyectofinal.entity.Lenguaje;importjakarta.servlet.ServletException;importjakarta.servlet.http.HttpServlet;importjakarta.servlet.http.HttpServletRequest;importjakarta.servlet.http.HttpServletResponse;importjava.io.IOException;importjava.io.PrintWriter;publicclassSaveServletextendsHttpServlet{protectedvoiddoPost(HttpServletRequestrequest,HttpServletResponseresponse)throwsServletException,IOException{response.setContentType("text/html");PrintWriterout=response.getWriter();Stringnombre_lenguaje=request.getParameter("nombre_lenguaje");Lenguajel=newLenguaje();l.setNombre_lenguaje(nombre_lenguaje);intstatus=LenguajeDao.save(l);if(status>0){out.print("<p>Record saved successfully!</p>");request.getRequestDispatcher("index.html").include(request,response);}else{out.println("Sorry! unable to save record");}out.close();}}