Erreur dans JSP EJB Servlet : messageNot Found
Salut,
J'ai une simple application JEE avec EJB et JSP et Servlet. Quand j'exécute la page jsp et que j'appuie sur le bouton ok, une erreur s'affiche :
Citation:
type Status report
messageNot Found
descriptionThe requested resource is not available.
voici la page jsp
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14
| <html>
<head>
<title>TODO supply a title</title>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
</head>
<body>
<form action="control" method="post">
<div>rechercher</div>
<input value="entre numero assure" name="NumASS"/>
<input type="submit" value="ok"/>
</form>
</body>
</html> |
###############################################
la servlet
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44
| @WebServlet(name = "control", urlPatterns = {"/control"})
public class control extends HttpServlet {
@EJB
private AssureFacadeLocal assureFacade;
private static final Logger LOG = Logger.getLogger(control.class.getName());
/**
* Processes requests for both HTTP <code>GET</code> and <code>POST</code>
* methods.
*
* @param request servlet request
* @param response servlet response
* @throws ServletException if a servlet-specific error occurs
* @throws IOException if an I/O error occurs
*/
protected void processRequest(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException {
response.setContentType("text/html;charset=UTF-8");
try (PrintWriter out = response.getWriter()) {
String Num= request.getParameter("NumASS");
long NumASS=Long.parseLong(Num);
// LOG.log(Level.OFF,"NumASS:{0}",NumASS );
Assure assure=assureFacade.find(NumASS);
// LOG.log(Level.OFF,"assure:{0}",assure );
request.setAttribute("assure", assure);
out.println("<!DOCTYPE html>");
out.println("<html>");
out.println("<head>");
out.println("<title>Servlet control</title>");
out.println("</head>");
out.println("<body>");
out.println("<h1>Servlet control at " + request.getContextPath() + "</h1>");
out.println(assure.getNumASS());
out.println(assure.getNomASS());
out.println(assure.getPnomASS());
out.println(assure.getLieuNASS());
out.println(assure.getDateNASS());
out.println(assure.getAdressASS());
out.println(assure.getSalASS());
out.println("</body>");
out.println("</html>");
}
} |
#####################################
Merci pour vote aide.