XWiki

Modify XWiki Java code and see the change in a running instance

Prerequisite:

The instruction of this task will assume you already did the following task: https://codein.withgoogle.com/dashboard/tasks/6322519776690176/preview/

Objective:

The objective of this task is to learn how to quickly see the result of a modification in a Java class in a running instance of XWiki.

Task:

  1. Start the Ubuntu+Eclipse VM
  2. Open "Eclipse for XWiki core" on the left (might take some time to initialize depending on the allocated resources)
  3. Open the class com.xpn.xwiki.doc.XWikiDocument and go to the method public String getRenderedTitle(XWikiContext context)
  4. Modify the method to return your name as a String instead and save. For example:
     public String getRenderedTitle(XWikiContext context)
     {
         return "Thomas Mortagne";
     }
    
  5. On the bottom, in the tab "Servers" use "Start the server in debug mode" button (a button with a green insect on it)
  6. Open Firefox, go to http://127.0.0.1:8080/xwiki/ and wait for the XWiki initialization to be finish (you should get the home page)
  7. Notice that the title of the home page is now your name
  8. Take a screenshot

Expected Outcome:

The student must provide the screenshot indicated in the previous section.

Task tags

  • java
  • eclipse

Students who completed this task

TitanMx, Manveer Tamber, Elysia

Task type

  • code Code

Level

Beginner
close

2017