facebook

Missing Javascript libraries in generate project

  1. MyEclipse IDE
  2.  > 
  3. Spring Development
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #322973 Reply

    hefferan
    Member

    I am using ME4S 10 and scaffolding a full appication using JPA entities as the source. I have selected JSF as the front end to be generated. The following generated file “WebRoot/WEB-INF/sitemesh-decorators/main.jsp” contains the code:

    <meta http-equiv=”content-type” content=”text/html; charset=UTF-8″>
    <script type=”text/javascript” src=”${pageContext.request.contextPath}/resources/dojo/dojo.js” djconfig=”parseOnLoad: true” ></script>
    <script type=”text/javascript” src=”${pageContext.request.contextPath}/resources/spring/Spring.js”></script>
    <script type=”text/javascript” src=”${pageContext.request.contextPath}/resources/spring/Spring-Dojo.js”></script>
    <script type=”text/javascript”>dojo.require(“dojo.parser”);</script>

    However, the resources directory is not to be found in that location and there are no javascript files put in the project anywhere.

    I’ve searched the ME4S installation directory for these files but cannot find them anywhere.

    #322979 Reply

    cconway
    Member

    Those files are found in the spring-js-2.0.7.RELEASE.jar that is added to your project as a dependency. That jar is part of the “Spring MVC 3 Libraries” classpath container.

    At runtime the files are actually being located by the Spring Resource Servlet that is configured in your web.xml. Look in web.xml for a servlet-mapping that maps the path “/resources/*” to the spring Resource Servlet. Now exactly how the Resource Servlet finds the files inside the Spring-js jar is a good question!

Viewing 2 posts - 1 through 2 (of 2 total)
Reply To: Missing Javascript libraries in generate project

You must be logged in to post in the forum log in