Archive

Archive for March, 2010

Change locale to en_GB.ISO-8859-15 (Ubuntu Karmic)

March 29, 2010 2 comments

So, the default character encoding for the English language is UTF-8. Not good when, say, you run a Java applet in the browser that has a different locale.

That happened to me recently. So here are the steps to change the locale and solve the issue:

locale-gen en_GB.ISO-8859-15

update-locale LANG=en_GB.ISO-8859-15

pico /var/lib/locales/supported.d/en

pico /var/lib/locales/supported.d/local

login again and select the new language

I’m not sure if the 2nd step is necessary, though.

When choosing the login language in GDM, you won’t be able to select the character encoding though (not sure why, as in previous versions you could). So for me that meant removing the en_GB.UTF-8 from both the local and en files in supported.d

Struts: solving “According to TLD or attribute directive in tag file, attribute value does not accept any expressions”

March 12, 2010 Leave a comment

This error happens when you try something like:

<s:textfield value=”${someField}”/>

And it is caused because, starting from struts 2.1.x, JSP EL expressions  are not allowed in in the tag’s attributes to avoid a security issue.

Use OGNL instead.

If  you have a custom .tag file (where you’d use ${someField}), you can replace this with %{#attr.someField}.

Your s:textfield in the .tag file would then become:

<s:textfield value=”%{#attr.someField}”/>

Categories: Uncategorized Tags: , , , ,
Follow

Get every new post delivered to your Inbox.