[sword-svn] r366 - trunk/webapp

scribe at crosswire.org scribe at crosswire.org
Sat Jan 2 16:15:58 MST 2010


Author: scribe
Date: 2010-01-02 16:15:58 -0700 (Sat, 02 Jan 2010)
New Revision: 366

Modified:
   trunk/webapp/init.jsp
Log:
added check for null and setting of SWORD locale from the chosen app locale


Modified: trunk/webapp/init.jsp
===================================================================
--- trunk/webapp/init.jsp	2009-03-09 23:22:16 UTC (rev 365)
+++ trunk/webapp/init.jsp	2010-01-02 23:15:58 UTC (rev 366)
@@ -174,6 +174,10 @@
 	}
 
 	SWMgr mgr = SwordOrb.getSWMgrInstance(request);
+	if (mgr == null) {
+		out.print("Couldn't connect to SWORD backend");
+		return;
+	}
 	// let's cache the modInfo in the session cuz this is alot to grab each time we need it from the orb
 	ModInfo[] modInfo = (ModInfo[])session.getAttribute("ModInfo");
 	if (modInfo == null) {
@@ -404,6 +408,7 @@
 	session.setAttribute("meta", metaContent);
 	session.setAttribute("ActiveDevo",defaultDevo);
 
+	mgr.setDefaultLocale(appLang);
 	mgr.setJavascript(!"Off".equalsIgnoreCase(javascript));
 	mgr.setGlobalOption("Headings", ("Off".equalsIgnoreCase(headings)) ? "Off":"On");
 	mgr.setGlobalOption("Footnotes", ("On".equalsIgnoreCase(footnotes)) ? "On":"Off");




More information about the sword-cvs mailing list