You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@openwebbeans.apache.org by ge...@apache.org on 2009/11/17 19:16:43 UTC
svn commit: r881429 - in
/incubator/openwebbeans/trunk/webbeans-impl/src/main:
java/org/apache/webbeans/config/ java/org/apache/webbeans/lifecycle/
resources/META-INF/openwebbeans/
Author: gerdogdu
Date: Tue Nov 17 18:16:42 2009
New Revision: 881429
URL: http://svn.apache.org/viewvc?rev=881429&view=rev
Log:
Configuring JSP EL Resolver. Adding new configuration parameter that specifies that application is JSP.
Modified:
incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/config/OpenWebBeansConfiguration.java
incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/lifecycle/EnterpriseLifeCycle.java
incubator/openwebbeans/trunk/webbeans-impl/src/main/resources/META-INF/openwebbeans/openwebbeans-default.properties
Modified: incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/config/OpenWebBeansConfiguration.java
URL: http://svn.apache.org/viewvc/incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/config/OpenWebBeansConfiguration.java?rev=881429&r1=881428&r2=881429&view=diff
==============================================================================
--- incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/config/OpenWebBeansConfiguration.java (original)
+++ incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/config/OpenWebBeansConfiguration.java Tue Nov 17 18:16:42 2009
@@ -59,6 +59,8 @@
public static final String CONTAINER_LIFECYCLE = "org.apache.webbeans.spi.lifecycle";
+ public static final String APPLICATION_IS_JSP = "org.apache.webbeans.application.jspf";
+
public static OpenWebBeansConfiguration getInstance() {
return (OpenWebBeansConfiguration) WebBeansFinder.getSingletonInstance(OpenWebBeansConfiguration.class.getName());
}
@@ -148,6 +150,14 @@
return Boolean.valueOf(value);
}
+
+ public boolean isJspApplication()
+ {
+ String value = getProperty(APPLICATION_IS_JSP);
+
+ return Boolean.valueOf(value);
+ }
+
public boolean useAlternativeOrDeploymentType()
{
String value = getProperty(USE_INJECTION_RESOLVER_VIA_ALTERNATIVE);
Modified: incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/lifecycle/EnterpriseLifeCycle.java
URL: http://svn.apache.org/viewvc/incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/lifecycle/EnterpriseLifeCycle.java?rev=881429&r1=881428&r2=881429&view=diff
==============================================================================
--- incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/lifecycle/EnterpriseLifeCycle.java (original)
+++ incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/lifecycle/EnterpriseLifeCycle.java Tue Nov 17 18:16:42 2009
@@ -188,11 +188,17 @@
logger.info("Deploying scanned beans");
deployer.deploy(this.discovery);
+
+ //Application is configured as JSP
+ if(OpenWebBeansConfiguration.getInstance().isJspApplication())
+ {
+ logger.debug("Application is configured as JSP. Adding EL Resolver");
+
+ ServletContext context = event.getServletContext();
- ServletContext context = event.getServletContext();
-
- JspApplicationContext applicationCtx = JspFactory.getDefaultFactory().getJspApplicationContext(context);
- applicationCtx.addELResolver(new WebBeansELResolver());
+ JspApplicationContext applicationCtx = JspFactory.getDefaultFactory().getJspApplicationContext(context);
+ applicationCtx.addELResolver(new WebBeansELResolver());
+ }
long end = System.currentTimeMillis();
Modified: incubator/openwebbeans/trunk/webbeans-impl/src/main/resources/META-INF/openwebbeans/openwebbeans-default.properties
URL: http://svn.apache.org/viewvc/incubator/openwebbeans/trunk/webbeans-impl/src/main/resources/META-INF/openwebbeans/openwebbeans-default.properties?rev=881429&r1=881428&r2=881429&view=diff
==============================================================================
--- incubator/openwebbeans/trunk/webbeans-impl/src/main/resources/META-INF/openwebbeans/openwebbeans-default.properties (original)
+++ incubator/openwebbeans/trunk/webbeans-impl/src/main/resources/META-INF/openwebbeans/openwebbeans-default.properties Tue Nov 17 18:16:42 2009
@@ -68,4 +68,7 @@
org.apache.webbeans.resolver.useAlternative=true
#conversation service
-org.apache.webbeans.spi.conversation.ConversationService=org.apache.webbeans.spi.conversation.jsf.JSFConversationServiceImpl
\ No newline at end of file
+org.apache.webbeans.spi.conversation.ConversationService=org.apache.webbeans.spi.conversation.jsf.JSFConversationServiceImpl
+
+#application is full jsp or not
+org.apache.webbeans.application.jsp=false
\ No newline at end of file