I have a Maven WebApp project in which i am continuously changing my servlet class, Whenever i change my servlet class i to have re-run the project by clean package and tomcat:run, if i don't re-run, it doesn't show changes on webapp what i change in servlet class, Is there any fast method to update my project instead of re-run the project because it takes a lot of time to re-run.
I am using eclipse ide for running my project, so please give me solution based on eclipse.
Suppose that's my servlet classs
import java.io.IOException;
import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
/**
* Servlet implementation class Login_Bridge
*/
@WebServlet("/abc")
public class abc extends HttpServlet {
private static final long serialVersionUID = 1L;
/**
* @see HttpServlet#HttpServlet()
*/
public abc() {
super();
// TODO Auto-generated constructor stub
}
/**
* @see HttpServlet#doGet(HttpServletRequest request, HttpServletResponse response)
*/
protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
// TODO Auto-generated method stub
System.out.println("hello");
}
/**
* @see HttpServlet#doPost(HttpServletRequest request, HttpServletResponse response)
*/
protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
// TODO Auto-generated method stub
System.out.println("hello1");
}
}
Suppose i add another System.out.println("Hello2") in my get method, and when i refresh my page on browser it doesnot show any changes but when i re-run the project by (clean package) then (tomcat:run), then it shows changes on browser so my question is, Is there any other method to do this in a fast way so that i can see changes in fast way.