css - Request Dispatcher does not load the stylesheet file in jsp -


I have an HTML page that takes user name and password from user and it is sent to servlet if both are correct , The servlet will be sent to the JSP page.

  requestDispicher RD = request .getRequestDispatcher ("dynamic / faculty / updatefault.jsp"); RD Forwarded (request, response);  

I check all the pages separately and they all do the right thing. Load the CSS file in Jsp, but when I use the sender, the CSS file is not loaded in JSP.

And of course I will get the following from BrowserLog in NetBeans

  To load the failed resource: The server has HTTP: // localhost: 8080 / css / forms. Answer with the status of 404 (not found) (04: 11: 01: 478 | error, network) on css  

For a dynamic page, you must use this format:

link href = "$ {PageContext.request.contextPath} /css/sample.css "

Static feedback does not have any value, Abuse it will redirect blindly response.sendRedirect ( "sample.jsp");


Comments