0

I am trying to add a .js file https://code.google.com/p/geoxml3/#Basic_Usage to my GWT project.

I have made the entry in my host HTML:

I pasted the .js file in /src/main/resources/ and added it to my build path.

I am getting Error: Failed to load resource: the server responded with a status of 404 (Not Found) http://localhost:8080/src/main/resources/geoxml3.js

I found a very complicated solution here: https://stackoverflow.com/a/1660342/768894

Can someone please help me do it in some simple steps.

Thanks

1 Answer 1

1

Copy this file to your /war folder. Then you can simply add this to your host page:

<script type="text/javascript" src="geoxml3.js"></script>
Sign up to request clarification or add additional context in comments.

6 Comments

Won't this break once I redeploy my war? There should be a way to add the js file such that it always gets included in the war file. Something that is mentioned here stackoverflow.com/a/20323708/768894
Why would it break? As long as you do not delete this file, it will stay there.
It is quite strange but my project seems to have no /war folder... :( It is a maven project.
You must have some public folder - it is the same folder where your host HTML file is.
Super!! it works and I verified by opening the created war file and it was threre..thanks a bunch!!
|

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.