The moose likes Tomcat and the fly likes Javascript files in Tomcat Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Products » Tomcat
Reply Bookmark "Javascript files in Tomcat" Watch "Javascript files in Tomcat" New topic
Author

Javascript files in Tomcat

Jason Low
Greenhorn

Joined: Feb 11, 2012
Posts: 6
Hi

I am trying to create a web application using the Spring MVC framework, but I am not sure where Javascript files go within the folder structure. Does it go within the WEB-INF folder or else where??

Thanks!
Jay
Paul Clapham
Bartender

Joined: Oct 14, 2005
Posts: 13842

No, they go anywhere but there. The browser has to be able to download them. So just treat them exactly the same as you would treat an image or an HTML file in your web application.
Jason Low
Greenhorn

Joined: Feb 11, 2012
Posts: 6
I actucally just figured it out a few minutes ago haha. I placed them in a new folder under WebContent. Thanks for the reply though.


Paul Clapham wrote:No, they go anywhere but there. The browser has to be able to download them. So just treat them exactly the same as you would treat an image or an HTML file in your web application.


Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 12513

I usually put them in a folder named "scripts", just like I put my stylesheets in a folder named "styles".


One of the most odious afflictions that Business has inflicted on the modern English language is "pro-active". Most of the time it's simply redundantly used in place of the simple old word "active". And a good deal of the rest of the time it means "You're not overworked enough yet, so go out and find more!"
 
IntelliJ Java IDE
 
subject: Javascript files in Tomcat
 
Threads others viewed
Deploying a dynamic web project output as folder in eclipse
NetBeans: how does a "Web Module" work ?
Where to put the CSS folder in web application
Need someone to verify syntax in Tomcat servlet.xml
Jsp under WEB-INF
WebSphere development made easy
without the weight of IBM tools
http://www.myeclipseide.com