Win a copy of Learning OpenStack Networking: Build a solid foundation in virtual networking technologies for OpenStack-based clouds this week in the Cloud/Virtualization forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
  • Liutauras Vilda
  • Campbell Ritchie
  • Tim Cooke
  • Bear Bibeault
  • Devaka Cooray
  • Jeanne Boyarsky
  • Knute Snortum
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Ganesh Patekar
  • Stephan van Hulst
  • Pete Letkeman
  • Carey Brown
  • Tim Holloway
  • Ron McLeod
  • Vijitha Kumara

JavaScript not loading  RSS feed

Ranch Hand
Posts: 147
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Bear Bibeault wrote:Most likely your URLs are not properly formed. You should be using server-relative addresses that start with the context path. see the JspFaq for details.

I am having the same problem. i am using calendar in servlet but java script is not called..calendar is not displayed...code is here. but this code is not working.

Author and ninkuma
Posts: 66804
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
First, why are you emitting all this crud from a Servlet rather than using a JSP.

Secondly, you are using a protocol.

"C:/../calendar.css" will not work ever. First of all, you can't use file protocols on the web and expect things to work on any system other than your own. Do you really think that everyone using your app is going to have your files on their systems? Moreover, that's not even a valid file URL.

See the JspFaq (the entry named ResourceUrlProblems) and modify your resource URLs to use server-relative URLs that begin with the context path.
Consider Paul's rocket mass heater.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!