Ex:
<%-- DWR script : added in center tile as these scripts are generated at run time--%>
<%-- DWR script --%>
2. if you look at our WEB-INF folder or WAR file we dont see engine.js or utils.js
3. These files are inside dwr.jar file which we calls DWR frawework. DWRServlet serves these JS files from JAR when request comes from browser
4. when browser requested engins.js , request goes into DWR Servlet
Web.xml
Browser Request:
https://www.mysite.com/MYWEBAPP/dwr/engine.js
5. We can look at src code of DWR Frawework
package org.directwebremoting.servlet;
/**
* A Handler that supports requests for engine.js
* @author Joe Walker [joe at getahead dot ltd dot uk]
*/
public class EngineHandler extends BaseEngineHandler
{
// File is served without additions so all code is in superclass
}
/**
* A Handler that supports requests for engine.js
* @author Joe Walker [joe at getahead dot ltd dot uk]
*/
public class EngineHandler extends BaseEngineHandler
{
// File is served without additions so all code is in superclass
}
**
* A Handler that supports requests for engine.js
* @author Joe Walker [joe at getahead dot ltd dot uk]
*/
public class BaseEngineHandler extends FileJavaScriptHandler
{
/**
* Setup the default values
*/
public BaseEngineHandler()
{
super(DwrConstants.PACKAGE_PATH + "/engine.js", DwrConstants.PACKAGE_PATH + "/copyright.txt");
}
* A Handler that supports requests for engine.js
* @author Joe Walker [joe at getahead dot ltd dot uk]
*/
public class BaseEngineHandler extends FileJavaScriptHandler
{
/**
* Setup the default values
*/
public BaseEngineHandler()
{
super(DwrConstants.PACKAGE_PATH + "/engine.js", DwrConstants.PACKAGE_PATH + "/copyright.txt");
}
...
}
6. Obviously calculator.js is generated at run time by DWR Servlet and serves to browser
So Don't worry about engine.js / util.js in your web application folder
No comments:
Post a Comment