Ad

Getting Only One .nocache.js File In Multiple Entry Point Module

- 1 answer

My Project Structure has two Entry Point methods on client side in

ExtryGate.java
ExitGate.java

I have also added EntryGate.gwt.xml and ExitGate. I have carefully changed the following lines in both the files

<module rename-to='entrygate'>
<module rename-to='exitgate'>

In EntryGate.html and ExitGate.html, I have added the following lines:

<script type="text/javascript" language="javascript" src="intellipark/entrygate.nocache.js"></script>

<script type="text/javascript" language="javascript" src="intellipark/exitgate.nocache.js"></script>

The problem is that I have only one nocache.js file i.e. only entrygate.nocache.js file. How can I generate exitgate.nocahce.js file? Is there any dependency on .gwt.rpc file as well? Is there anything that I am doing wrong?

Ad

Answer

If you want exitgate.nocache.js to be generated, you have to pass the ExitGate module name to the GWT Compiler. You can either run the Compiler twice (once for each module), or run it once passing the two modules as arguments.

The *.gwt.rpc files will be distinct for each module (but the same servlet might be able to serve both module's RPC, in case you use the same RemoteService interface in both modules)

Ad
source: stackoverflow.com
Ad