Hi,
Could someone please help me...
I have a
JSP that's beeing called by a filter as follows:
public void doFilter(ServletRequest request, ServletResponse response,
FilterChain chain) throws IOException, ServletException {
...
RequestDispatcher reqDispatch = request
.getRequestDispatcher("/Desktop/MyJSP.jsp");
reqDispatch.forward(request, response);
...
}
The JSP includes the following lines:
<SCRIPT src="../javascript/Util.js"></SCRIPT><noscript>Javascript is required.</noscript>
<SCRIPT language="JavaScript">getStylesheet(navigator, document);</SCRIPT><noscript>Javascript is required.</noscript>
Now, when the browser is trying to render the page, it generates the following two errors:
Syntax error
Object expected error
The two errors correspond to the two SCRIPT lines above. When I removed the SCRIPT lines the two errors were gone.
The question is why the the Util.js Javascript is not being found by the server?
Please note that I did read the FAQ on how to resolve resource url problems. Unfortunately, the following suggestion from FAQ did not solve the problem:
<script src="${pageContext.request.contextPath}/javascript/Util.js"></script>
Any ideas?