mirror of https://github.com/apache/activemq.git
Allow a local resource to override js scripts
git-svn-id: https://svn.apache.org/repos/asf/incubator/activemq/trunk@405482 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
c4b11a6396
commit
fedc03939c
|
@ -17,6 +17,7 @@ package org.apache.activemq.web;
|
|||
import java.io.ByteArrayOutputStream;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.net.URL;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
|
@ -47,7 +48,17 @@ public class AjaxServlet extends MessageListenerServlet {
|
|||
super.doGet(request, response);
|
||||
}
|
||||
|
||||
protected void doJavaScript(HttpServletRequest request, HttpServletResponse response)throws IOException {
|
||||
protected void doJavaScript(HttpServletRequest request, HttpServletResponse response)throws IOException, ServletException {
|
||||
|
||||
// Look for a local resource first.
|
||||
URL url = getServletContext().getResource(request.getServletPath()+request.getPathInfo());
|
||||
if (url!=null)
|
||||
{
|
||||
getServletContext().getRequestDispatcher(request.getServletPath()+request.getPathInfo()).forward(request,response);
|
||||
return;
|
||||
}
|
||||
|
||||
// Serve from the classpath resources
|
||||
String resource="org/apache/activemq/web"+request.getPathInfo();
|
||||
synchronized(jsCache){
|
||||
|
||||
|
|
Loading…
Reference in New Issue