Define another XWiki SuperAdmin account

June 20, 2010

Superadmin is the system administrator account provided by Xwiki and he has always full access to the system.

Check documentation: Superadmin is disabled by default and his password can be modified in the xwiki.cfg file.

Now my problem: superadmin has 1,2,3…9 characters while my existing repository of users (custom application built on top of Oracle Internet Directory – LDAP server) only allows username with 8 chars.

I didnt want to lose the possibility to use superadmin, so I amended my authentication handler (see SSOAuthServiceImpl from previous post) to set as superadmin a different account (xwiki).


RSS Feed with Basic Authentication in Apache Tomcat

June 13, 2010

This is just a summary of a small project I got lately involved in: creation of a RSS feed which authenticates the user upon access.

This has a variety of applications:  most RSS feeds on the Internet are public stream of information (news, blogs) but in an enterprise environment that’s not really an option, information is confidential and must be delivered to users according to well established privileges and security rules.

Read the rest of this entry »

Customising Struts2 JSP tags

March 13, 2009

Here is a possible way to customise the JSP taglib provided by the Struts2 framework.

The topics covered in this post are:

  • add a custom attribute to a given tag (e.g. TextField)
  • customise the Freemarker template to modify the generated HTML code
  • define new themes and templates
  • generate the new TLD for the customised version of the taglib
  • deploy it in a web application (WAR file)

The sample I have created implements a read-only version of the Struts2 JSP taglib: if a given attribute (i.e. viewMode) is set to true then a simple label (plain text) is rendered, instead of the html code for the input type, making the information on the form not editable.

This, in principle, achieves the same purpose as the disabled attribute but it looks much nicer on the web form.

Read the rest of this entry »