I'm calling a servlet from a JSP
page and setting some Attributes in servlet and finally calling ANOTHER JSP
using RequestDispatcher's forward method. The second JSP
is loading, showing the attributes that I've passed to it but none of the STYLESHEETS or jQuery/JAVASCRIPT
files are loading into the page.
Error Msg: Upon Element Inspection in Mozilla of the forwarded JSP page I'm getting following error msg .
The stylesheet .../java/tutorial/mystyle.css was not loaded because its MIME type, “text/html”, is not “text/css”.
And for javascript its showing SYNTAX ERROR
msg.
Without this forwarding if the JSP page is run, both the CSS and JavaScript called on this page are loading.
I've tried adding mime-mapping in my web.xml
for css but still its not working.
I tried calling the second JSP page separately without servlet forwarding everything is working fine, stylesheets and javascripts are all loading.
How can I load my CSS and Javascript during Request forwarding ??
Thanks in advance