I am working on making a sample web application using SpringMVC and JavascriptMVC, deployed Tomcat 7. I have incorporated Spring security and Spring MVC in my application i got help from this article by Mkyong http://www.mkyong.com/spring-security/spring-security-form-login-using-database/ Now my application runs fine when i deploy it on tomcat, but now i want to add Client Side MVC i.e JavascriptMVC in my application for that i want to add scripting resources like js files in my application.
Here's the flow of my application, user launches application using
"//localhost:8080/SpringMVC(application name)/welcome (/welcome is redirected by controller to hello.jsp page)"
this shows login page, once user credentials are write he gets to hello.jsp page. In this page i have added my JacascriptMVC code and referenced a js file in tag, and the application runs fine in my browser locally but when i deploy it on tomcat it says resources not accessable 404 error and only shows basic html, and can't access js and css files.
I have tried alot of ways to access the resource, like
<script src='./WebContent/javascriptmvc/steal/steal.production.js'/>
<script src='WebContent/javascriptmvc/steal/steal.production.js'/>
<script src='/WebContent/javascriptmvc/steal/steal.production.js'/>
but all gave same error.
my application directory structure of war file
-SpringMVC
-WEB-INF
-pages
-hello.jsp
-login.jsp
-META-INF
-WebContent
-javscriptmvc
-steal
-steal.production.js
Any Help would be highly appreciated thanks. Fahad