|jQuery does not work on eclipse localhost (jetty) [message #1015035]
||Wed, 27 February 2013 09:20
| Melanie Lauber
Registered: February 2013
I have a Eclipse Java EE, Juno Service Release 1.
I added the Jetty component to test my mobile apps.
But I somehow can't get jQuery mobile to work when testing through jetty (localhost in eclipse - I do not have an appache or likewise): right-click on project->Run As->Web App Preview.
(I included the jQuery mobile JS/CSS files in the head of my index.html:
<link rel="stylesheet" type="text/css" href="lib/jquery.mobile-1.0.1.css">
If I run the page through the browser pointing to my file location, the jQuery mobile works (no error):
But if I run my project in the Web App Prview I get following error:
Webpage error details
User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; WOW64; Trident/4.0; GTB7.4; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; InfoPath.3; .NET4.0C; .NET4.0E)
Timestamp: Wed, 27 Feb 2013 09:05:47 UTC
Message: '$.mobile' is null or not an object
URI: http:// localhost:63966/CRM_test/index.html
When comparing the URLs I see that when running on localhost the folder WebContent is not in the URL but still, index.html is found.
But it seems as if my jQuery mobile JS/CSS files are never loaded/found.
Why not? Or rather, how to fix this?
A little note:
When I tried to load the JS/CSS files from jQuery directly in the localhost URL:
Then I get once only an "Windows Internet Explorer" error saying:
Unable to download jquery.mobile-1.0.1.css from localhost.
Unable to open this Internet site. The requested site is either unavailable or cannot be found. Please try again later.
If I press OK and load the exact same file again, I do get the CSS file. So I know something isn't complete right but I have no idea how to fix it. Any ideas?
Powered by FUDForum
. Page generated in 0.01595 seconds