When i try to run the response.sendRedirect() command in a servlet file i get this error: errorlist
I tried following other examples of codes that do the same thing but i still got the same error so surely im thinking it should be something with the response part that im doing wrong could someone please help me ? I have written the code at the bottom for you guys to see.Thanks guys !
protected void doPost(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException
{
new java.util.Timer().schedule(
new java.util.TimerTask() {
@Override
public void run() {
try {
response.sendRedirect("seats.jsp");
} catch (IOException ex) {
Logger.getLogger(config.class.getName()).log(Level.SEVERE, null, ex);
}
}
},
5000
);
}