MyEclipse Forums
Post new topic   Reply to topic
View previous topic Printable version Log in to check your private messages View next topic
Author Message
hefferan
Post subject: Missing Javascript libraries in generate project  PostPosted: Feb 05, 2012 - 05:36 PM
Registered Member
Registered Member


Joined: Sep 19, 2010
Posts: 3

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.
 
 View user's profile Send private message  
Reply with quote Back to top
cconway
Post subject:   PostPosted: Feb 05, 2012 - 10:37 PM



Joined: Apr 04, 2011
Posts: 196

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!

_________________
Cindy
MyEclipse for Spring Support
 
 View user's profile Send private message Send e-mail  
Reply with quote Back to top
Display posts from previous:     
Jump to:  
All times are GMT - 6 Hours
Post new topic   Reply to topic
View previous topic Printable version Log in to check your private messages View next topic
Powered by PNphpBB2 © 2003-2004 The PNphpBB Group
Credits