Sun GlassFish Web Space Server 10.0 Administration Guide

ProcedureTo Enable Guest Users to Select a Browser Language

  1. Create a temporary folder, named test.

    mkdir /tmp/test

  2. Copy portal-impl.jar to the tmp folder.

    portal-impl.jar contains language resource bundles for Web Space Server. This JAR file is located in the GlassFish install-dir/domains/domain1/application/j2ee-modules/webspace/WEB-INF/lib/ directory.

    cd GlassFish-install-dir/domains/domain1/application/j2ee-modules

    cp webspace/WEB-INF/lib/portal-impl.jar /tmp/test

  3. Change to the tmpdirectory.

    cd /tmp/test

  4. Extract the portal-impl.jar file.

    jar -xvf portal-impl.jar

    The portal.properties file will be placed in the current directory.

  5. Open portal.properties and copy the locale.default.request property from the Languages and Time Zones section.

  6. If portal-ext.properties does exist in Web Space Server then paste the locale.default.request property into it. Otherwise, create a text file (using any text editor) and name it as portal-ext.properties, and paste the locale.default.request property into it.

    Default location of portal-ext.properties is GlassFish home/applications/j2ee-modules/webspace/WEB-INF/classes/portal-ext.properties.

  7. Set the property to locale.default.request=true.

  8. Save the portal-ext.properties file.

  9. Create a directory structure webspace/WEB-INF/classes/ under ZIP_ROOT/webspace-for-gfv2/var/webspace/war-workspace/customs, and copy the portal-ext.properties file to it.

  10. Change to the ZIP_ROOT/webspace-for-gfv2/var/webspace/war-workspacedirectory.

    cd ZIP_ROOT/webspace-for-gfv2/var/webspace/war-workspace

  11. Run ant -f synchronize.xml.

  12. Restart the GlassFish server.

    It will redeploy websynergy.war and update portal-ext.properties under applications/j2ee-modules/webspace/WEB-INF/classes. Clear browser cookies before accessing Web Space Server interface to allow the changes to take effect.