I would like to load a jsp file from a servlet-class I got in my App Engine project. I has been able to load jsp files by adding them to the web.xml file but is there any way to load them directly from a servlet class?
Edit: I have tried this without success (no error msg or anything) req.getRequestDispatcher("file.jsp").forward(req, resp);
If you want to include a JSP in the generated response, use
request.getRequestDispatcher("/file.jsp").include(request, response);
If you want to forward to that jsp, use
request.getRequestDispatcher("/file.jsp").forward(request, response);
I was able to solve it myself. Had to add ./
before the filename...
req.getRequestDispatcher("./file.jsp").forward(req, resp);
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With