Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8662475
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T16:44:37+00:00 2026-06-12T16:44:37+00:00

I am working on making a sample web application using SpringMVC and JavascriptMVC, deployed

  • 0

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

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-12T16:44:38+00:00Added an answer on June 12, 2026 at 4:44 pm

    I got the problem solved thanks for responding guys….
    I added this code in my servlet xml file,

    <?xml version="1.0" encoding="UTF-8"?>
    <beans xmlns="http://www.springframework.org/schema/beans"
           xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"        
           xmlns:mvc="http://www.springframework.org/schema/mvc"
           xmlns:util="http://www.springframework.org/schema/util"   
           xmlns:context="http://www.springframework.org/schema/context"
           xmlns:oxm="http://www.springframework.org/schema/oxm"
           xsi:schemaLocation="http://www.springframework.org/schema/oxm    
        http://www.springframework.org/schema/oxm/spring-oxm-3.0.xsd
        http://www.springframework.org/schema/mvc
        http://www.springframework.org/schema/mvc/spring-mvc-3.0.xsd
        http://www.springframework.org/schema/beans
        http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
        http://www.springframework.org/schema/util
        http://www.springframework.org/schema/util/spring-util-3.0.xsd
        http://www.springframework.org/schema/context
        http://www.springframework.org/schema/context/spring-context-3.0.xsd">
    <context:component-scan base-package="com.mkyong.common.controller" />
    <mvc:annotation-driven />
    <mvc:resources mapping="/resources/**" location="/resources/" />
    

    then in the jsp file i added this to get js files loaded

    <script type='text/javascript' src="${pageContext.request.contextPath}/resources/javascriptmvc/steal/steal.production.js"></script>

    also i changed the directory strcuture somewhat

    -webapps
        -WEB-INF
            -web.xml
            -mvc-dispatcher0servlet.xml
            -pages
                -hello.jsp
        -resources
            -javscriptmvc
                -steal
                    -steal.production.js
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am working on making a book catalog searchable using Solr. I have written
I am working on making a web service using soap. I'm stuck at trying
I'm about to start working on a web-application and I'll be using Maven. I
I'm making a simple web server using PHP and sockets. Everything is working fine
I'm working on making some code using metaheuristics for finding good solutions to the
I've been experimenting with OpenID, and have set up a sample web page to
A website that I'm working on is making extensive use of the HttpContext.Current.Application store
I'm working on a web application that runs with ASP.Net 3.5 Somewhere in the
I’m making a sample application that uses MigLayout in a very cool way. Unfortunately
I'm working on making a small summarization utility in Java. I'm using the Stanford

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.