You are viewing an old version of this page. View the current version.
Compare with Current
View Page History
Version 1
Next »
Add+new+text+to+a+JSP
Files:
Instructions:
- Open the relevant JSP and add a new
element where you want the new text to appear, making sure that the value of the
attribute is unique. For example:
<fmt:message key="jsp.home.mynewkey" />
- Open Messages.properties and (for neatness) find the list of key values for the JSP you just changed. Add a new line corresponding to your new key.
jsp.home.mynewkey = Text of my new key
- Note: Messages.properties contains pairs of "keys" and "values". For example:
jsp.home.search1 = Search
- Generally speaking, the "key" usually refers to the location of the JSP on which this text resides (e.g.
is "search-related" text displayed in dspace-source/jsp/home.jsp)
- Perform the steps in Rebuild+DSpace.
Notes:
- You can, of course, simply add the text directly to the JSP, but you will find it easier to maintain text in your DSpace installation if it is all kept in Messages.properties.
- Remember, when adding or modifying text in Messages.properties, be very careful that you have word-wrap turned off in your text editor!