Files
DSpace/dspace/docs/html/ch06.html
Jeffrey Trimble 0bd461646d Final Revisions for 1.6.1
git-svn-id: http://scm.dspace.org/svn/repo/dspace/trunk@5002 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2010-05-21 16:39:25 +00:00

8 lines
8.9 KiB
HTML
Raw Blame History

<html><head><META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>Chapter&nbsp;6.&nbsp;DSpace System Documentation: JPSUI Configuration and Customization</title><meta content="DocBook XSL Stylesheets V1.75.2" name="generator"><link rel="home" href="index.html" title="DSpace Manual"><link rel="up" href="index.html" title="DSpace Manual"><link rel="prev" href="ch05.html" title="Chapter&nbsp;5.&nbsp;DSpace System Documentation: Configuration"><link rel="next" href="ch07.html" title="Chapter&nbsp;7.&nbsp;DSpace System Documentation: Manakin [XMLUI] Configuration and Customization"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF" marginwidth="5m"><div class="navheader"><table summary="Navigation header" width="100%"><tr><th align="center" colspan="3">Chapter&nbsp;6.&nbsp;DSpace System Documentation: JPSUI Configuration and Customization</th></tr><tr><td align="left" width="20%"><a accesskey="p" href="ch05.html">Prev</a>&nbsp;</td><th align="center" width="60%">&nbsp;</th><td align="right" width="20%">&nbsp;<a accesskey="n" href="ch07.html">Next</a></td></tr></table><hr></div><div class="chapter" title="Chapter&nbsp;6.&nbsp;DSpace System Documentation: JPSUI Configuration and Customization"><div class="titlepage"><div><div><h2 class="title"><a name="N15427"></a>Chapter&nbsp;6.&nbsp;<a name="docbook-jspui.html"></a>DSpace System Documentation: JPSUI Configuration and Customization</h2></div></div><div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="section"><a href="ch06.html#N1542F">6.1. Configuration</a></span></dt><dt><span class="section"><a href="ch06.html#N1543B">6.2. Customizing the JSP pages</a></span></dt></dl></div><p>The DSpace digital repository supports two user interfaces: one based on JavaServer Pages (JSP) technologies and one based upon the Apache Cocoon framework. This chapter describes those parameters which are specific to the JPSUI interface.</p><div class="section" title="6.1.&nbsp;Configuration"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="N1542F"></a>6.1.&nbsp;<a name="docbook-jspui.html-configuration"></a>Configuration</h2></div></div><div></div></div><p>The user will need to refer to the extensive WebUI/JSPUI configurations that are contained in <a class="link" href="ch05.html#docbook-configure.html-jspui-settings">5.2.36 JSP Web Interface Settings</a>.</p></div><div class="section" title="6.2.&nbsp;Customizing the JSP pages"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="N1543B"></a>6.2.&nbsp;<a name="docbook-jspui.html-customizing"></a>Customizing the JSP pages</h2></div></div><div></div></div><p>The JSPUI interface is implemented using Java Servlets which handle the business logic, and JavaServer Pages (JSPs) which produce the HTML pages sent to an end-user. Since the JSPs are much closer to HTML than Java code, altering the look and feel of DSpace is relatively easy.</p><p>To make it even easier, DSpace allows you to 'override' the JSPs included in the source distribution with modified versions, that are stored in a separate place, so when it comes to updating your site with a new DSpace release, your modified versions will not be overwritten. It should be possible to dramatically change the look of DSpace to suit your organization by just changing the CSS style file and the site 'skin' or 'layout' JSPs in <code class="literal">jsp/layout</code>; if possible, it is recommended you limit local customizations to these files to make future upgrades easier.</p><p>You can also easily edit the text that appears on each JSP page by editing the <code class="literal">Messages.properties</code> file. However, note that unless you change the entry in all of the different language message files, users of other languages will still see the default text for their language. See <a class="link" href="ch12.html#docbook-application.html-i18n">Internationalization in Application Layer</a>.</p><p>Note that the data (attributes) passed from an underlying Servlet to the JSP may change between versions, so you may have to modify your customized JSP to deal with the new data.</p><p>Thus, if possible, it is recommended you limit your changes to the 'layout' JSPs and the stylesheet.</p><p>The JSPs are available in one of two places:</p><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem"><p><code class="literal">[dspace-source]/dspace-jspui/dspace-jspui-webapp/src/main/webapp/</code> - Only exists if you downloaded the full Source Release of DSpace</p></li><li class="listitem"><p><code class="literal">[dspace-source]/dspace/target/dspace-[version].dir/webapps/dspace-jspui-webapp/</code> - The location where they are copied after first building DSpace.</p></li></ul></div><p>If you wish to modify a particular JSP, place your edited version in the <span class="bold"><strong><code class="literal">[dspace-source]/dspace/modules/jspui/src/main/webapp/</code></strong></span> directory (<span class="emphasis"><em>this is the replacement for the pre-1.5 <code class="literal">/jsp/local</code> directory</em></span>), with the same path as the original. If they exist, these will be used in preference to the default JSPs. For example:</p><div class="informaltable"><table border="1"><colgroup><col><col></colgroup><tbody><tr><td align="center"><span class="bold"><strong>DSpace default</strong></span></td><td align="center"><span class="bold"><strong>Locally-modified version</strong></span>
</td></tr><tr><td><code class="literal">[jsp.dir]/community-list.jsp</code></td><td><code class="literal">[jsp.custom-dir]/dspace/modules/jspui/src/main/webapp/community-list.jsp</code></td></tr><tr><td><code class="literal">[jsp.dir]/mydspace/main.jsp</code></td><td><code class="literal">[jsp.custom-dir]/dspace/modules/jspui/src/main/webapp/mydspace/main.jsp</code></td></tr></tbody></table></div><p>Heavy use is made of a style sheet, <code class="literal">styles.css.jsp</code>. If you make edits, copy the local version to <code class="literal">[jsp.custom-dir]/dspace/modules/jspui/src/main/webapp/styles.css.jsp</code>, and it will be used automatically in preference to the default, as described above.</p><p>Fonts and colors can be easily changed using the stylesheet. The stylesheet is a JSP so that the user's browser version can be detected and the stylesheet tweaked accordingly.</p><p>The 'layout' of each page, that is, the top and bottom banners and the navigation bar, are determined by the JSPs <code class="literal">/layout/header-*.jsp</code> and <code class="literal">/layout/footer-*.jsp</code>. You can provide modified versions of these (in <code class="literal">[jsp.custom-dir]/dspace/modules/jspui/src/main/webapp/layout</code>), or define more styles and apply them to pages by using the "style" attribute of the <code class="literal">dspace:layout</code> tag.</p><div class="orderedlist"><ol class="orderedlist" type="1"><li class="listitem"><p>Rebuild the DSpace installation package by running the following command from your <code class="literal">[dspace-source]/dspace/</code> directory:</p><pre class="screen">mvn package</pre></li><li class="listitem"><p>Update all DSpace webapps to <code class="literal">[dspace]/webapps</code> by running the following command from your <code class="literal">[dspace-source]/dspace/target/dspace-[version]-build.dir</code> directory:</p><pre class="screen">ant -Dconfig=<span class="emphasis"><em>[dspace]</em></span>/config/dspace.cfg update </pre></li><li class="listitem"><p>Deploy the the new webapps: <pre class="screen">cp -R /[dspace]/webapps/* /[tomcat]/webapps</pre></p></li><li class="listitem"><p>Restart Tomcat</p></li></ol></div><p>When you restart the web server you should see your customized JSPs.</p></div></div><HR><p class="copyright">Copyright <20> 2002-2010
<a class="ulink" href="http://www.duraspace.org/" target="_top">DuraSpace</a>
</p><div class="legalnotice" title="Legal Notice"><a name="N1001D"></a><p>
<a class="ulink" href="http://creativecommons.org/licenses/by/3.0/us/" target="_top">
<span class="inlinemediaobject"><img src="http://i.creativecommons.org/l/by/3.0/us/88x31.png"></span>
</a>
</p><p>Licensed under a Creative Commons Attribution 3.0 United States License</p></div><div class="navfooter"><hr><table summary="Navigation footer" width="100%"><tr><td align="left" width="40%"><a accesskey="p" href="ch05.html">Prev</a>&nbsp;</td><td align="center" width="20%">&nbsp;</td><td align="right" width="40%">&nbsp;<a accesskey="n" href="ch07.html">Next</a></td></tr><tr><td valign="top" align="left" width="40%">Chapter&nbsp;5.&nbsp;DSpace System Documentation: Configuration&nbsp;</td><td align="center" width="20%"><a accesskey="h" href="index.html">Home</a></td><td valign="top" align="right" width="40%">&nbsp;Chapter&nbsp;7.&nbsp;DSpace System Documentation: Manakin [XMLUI] Configuration and Customization</td></tr></table></div></body></html>