OpenClinica User Manual/PopupCalendar

edit

After your installation everything works fine, except the popup calendar for choosing dates. Although you use it you still get an error message saying "Invalid date format" when you try to save the data. The reason for this is probably the regional setting of your server: not English/US.

When Tomcat is installed it takes the regional settings of the server. The main objective is to set the environment variables - user.language - user.country (may be optional) Try one of the following approaches. Both approaches change the environment variables for all applications using this tomcat service.

Windows

edit

first approach

edit

To correct this, on a Windows server, choose, Programs, Tomcat, Configure. Go to tab Java, and add two lines to Java options:

-Duser.language=en

-Duser.country=US

second approach

edit

The following approach works for Windows XP and might be similar on other windows versions:

1. stop your tomcat
2. open a console window (enter 'cmd' into the start menu execute field)
3. go to <tomcat installation directory>\bin
4. execute tomcatw6.exe //ES//
5. add the system variables to your java configuration
6. start your tomcat

Save the new settings and restart Tomcat.

Linux

edit

If not exist create new file in /usr/local/tomcat/bin named setenv.sh with this code

#!/bin/bash
JAVA_OPTS="$JAVA_OPTS -Duser.language=en -Duser.country=US"

If setenv.sh exists, add -Duser.language=en and -Duser.country=US to JAVA_OPTS in setenv.sh (/usr/local/tomcat/bin)


Restart tomcat

NB: Debian Squeeze users will create the setenv.sh file in /usr/share/tomcat6/bin.