Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JavaScript not loading

 
rakhi sinha
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.


 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64990
86
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic