Author: solomax
Date: Thu Apr 26 08:27:14 2012
New Revision: 1330709
URL: http://svn.apache.org/viewvc?rev=1330709&view=rev
Log:
OPENMEETINGS-209 template encoding is modified to allow UTF-8 users/groups
while installing
Modified:
incubator/openmeetings/trunk/singlewebapp/src/install_step1_EN.vm
incubator/openmeetings/trunk/singlewebapp/src/org/openmeetings/servlet/outputhandler/Install.java
Modified: incubator/openmeetings/trunk/singlewebapp/src/install_step1_EN.vm
URL:
http://svn.apache.org/viewvc/incubator/openmeetings/trunk/singlewebapp/src/install_step1_EN.vm?rev=1330709&r1=1330708&r2=1330709&view=diff
==============================================================================
--- incubator/openmeetings/trunk/singlewebapp/src/install_step1_EN.vm (original)
+++ incubator/openmeetings/trunk/singlewebapp/src/install_step1_EN.vm Thu Apr
26 08:27:14 2012
@@ -18,7 +18,7 @@ limitations under the License.
-->
<html xmlns='http://www.w3.org/1999/xhtml' xml:lang='de' lang='de'>
<head>
-<meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1' />
+<meta http-equiv='Content-Type' content='text/html; charset=UTF-8' />
<style type="text/css">
form, fieldset {
Modified:
incubator/openmeetings/trunk/singlewebapp/src/org/openmeetings/servlet/outputhandler/Install.java
URL:
http://svn.apache.org/viewvc/incubator/openmeetings/trunk/singlewebapp/src/org/openmeetings/servlet/outputhandler/Install.java?rev=1330709&r1=1330708&r2=1330709&view=diff
==============================================================================
---
incubator/openmeetings/trunk/singlewebapp/src/org/openmeetings/servlet/outputhandler/Install.java
(original)
+++
incubator/openmeetings/trunk/singlewebapp/src/org/openmeetings/servlet/outputhandler/Install.java
Thu Apr 26 08:27:14 2012
@@ -21,7 +21,6 @@ package org.openmeetings.servlet.outputh
import java.io.File;
import java.io.IOException;
import java.io.StringWriter;
-import java.io.UnsupportedEncodingException;
import java.util.LinkedHashMap;
import java.util.List;
@@ -132,12 +131,6 @@ public class Install extends VelocityVie
return tpl;
}
- private String encodeUTF8(HttpServletRequest httpServletRequest, String
param)
- throws
UnsupportedEncodingException {
- return new String(httpServletRequest
- .getParameter(param).getBytes("8859_1"),
"UTF-8");
- }
-
/*
* (non-Javadoc)
*
@@ -233,70 +226,70 @@ public class Install extends VelocityVie
log.debug("do init installation");
- String username =
encodeUTF8(httpServletRequest, "username");
- String userpass =
encodeUTF8(httpServletRequest, "userpass");
- String useremail =
encodeUTF8(httpServletRequest,"useremail");
- String orgname =
encodeUTF8(httpServletRequest,"orgname");
+ String username =
httpServletRequest.getParameter("username");
+ String userpass =
httpServletRequest.getParameter("userpass");
+ String useremail =
httpServletRequest.getParameter("useremail");
+ String orgname =
httpServletRequest.getParameter("orgname");
InstallationConfig cfg = new
InstallationConfig();
- cfg.allowFrontendRegister =
encodeUTF8(httpServletRequest,"configdefault");
+ cfg.allowFrontendRegister =
httpServletRequest.getParameter("configdefault");
- cfg.mailReferer =
encodeUTF8(httpServletRequest,"configreferer");
- cfg.smtpServer =
encodeUTF8(httpServletRequest,"configsmtp");
- cfg.smtpPort =
encodeUTF8(httpServletRequest,"configsmtpport");
- cfg.mailAuthName =
encodeUTF8(httpServletRequest,"configmailuser");
- cfg.mailAuthPass =
encodeUTF8(httpServletRequest,"configmailpass");
- cfg.mailUseTls =
encodeUTF8(httpServletRequest,"mailusetls");
+ cfg.mailReferer =
httpServletRequest.getParameter("configreferer");
+ cfg.smtpServer =
httpServletRequest.getParameter("configsmtp");
+ cfg.smtpPort =
httpServletRequest.getParameter("configsmtpport");
+ cfg.mailAuthName =
httpServletRequest.getParameter("configmailuser");
+ cfg.mailAuthPass =
httpServletRequest.getParameter("configmailpass");
+ cfg.mailUseTls =
httpServletRequest.getParameter("mailusetls");
cfg.replyToOrganizer =
httpServletRequest.getParameter("replyToOrganizer");
- cfg.defaultLangId =
encodeUTF8(httpServletRequest,"configdefaultLang");
- cfg.swfPath =
encodeUTF8(httpServletRequest,"swftools_path");
- cfg.imageMagicPath =
encodeUTF8(httpServletRequest,"imagemagick_path");
- cfg.sendEmailAtRegister =
encodeUTF8(httpServletRequest,"sendEmailAtRegister");
- cfg.sendEmailWithVerficationCode =
encodeUTF8(httpServletRequest,"sendEmailWithVerficationCode");
- cfg.createDefaultRooms =
encodeUTF8(httpServletRequest,"createDefaultRooms");
+ cfg.defaultLangId =
httpServletRequest.getParameter("configdefaultLang");
+ cfg.swfPath =
httpServletRequest.getParameter("swftools_path");
+ cfg.imageMagicPath =
httpServletRequest.getParameter("imagemagick_path");
+ cfg.sendEmailAtRegister =
httpServletRequest.getParameter("sendEmailAtRegister");
+ cfg.sendEmailWithVerficationCode =
httpServletRequest.getParameter("sendEmailWithVerficationCode");
+ cfg.createDefaultRooms =
httpServletRequest.getParameter("createDefaultRooms");
- cfg.defaultExportFont =
encodeUTF8(httpServletRequest,"default_export_font");
+ cfg.defaultExportFont =
httpServletRequest.getParameter("default_export_font");
- cfg.cryptClassName =
encodeUTF8(httpServletRequest,"crypt_ClassName");
+ cfg.cryptClassName =
httpServletRequest.getParameter("crypt_ClassName");
- cfg.ffmpegPath =
encodeUTF8(httpServletRequest,"ffmpeg_path");
+ cfg.ffmpegPath =
httpServletRequest.getParameter("ffmpeg_path");
- cfg.soxPath =
encodeUTF8(httpServletRequest,"sox_path");
+ cfg.soxPath =
httpServletRequest.getParameter("sox_path");
- cfg.screenViewer =
encodeUTF8(httpServletRequest,"screen_viewer");
+ cfg.screenViewer =
httpServletRequest.getParameter("screen_viewer");
// red5sip integration config
- cfg.red5SipEnable =
encodeUTF8(httpServletRequest,"red5sip_enable");
- cfg.red5SipRoomPrefix =
encodeUTF8(httpServletRequest,"red5sip_room_prefix");
- cfg.red5SipExtenContext =
encodeUTF8(httpServletRequest,"red5sip_exten_context");
+ cfg.red5SipEnable =
httpServletRequest.getParameter("red5sip_enable");
+ cfg.red5SipRoomPrefix =
httpServletRequest.getParameter("red5sip_room_prefix");
+ cfg.red5SipExtenContext =
httpServletRequest.getParameter("red5sip_exten_context");
// SIP Applet Configuration
- cfg.sipEnable =
encodeUTF8(httpServletRequest,"sip_enable");
- cfg.sipRealm =
encodeUTF8(httpServletRequest,"sip_realm");
- cfg.sipPort =
encodeUTF8(httpServletRequest,"sip_port");
- cfg.sipProxyName =
encodeUTF8(httpServletRequest,"sip_proxyname");
- cfg.sipTunnel =
encodeUTF8(httpServletRequest,"sip_tunnel");
- cfg.sipCodebase =
encodeUTF8(httpServletRequest,"sip_codebase");
- cfg.sipForceTunnel =
encodeUTF8(httpServletRequest,"sip_forcetunnel");
+ cfg.sipEnable =
httpServletRequest.getParameter("sip_enable");
+ cfg.sipRealm =
httpServletRequest.getParameter("sip_realm");
+ cfg.sipPort =
httpServletRequest.getParameter("sip_port");
+ cfg.sipProxyName =
httpServletRequest.getParameter("sip_proxyname");
+ cfg.sipTunnel =
httpServletRequest.getParameter("sip_tunnel");
+ cfg.sipCodebase =
httpServletRequest.getParameter("sip_codebase");
+ cfg.sipForceTunnel =
httpServletRequest.getParameter("sip_forcetunnel");
// OpenXG / OpenSIPg Configuration
- cfg.sipOpenxgEnable =
encodeUTF8(httpServletRequest,"sip_openxg_enable");
- cfg.openxgWrapperUrl =
encodeUTF8(httpServletRequest,"openxg_wrapper_url");
- cfg.openxgClientId =
encodeUTF8(httpServletRequest,"openxg_client_id");
- cfg.openxgClientSecret =
encodeUTF8(httpServletRequest,"openxg_client_secret");
- cfg.openxgClientDomain =
encodeUTF8(httpServletRequest,"openxg_client_domain");
- cfg.openxgCommunityCode =
encodeUTF8(httpServletRequest,"openxg_community_code");
- cfg.openxgLanguageCode =
encodeUTF8(httpServletRequest,"openxg_language_code");
- cfg.openxgAdminId =
encodeUTF8(httpServletRequest,"openxg_adminid");
+ cfg.sipOpenxgEnable =
httpServletRequest.getParameter("sip_openxg_enable");
+ cfg.openxgWrapperUrl =
httpServletRequest.getParameter("openxg_wrapper_url");
+ cfg.openxgClientId =
httpServletRequest.getParameter("openxg_client_id");
+ cfg.openxgClientSecret =
httpServletRequest.getParameter("openxg_client_secret");
+ cfg.openxgClientDomain =
httpServletRequest.getParameter("openxg_client_domain");
+ cfg.openxgCommunityCode =
httpServletRequest.getParameter("openxg_community_code");
+ cfg.openxgLanguageCode =
httpServletRequest.getParameter("openxg_language_code");
+ cfg.openxgAdminId =
httpServletRequest.getParameter("openxg_adminid");
// SIP Phone Range Configuration
- cfg.sipLanguagePhoneCode =
encodeUTF8(httpServletRequest,"sip_language_phonecode");
- cfg.sipPhoneRangeStart =
encodeUTF8(httpServletRequest,"sip_phonerange_start");
- cfg.sipPhoneRange =
encodeUTF8(httpServletRequest,"sip_phonerange");
+ cfg.sipLanguagePhoneCode =
httpServletRequest.getParameter("sip_language_phonecode");
+ cfg.sipPhoneRangeStart =
httpServletRequest.getParameter("sip_phonerange_start");
+ cfg.sipPhoneRange =
httpServletRequest.getParameter("sip_phonerange");
- String timeZone =
encodeUTF8(httpServletRequest,"timeZone");
+ String timeZone =
httpServletRequest.getParameter("timeZone");
- cfg.jodPath =
encodeUTF8(httpServletRequest,"jod_path");
+ cfg.jodPath =
httpServletRequest.getParameter("jod_path");
log.debug("step 0+ start init with
values. " + username
+ " ***** " + useremail
+ " " + orgname + " "