wood burning stoves 2.0*
The moose likes Tomcat and the fly likes Javascript files in Tomcat Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Products » Tomcat
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: 7
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: 18541
    
    8

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: 7
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: 15961
    
  19

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


Customer surveys are for companies who didn't pay proper attention to begin with.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Javascript files in Tomcat
 
Similar Threads
Where to put the CSS folder in web application
Need someone to verify syntax in Tomcat servlet.xml
Jsp under WEB-INF
NetBeans: how does a "Web Module" work ?
Deploying a dynamic web project output as folder in eclipse