Então, voltei a estudar JEE ai agora estou na parte de Servlets… mas eu n lembro nd…
meu servlet ta assim.
public class OiMundo extends HttpServlet{
@Override
protected void service(HttpServletRequest req, HttpServletResponse res)
throws ServletException, IOException {
PrintWriter out = res.getWriter();
out.println("<html>");
out.println("Caelum explica");
out.println("</html>");
}
}
Blz, Ele ta em um package que chama Servlet.
Ai la no web.xml fico assim…
<web-app xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/j2eeweb-app_2_4.xsd" version="2.4">
<servlet>
<servlet-name>HiWorld</servlet-name>
<servlet-class>Servlet.HiWorld</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>HiWorld</servlet-name>
<url-pattern>/hi</url-pattern>/
</servlet-mapping>
</web-app>
Tem alguem Coisa q eu to eskecendo n da certo esse treco…
Valeu =D