fixed local resource override of js

git-svn-id: https://svn.apache.org/repos/asf/incubator/activemq/trunk@416641 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Gregory John Wilkins 2006-06-23 08:53:50 +00:00
parent 990b852b42
commit 4225a4937b
1 changed files with 3 additions and 2 deletions

View File

@ -51,10 +51,11 @@ public class AjaxServlet extends MessageListenerServlet {
protected void doJavaScript(HttpServletRequest request, HttpServletResponse response)throws IOException, ServletException {
// Look for a local resource first.
URL url = getServletContext().getResource(request.getServletPath()+request.getPathInfo());
String js = request.getServletPath()+request.getPathInfo();
URL url = getServletContext().getResource(js);
if (url!=null)
{
getServletContext().getRequestDispatcher(request.getServletPath()+request.getPathInfo()).forward(request,response);
getServletContext().getNamedDispatcher("default").forward(request,response);
return;
}