Não está aparecendo no navegador a pagina JSP
@WebServlet(urlPatterns = "/client")
public class ClienteController extends HttpServlet {
private static final long serialVersionUID = 1L;
@Override
protected void service(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
String action = req.getParameter("acao");
String fqn = "br.com.client.bean." + Character.toUpperCase(action.charAt(0)) + action.substring(1);
try {
Class<?> classe = Class.forName(fqn);
Constructor<?> constructor = classe.getDeclaredConstructor(HttpServletRequest.class,
HttpServletResponse.class);
TipoAcao tipoAcao = (TipoAcao) constructor.newInstance(req, resp);
} catch (ClassNotFoundException | NoSuchMethodException | SecurityException | InstantiationException
| IllegalAccessException | IllegalArgumentException | InvocationTargetException e) {
throw new ServletException(e);
}
}
}
public class ClientFormBean implements TipoAcao{
private HttpServletRequest req;
private HttpServletResponse resp;
public ClientFormBean(HttpServletRequest req, HttpServletResponse resp) {
super();
this.req = req;
this.resp = resp;
}
@Override
public void execute() throws ServletException, IOException {
resp.sendRedirect("form-client.jsp");
}
}
<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
pageEncoding="ISO-8859-1"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<c:url value="/client?acao=CadastrarClientesBean" var="cadastroCliente" />
<!DOCTYPE html>
<html>
<head>
<meta charset="ISO-8859-1">
<title>Cadastro de Cliente</title>
</head>
<body>
<h1>Cadastro de Cliente</h1>
<form action="${cadastroCliente}" method="post">
<label for="nome">Nome:</label> <input type="text" id="nome"
name="nome" required><br>
<br> <label for="email">Email:</label> <input type="email"
id="email" name="email" required><br>
<br> <label for="senha">Senha:</label> <input type="password"
id="senha" name="senha" required><br>
<br> <input type="submit" value="Cadastrar">
</form>
</body>
</html>