hello
I've been trying to learn about
servlets i am basically a begginer and I basically have a problem while i declare @WebServlet annotation my eclipse says it cannot be resolved into a type when i did some research on it i found this link
http://www.eclipse.org/jdt/apt/introToAPT.html
i followed all the steps in that but still i get the error message what should i do???
This is the code for the servlet as you can see i'm stuck here
package org.prathik.sample;
import java.io.IOException;
import java.io.PrintWriter;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
/**
* Servlet implementation class SimpleServlet
*/
public class SimpleServlet extends HttpServlet {
private static final long serialVersionUID = 1L;
/**
* @see HttpServlet#doGet(HttpServletRequest request, HttpServletResponse response)
*/
@WebServlet(description = "A Simple Servlet" , urlPatterns ={"/SimpleServletPath"})
protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
System.out.print("sample Web Servlet");
PrintWriter writer = response.getWriter();
writer.print("Hello :");
}
}
I am trying to learn from scratch as i basically new to servlets so could some one guide me in the right direction
Thanks
Prathik