Meaningless Drivel is fun!*
The moose likes HTML, CSS and JavaScript and the fly likes how to run js file with apache Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "how to run js file with apache" Watch "how to run js file with apache" New topic
Author

how to run js file with apache

Saurabh Naik
Ranch Hand

Joined: Apr 24, 2008
Posts: 87
Hello

I have written some code in javascript file.. and accessing this file through <script src=""> tag in html.. but its not working when I deploy it on apache server.

but when I write same code in html file withing <scritpt> tag its working perfectly. so is there any configuration I have to do on apache server for working with js files. (I am using apache server.. not apache tomcat)


Thanks


SCJP 6 (88%), SCWCD 5 (78%), preparing for SCBCD
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

Is the file being served?
Himanshu Kansal
Ranch Hand

Joined: Jul 05, 2009
Posts: 257
Hello,
Special settiongs are not required, just check as the guru said - if the file's being served. The path in "src" could be the culprit.


Experience and talent are independent of age
Saurabh Naik
Ranch Hand

Joined: Apr 24, 2008
Posts: 87
yes the file is serving.. cause its showing the other contents other than script tag includes.

and I dont thing the src could be culprit.. coz If I open same individual html.. not on server.. but simply double clicking on html file.. its giving me the correct results.
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60752
    
  65

Saurabh Naik wrote: coz If I open same individual html

Please use real words when posting to the forums. Abbreviations such as "coz" in place of "because" only serve to make your posts more difficult to read and less likely to generate useful responses.

Please read this for more information.

thanks,
bear
JavaRanch sheriff

[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: how to run js file with apache
 
Similar Threads
jstl - fmt Tag problem
JSP Syntax - GNUJSP version1.0
datainputstream.readInt() through a js file
javascript not working on the server
html:select AJAX question