This commit is contained in:
Keith Donald
2008-04-28 21:50:26 +00:00
parent f50e8ed6e5
commit 454b407ad6
2 changed files with 6 additions and 5 deletions

View File

@@ -15,7 +15,8 @@
<sect1 id="spring-js-resource-servlet">
<title>Serving Javascript Resources</title>
<para>
Spring JS provides a generic <code>ResourceServlet</code> to serve web resources such as CSS and JavaScript files from jar files and the webapp root directory.
Spring JS provides a generic <code>ResourceServlet</code> to serve web resources such as JavaScript and CSS files from jar files, as well as the webapp root directory.
This servlet provides a convenient way to serve Spring.js files to your pages.
To deploy this servlet, declare the following in <code>web.xml</code>:
</para>
<programlisting><![CDATA[
@@ -41,7 +42,7 @@
<para>
Using Spring Javascript in a page requires including the underlying toolkit as normal,
the <code>Spring.js</code> base interface file, and the <code>Spring-(library implementation).js</code> file for the underlying toolkit.
As an example, the following script includes obtain the Dojo implementation of Spring.js from the <code>ResourceServlet</code>:
As an example, the following includes obtain the Dojo implementation of Spring.js using the <code>ResourceServlet</code>:
</para>
<programlisting language="xml"><![CDATA[
<script type="text/javascript" src="<c:url value="/resources/dojo/dojo.js" />"> </script>