I'm trying to display a Java applet in a page on a Grails server. I'm using Sun's handy Javascript snippet for displaying applets:
<script src="http://java.com/js/deployJava.js"></script>
<script>
deployJava.runApplet({codeBase:"${createLinkTo(dir:'applet', absolute:'true')}",
archive:"${createLinkTo(dir:'com/steve/applet', file='applet.jar', absolute:'true')}",
code:"com.steve.Applet.class",
width:"500", height:"500"}, null, "1.5");
</script>
In Config.groovy, I set up the different serverURLs:
environments {
production {
grails.serverURL = "http://10.0.xx.xxx/"
}
development {
grails.serverURL = "http://10.0.yy.yyy:8080/"
}
}
However, the links created by createLinkTo() all have "http://localhost:8080" instead of the URL I specified. (i.e. they look like "http://localhost:8080/my-app/applet".) Is this a bug? Is there a workaround?