Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Location

Description

<ac:structured-macro ac:name="unmigrated-wiki-markup" ac:schema-version="1" ac:macro-id="0e11fdec46e49ca1-4806417f-4ac74370-a4ed9f49-d711984fdc0d8ebd1dbf88ad"><ac:plain-text-body><![CDATA[

[dspace-source]/dspace-jspui/dspace-jspui-api/src/main/java/org/dspace/app/webui

Web UI source files

]]></ac:plain-text-body></ac:structured-macro>

<ac:structured-macro ac:name="unmigrated-wiki-markup" ac:schema-version="1" ac:macro-id="e151ea6c99d8e462-6fb34454-4aec4967-92b78ceb-42b44f3fa1ddd3cc43ee51e8"><ac:plain-text-body><![CDATA[

[dspace-source]/dspace-jspui/dspace-jspui-api/src/main/java/org/dspace/app/filters

Servlet Filters (Servlet 2.3 spec)

]]></ac:plain-text-body></ac:structured-macro>

<ac:structured-macro ac:name="unmigrated-wiki-markup" ac:schema-version="1" ac:macro-id="6895d494ae27a897-3bf9ad1c-4f604c72-a5438c1e-39c80c2e129311241eb2263a"><ac:plain-text-body><![CDATA[

[dspace-source]/dspace-jspui/dspace-jspui-api/src/main/java/org/dspace/app/jsptag

Custom JSP tag class files

]]></ac:plain-text-body></ac:structured-macro>

<ac:structured-macro ac:name="unmigrated-wiki-markup" ac:schema-version="1" ac:macro-id="dd7d741b3f3029cb-d846d80b-4d7b46f1-ac4ebbb3-632a9e200fa2beaeb76e1cb7"><ac:plain-text-body><![CDATA[

[dspace-source]/dspace-jspui/dspace-jspui-api/src/main/java/org/dspace/app/servlet

Servlets for main Web UI (controllers)

]]></ac:plain-text-body></ac:structured-macro>

<ac:structured-macro ac:name="unmigrated-wiki-markup" ac:schema-version="1" ac:macro-id="c9bce2b9a3200d08-d11a66a0-436e4226-9a5f86e5-ca76b6fa4ef92666350fe8a8"><ac:plain-text-body><![CDATA[

[dspace-source]/dspace-jspui/dspace-jspui-api/src/main/java/org/dspace/app/servlet/admin

Servlets that comprise the administration part of the Web UI

]]></ac:plain-text-body></ac:structured-macro>

<ac:structured-macro ac:name="unmigrated-wiki-markup" ac:schema-version="1" ac:macro-id="a6b7f5ff68eaa7ec-1427585a-4c004b19-ba42b6ae-941d0b42ec2857a8876047a5"><ac:plain-text-body><![CDATA[

[dspace-source]/dspace-jspui/dspace-jspui-api/src/main/java/org/dspace/app/webui/util/

Miscellaneous classes used by the servlets and filters

]]></ac:plain-text-body></ac:structured-macro>

<ac:structured-macro ac:name="unmigrated-wiki-markup" ac:schema-version="1" ac:macro-id="874b0540b274378e-bd298755-43154eca-9fa49edb-82bc5a3ffc88ad84c03dec7e"><ac:plain-text-body><![CDATA[

[dspace-source]/dspace-jspui

The JSP files

]]></ac:plain-text-body></ac:structured-macro>

<ac:structured-macro ac:name="unmigrated-wiki-markup" ac:schema-version="1" ac:macro-id="76281bcdf2e004d1-16b76e2e-437d448f-a389a044-2d238e1caa848bee7a93794c"><ac:plain-text-body><![CDATA[

[dspace-source]/dspace/modules/jspui/src/main/webapp

This is where you place customized versions of JSPs—see 6. JSPUI Configuration and Customization

]]></ac:plain-text-body></ac:structured-macro>

<ac:structured-macro ac:name="unmigrated-wiki-markup" ac:schema-version="1" ac:macro-id="142a41fcba63029c-98bd4205-433d479c-bb2db668-fb8b1594bac8aa5c97de68cf"><ac:plain-text-body><![CDATA[

[dspace-source]/dspace/modules/xmlui/src/main/webapp

This is where you place customizations for the Manakin interface—see 7. Manakin [XMLUI] Configuration and Customization

]]></ac:plain-text-body></ac:structured-macro>

<ac:structured-macro ac:name="unmigrated-wiki-markup" ac:schema-version="1" ac:macro-id="f9963508f2da7852-79df2f82-46464e3b-a1129c32-2416d42b88c50ac41b1a65d1"><ac:plain-text-body><![CDATA[

[dspace-source/dspace/modules/jspui/src/main/resources

This is where you can place you customize version of the Messages.properties file.

]]></ac:plain-text-body></ac:structured-macro>

<ac:structured-macro ac:name="unmigrated-wiki-markup" ac:schema-version="1" ac:macro-id="4403b34acc15e6d4-6ae390f4-4bf24fa8-9217b75e-00eeb616b71d1ebf9d465771"><ac:plain-text-body><![CDATA[

[dspace-source]/dspace-jspui/dspace-jspui-webapp/src/main/webapp/WEB-INF/dspace-tags.tld

Custom DSpace JSP tag descriptor

]]></ac:plain-text-body></ac:structured-macro>

.

.

The Build Process

Wiki Markup
The DSpace Maven build process constructs a Web application archive, which is full DSpace installation template directory structure containing a series of web applications.  The results  are placed in _\[dspace-source\]/dspace/buildtarget/dspace.war_. The _build_wars_ Ant target does the work-\[version\]-build.dir/_. The process works as follows:

  • All the DSpace source code is compiled.
  • Wiki Markup
    _\[dspace-source\]/etc/dspace-web.xml_ is copied to _\[dspace-source\]/build_ and the _@@dspace.dir@@_ token inside it replaced with the DSpace installation directory (_dspace.dir_ property from _dspace.cfg_
  • Wiki Markup
    The JSPs are all copied to _\[dspace-source\]/build/jsp_
  • Wiki Markup
    Customized JSPs from _\[dspace-source\]/jsp/local_ are copied on top of these, thus 'overriding' the default versions
  • Wiki Markup
    _\[dspace-source\]/build/dspace.war_ is built
    The contents of _dspace.war_ are:
  • Wiki Markup
    (Top level) -- the JSPs (customized versions from _\[dspace-source\]/jsp/local_ will have overwritten the defaults from the DSpace source distribution)
  • WEB-INF/classes – the compiled DSpace classes
  • Wiki Markup
    _WEB-INF/lib_ -- the third party library JAR files from _\[dspace-source\]/lib_, minus _servlet.jar_ which will be available as part of Tomcat (or other servlet engine)
  • Wiki Markup
    _WEB-INF/web.xml_ -- web deployment descriptor, copied from _\[dspace-source\]/build/dspace-web.xml_
  • Wiki Markup
    _WEB-INF/dspace-tags.tld_ -- tag descriptor
    Note that this does mean there are multiple copies of the compiled DSpace code and third-party libraries in the system, so care must be taken to ensure that they are all in sync. (The storage overhead is a few megabytes, totally insignificant these days.) In general, when you change any DSpace code or JSP, it's best to do a complete update of both the installation (_\[dspace\]_), and to rebuild and redeploy the Web UI and OAI _.war_ files, by running this in _\[dspace-source\]_:
    Code Block
  • , and/or automatically downloaded from the Maven Central code/libraries repository.
  • Wiki Markup
    A full DSpace "installation template" folder is built in {{\[dspace-source\]/dspace/target/dspace-\[version\]-build.dir/}}

Wiki Markup
In order to then install & deploy DSpace from this "installation template" folder, you must run the following from {{\[dspace-source\]/dspace/target/dspace-\[version\]-build.dir/}} :

Code Block
ant -D [dspace]/config/dspace.cfg update

...

...

Please see the

...

Installation instructions for more details about the Installation process.

Servlets and JSPs (JSPUI Only)

The JSPUI Web UI is loosely based around the MVC (model, view, controller) model. The content management API corresponds to the model, the Java Servlets are the controllers, and the JSPs are the views. Interactions take the following basic form:

...

Flow of Control During HTTP Request Processing

Custom JSP Tags (JSPUI Only)

The DSpace JSPs all use some custom tags defined in /dspace/jsp/WEB-INF/dspace-tags.tld, and the corresponding Java classes reside in org.dspace.app.webui.jsptag. The tags are listed below. The dspace-tags.tld file contains detailed comments about how to use the tags, so that information is not repeated here.

  • layout: Just about every JSP uses this tag. It produces the standard HTML header and <BODY>_tag. Thus the content of each JSP is nested inside a _<dspace:layout> tag. The (XML-style)attributes of this tag are slightly complicated--see dspace-tags.tld. The JSPs in the source code bundle also provide plenty of examples.
  • sidebar: Can only be used inside a layout tag, and can only be used once per JSP. The content between the start and end sidebar tags is rendered in a column on the right-hand side of the HTML page. The contents can contain further JSP tags and Java 'scriptlets'.
  • date: Displays the date represented by an org.dspace.content.DCDate object. Just the one representation of date is rendered currently, but this could use the user's browser preferences to display a localized date in the future.
  • include: Obsolete, simple tag, similar to jsp:include. In versions prior to DSpace 1.2, this tag would use the locally modified version of a JSP if one was installed in jsp/local. As of 1.2, the build process now performs this function, however this tag is left in for backwards compatibility.
  • item: Displays an item record, including Dublin Core metadata and links to the bitstreams within it. Note that the displaying of the bitstream links is simplistic, and does not take into account any of the bundling structure. This is because DSpace does not have a fully-fledged dissemination architectural piece yet.Displaying an item record is done by a tag rather than a JSP for two reasons: Firstly, it happens in several places (when verifying an item record during submission or workflow review, as well as during standard item accesses), and secondly, displaying the item turns out to be mostly code-work rather than HTML anyway. Of course, the disadvantage of doing it this way is that it is slightly harder to customize exactly what is displayed from an item record; it is necessary to edit the tag code (org.dspace.app.webui.jsptag.ItemTag). Hopefully a better solution can be found in the future.
  • itemlist, collectionlist, communitylist: These tags display ordered sequences of items, collections and communities, showing minimal information but including a link to the page containing full details. These need to be used in HTML tables.
  • popup: This tag is used to render a link to a pop-up page (typically a help page.) If Javascript is available, the link will either open or pop to the front any existing DSpace pop-up window. If Javascript is not available, a standard HTML link is displayed that renders the link destination in a window named 'dspace.popup'. In graphical browsers, this usually opens a new window or re-uses an existing window of that name, but if a window is re-used it is not 'raised' which might confuse the user. In text browsers, following this link will simply replace the current page with the destination of the link. This obviously means that Javascript offers the best functionality, but other browsers are still supported.
  • selecteperson: A tag which produces a widget analogous to HTML <SELECT>, that allows a user to select one or multiple e-people from a pop-up list.
  • sfxlink: Using an item's Dublin Core metadata DSpace can display an SFX link, if an SFX server is available. This tag does so for a particular item if the sfx.server.url property is defined in dspace.cfg.

Internationalization (JSPUI Only)

Info
titleXMLUI Internationalization

For information about XMLUI Internationalization please see: XMLUI Multilingual Support

The Java Standard Tag Library v1.0 is used to specify messages in the JSPs like this:

...