Author: theute
Date: 2011-09-14 04:44:23 -0400 (Wed, 14 Sep 2011)
New Revision: 7406
Modified:
epp/portal/branches/EPP_5_2_Branch/gadgets/core/src/main/java/org/exoplatform/portal/gadget/core/GateInGuiceServletContextListener.java
Log:
JBEPP-1169: Move Apache Shindig JS configuration out of a jar
Modified:
epp/portal/branches/EPP_5_2_Branch/gadgets/core/src/main/java/org/exoplatform/portal/gadget/core/GateInGuiceServletContextListener.java
===================================================================
---
epp/portal/branches/EPP_5_2_Branch/gadgets/core/src/main/java/org/exoplatform/portal/gadget/core/GateInGuiceServletContextListener.java 2011-09-14
08:37:46 UTC (rev 7405)
+++
epp/portal/branches/EPP_5_2_Branch/gadgets/core/src/main/java/org/exoplatform/portal/gadget/core/GateInGuiceServletContextListener.java 2011-09-14
08:44:23 UTC (rev 7406)
@@ -32,6 +32,14 @@
@Override
public String loadContentAsString(String path, String encoding) throws
IOException{
+ //To make sure that the path begins with a slash, as required in the javadoc of
method
+ // getResourceAsStream in ServletContext
+ //The leading slash is required on certain application servers such as JBoss,
WebSphere
+ if('/' != path.charAt(0))
+ {
+ path = '/' + path;
+ }
+
InputStream is = scontext.getResourceAsStream(path);
if(is == null)
Show replies by date