I have created a sample GWT+AppEngine project with Eclipse and added one contact.gwt.xml
file as a client. It's corresponding *.contact.nocache.js
created from contact.html
is not being updated with code changes. I am running it on localhost on internal Jetty server.
Here are my files.
contact.html
<!doctype html>
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<title>contact</title>
<script type="text/javascript" laguage="javascript"
src="contact/org.restlet.example.firstapplication.contact.nocache.js?dummyTimeParam=<%=System.currentTimeMillis() %>"></script>
</head>
<body>
<h1>About a contact</h1>
<table>
<tr>
<th>Contact 102</th>
<th>Home address</th>
</tr>
<tr>
<td id="contactContainer" style="vertical-align: top"></td>
<td id="homeAddressContainer"></td>
</tr>
<tr>
<td id="buttonContainer" colspan="2"></td>
</tr>
</table>
</body>
</html>
contact.gwt.xml
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE module PUBLIC "-//Google Inc.//DTD Google Web Toolkit 2.4.0//EN" "http://google-web-toolkit.googlecode.com/svn/tags/2.4.0/distro-source/core/src/gwt-module.dtd">
<module>
<inherits name="com.google.gwt.user.User" />
<inherits name="org.restlet.Restlet" />
<source path="client" />
<source path="shared" />
<inherits name='com.google.gwt.user.theme.clean.Clean' />
<entry-point class='org.restlet.example.firstapplication.client.ContactModule' />
<!-- allow Super Dev Mode -->
<add-linker name="xsiframe"/>
</module>
Relevant part of appengine.web.xml
<static-files>
<include path="**" />
<!-- The following line requires App Engine 1.3.2 SDK -->
<include path="**.nocache.*" expiration="0s" />
<include path="**.cache.*" expiration="365d" />
<exclude path="**.gwt.rpc" />
</static-files>
Restlet Application module
public class TestServerApplication extends Application {
@Override
public Restlet createInboundRoot() {
Router router = new Router(getContext());
Directory dir = new Directory(getContext(), "war:///");
router.attachDefault(dir);
router.attach("/contacts/123", ContactServerResource.class);
return router;
}
}
Whatever changes I make in contact.html
file, it's updated but its corresponding Java file's onModule()
is never called. It always gets 304 response code for .nocache.js
file which gets the same .cache.html
file from "/war/contact/" location.
I think, I need to add Filter as told here (how to clear cache in gwt?) but I am not sure what's going on and how to add this filter without using Java servlets here. Any help would be appreciated.