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 ...
Marshals:
  • Liutauras Vilda
  • Campbell Ritchie
  • Tim Cooke
  • Bear Bibeault
  • Devaka Cooray
Sheriffs:
  • Jeanne Boyarsky
  • Knute Snortum
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Ganesh Patekar
  • Stephan van Hulst
  • Pete Letkeman
  • Carey Brown
Bartenders:
  • 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
Marshal
Posts: 66804
168
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!