rendered paste body// --------------------------- BonjourServlet.java ----------------------------package catalogue;// <servlet-name>catalogue</servlet-name>// <servlet-class>catalogue.CatalogueServlet</servlet-class>// <url-pattern>/Accueil.html</url-pattern>/* Compilation javac -classpath Z:\tomcat\lib\servlet-api.jar catalogue/**/import java.io.*;import javax.servlet.*;import javax.servlet.http.*;public class CatalogueServlet extends HttpServlet{private static final String STYLE = "<link rel='stylesheet' media='screen' type='text/css' href='style.css' />";private static final String HEADER = "<html><head>\n<title>Catalogue</title>\n"+STYLE+"\n</head>\n<body>";private static final String FOOTER = "</body></html>";/*Produit Produit1 = new Produit("Haricots", 666, 12.40);Produit Produit2 = new Produit("Poele", 777, 45.00);Produit Produit3 = new Produit("TDF 3000", 51, 23.00);Produit Produit4 = new Produit("Machin a roulettes", 13, 84.50);Catalogue MonCatalogue = new Catalogue();*/public String toHTMLString() { String monString = HEADER; monString += "<p>Bienvenue sur le catalogue</p>"; monString += FOOTER; return monString;}protected void doGet(HttpServletRequest req, HttpServletResponse resp)throws ServletException,IOException {PrintWriter out = resp.getWriter();out.println(this.toHTMLString());}protected void doPost(HttpServletRequest req, HttpServletResponse resp)throws ServletException, IOException { doGet(req, resp); }}// fin class BonjourServlet