2

Im using Tomcat 9.0.30 and JDK 8 and Netbeans 11.3. Somehow all my Web-Applications do not start anymore and I did not change anything. They all throw the same exception

Here I auto-generated a servlet and only forwarded a JSP and it still does not work.

package servlets;

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;


@WebServlet(name = "ExamController", urlPatterns = {"/ExamController"})
public class ExamController extends HttpServlet {

    protected void processRequest(HttpServletRequest request, HttpServletResponse response)
            throws ServletException, IOException {
        response.setContentType("text/html;charset=UTF-8");
        request.getRequestDispatcher("examView.jsp").forward(request, response);
    }


    @Override
    protected void doGet(HttpServletRequest request, HttpServletResponse response)
            throws ServletException, IOException {
        processRequest(request, response);
    }


    @Override
    protected void doPost(HttpServletRequest request, HttpServletResponse response)
            throws ServletException, IOException {
        processRequest(request, response);
    }

    @Override
    public String getServletInfo() {
        return "Short description";
    }

}

When I start this class I get this exception: Error Message

BalusC
  • 1,082,665
  • 372
  • 3,610
  • 3,555
Gugelhupf
  • 31
  • 4

1 Answers1

1

I fixed it by downgrading my Netbeans to Version 11.1.

I think that Tomcat 9.0.30 and Netbeans with a version higher than 11.2 are not compatible.

Gugelhupf
  • 31
  • 4