Tags
Artigos Relacionados
Share This
Mudanças Servlet 3.0 anotação @WebServlet
A especificação Servlet 3.0 facilicitou nossa vida com o uso de anotações, veja como ficou mais fácil declarar um Servlet. Agora basta dizer ao container que a classe é um Servlet:
The Servlet 3.0 specification have made our life very easy with the use of annotations, see how it’s easier to declare a Servlet. Now just tell the container that the class is a Servlet:
Antes/ Before:
[cc]
public class CadastroController extends HttpServlet {
//doGet, doPost, etc.
}
[/cc]
+
[cc lang=”xml”]
[/cc]
Depois/ After:
[cc]
@WebServlet(“/cadastro”)
public class CadastroController extends HttpServlet {
//doGet, doPost, etc.
}
[/cc]
Um grande abraço e muito sucesso!
A big hug and sucess!
Nice! I didn’t have time to study JEE6 yet…
Nice post!