Package PackDAO

Examples of PackDAO.DisciplinaDAO


* @author Vinnicyus
*/
public class ValidarDisciplina extends HttpServlet{

     public void doGet(HttpServletRequest p_request, HttpServletResponse p_response) throws IOException, ServletException {
         DisciplinaDAO Ddao = new DisciplinaDAO();
         String disciplina = p_request.getParameter("nome");
         int id = -1;
        try {
            id = Ddao.buscaDisciplinaPorNome(disciplina);
            Disciplina di = new Disciplina(disciplina);
         if(id==-1) {
            try {
                Ddao.cadDisciplina(di);
                 p_request.setAttribute("Mensagem", "Cadastrado com Sucesso!!!");
                 p_request.getRequestDispatcher("/interface/disciplina/cad_disciplinas.jsp").forward(p_request, p_response);
            } catch (SQLException ex) {
                Logger.getLogger(ValidarDisciplina.class.getName()).log(Level.SEVERE, null, ex);
            } catch (ClassNotFoundException ex) {
View Full Code Here

TOP

Related Classes of PackDAO.DisciplinaDAO

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.