Accessing ScriptEngineFactory in CQ5 component
I’d like to leverage the scripting capability (provided by Java/Sling) in a CQ5 component. In essence, the component’s dialog will provide a TextArea field where the author can write a ECMA script which then will be evaluated by the component for that the result can be displayed on the page containing the component.
For that I can evaluate the scripted input by the author, I create a javax.script.ScriptEngineManager and try to get a ScriptEngineFactory from this manager instance. However, when I call ScriptEngineManager.getEngineFactories(), I get an empty list.
How do I have to proceed to get a ScriptEngineFactory instance (e.g. RhinoJavaScriptEngineFactory) in my CQ5 component?
Hi,
You should get the ScriptEngineManager from the OSGi Service Registry.
From a JSP, something like:
ScriptEngineManager manager = sling.getService(ScriptEngineManager.class);
From a DS component:
@Reference
private ScriptEngineManager manager;
HTH,
Justin
Similar Messages
-
Not able to Access the Remote EJB component
Hi,
Please help me i am trying to access the EJB Remote Component through my struts application but i am getting following error:
Aug 23, 2007 4:49:06 PM org.apache.coyote.http11.Http11Protocol init
INFO: Initializing Coyote HTTP/1.1 on http-8081
Aug 23, 2007 4:49:06 PM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 2086 ms
Aug 23, 2007 4:49:06 PM org.apache.catalina.core.StandardService start
INFO: Starting service Catalina
Aug 23, 2007 4:49:06 PM org.apache.catalina.core.StandardEngine start
INFO: Starting Servlet Engine: Apache Tomcat/5.0.28
Aug 23, 2007 4:49:06 PM org.apache.catalina.core.StandardHost start
INFO: XML validation disabled
Aug 23, 2007 4:49:06 PM org.apache.catalina.core.StandardHost getDeployer
INFO: Create Host deployer for direct deployment ( non-jmx )
Aug 23, 2007 4:49:06 PM org.apache.catalina.core.StandardHostDeployer install
INFO: Processing Context configuration file URL file:C:\Program Files\Apache Software Foundation\Tomcat 5.0\conf\Catalina\localhost\admin.xml
Aug 23, 2007 4:49:08 PM org.apache.struts.util.PropertyMessageResources <init>
INFO: Initializing, config='org.apache.struts.util.LocalStrings', returnNull=true
Aug 23, 2007 4:49:08 PM org.apache.struts.util.PropertyMessageResources <init>
INFO: Initializing, config='org.apache.struts.action.ActionResources', returnNull=true
Aug 23, 2007 4:49:09 PM org.apache.struts.util.PropertyMessageResources <init>
INFO: Initializing, config='org.apache.webapp.admin.ApplicationResources', returnNull=true
Aug 23, 2007 4:49:11 PM org.apache.catalina.core.StandardHostDeployer install
INFO: Processing Context configuration file URL file:C:\Program Files\Apache Software Foundation\Tomcat 5.0\conf\Catalina\localhost\balancer.xml
Aug 23, 2007 4:49:11 PM org.apache.catalina.core.StandardHostDeployer install
INFO: Processing Context configuration file URL file:C:\Program Files\Apache Software Foundation\Tomcat 5.0\conf\Catalina\localhost\manager.xml
Aug 23, 2007 4:49:11 PM org.apache.catalina.core.StandardHostDeployer install
INFO: Installing web application at context path /registration from URL file:C:/Program Files/Apache Software Foundation/Tomcat 5.0/webapps/registration
Aug 23, 2007 4:49:11 PM java.util.jar.Attributes read
WARNING: Duplicate name in Manifest: Class-Path
Aug 23, 2007 4:49:11 PM java.util.jar.Attributes read
WARNING: Duplicate name in Manifest: Class-Path
Aug 23, 2007 4:49:11 PM java.util.jar.Attributes read
WARNING: Duplicate name in Manifest: Class-Path
Aug 23, 2007 4:49:11 PM java.util.jar.Attributes read
WARNING: Duplicate name in Manifest: Class-Path
Aug 23, 2007 4:49:11 PM java.util.jar.Attributes read
WARNING: Duplicate name in Manifest: Class-Path
Aug 23, 2007 4:49:11 PM java.util.jar.Attributes read
WARNING: Duplicate name in Manifest: Class-Path
Aug 23, 2007 4:49:11 PM java.util.jar.Attributes read
WARNING: Duplicate name in Manifest: Class-Path
Aug 23, 2007 4:49:12 PM java.util.jar.Attributes read
WARNING: Duplicate name in Manifest: Class-Path
Aug 23, 2007 4:49:12 PM java.util.jar.Attributes read
WARNING: Duplicate name in Manifest: Class-Path
Aug 23, 2007 4:49:12 PM java.util.jar.Attributes read
WARNING: Duplicate name in Manifest: Class-Path
Aug 23, 2007 4:49:12 PM java.util.jar.Attributes read
WARNING: Duplicate name in Manifest: Class-Path
Aug 23, 2007 4:49:12 PM java.util.jar.Attributes read
WARNING: Duplicate name in Manifest: Class-Path
Aug 23, 2007 4:49:12 PM java.util.jar.Attributes read
WARNING: Duplicate name in Manifest: Class-Path
Aug 23, 2007 4:49:12 PM java.util.jar.Attributes read
WARNING: Duplicate name in Manifest: Class-Path
Aug 23, 2007 4:49:14 PM org.apache.catalina.core.StandardHostDeployer install
INFO: Installing web application at context path /customercare from URL file:C:\Program Files\Apache Software Foundation\Tomcat 5.0\webapps\customercare
Aug 23, 2007 4:49:15 PM java.util.jar.Attributes read
WARNING: Duplicate name in Manifest: Class-Path
Aug 23, 2007 4:49:15 PM java.util.jar.Attributes read
WARNING: Duplicate name in Manifest: Class-Path
Aug 23, 2007 4:49:15 PM java.util.jar.Attributes read
WARNING: Duplicate name in Manifest: Class-Path
Aug 23, 2007 4:49:15 PM java.util.jar.Attributes read
WARNING: Duplicate name in Manifest: Class-Path
Aug 23, 2007 4:49:15 PM java.util.jar.Attributes read
WARNING: Duplicate name in Manifest: Class-Path
Aug 23, 2007 4:49:15 PM java.util.jar.Attributes read
WARNING: Duplicate name in Manifest: Class-Path
Aug 23, 2007 4:49:15 PM java.util.jar.Attributes read
WARNING: Duplicate name in Manifest: Class-Path
Aug 23, 2007 4:49:15 PM org.apache.catalina.loader.WebappClassLoader validateJarFile
INFO: validateJarFile(C:\Program Files\Apache Software Foundation\Tomcat 5.0\webapps\customercare\WEB-INF\lib\servlet.jar) - jar not loaded. See Servlet Spec 2.3, section 9.7.2. Offending class: javax/servlet/Servlet.class
Aug 23, 2007 4:49:16 PM java.util.jar.Attributes read
WARNING: Duplicate name in Manifest: Class-Path
Aug 23, 2007 4:49:16 PM java.util.jar.Attributes read
WARNING: Duplicate name in Manifest: Class-Path
Aug 23, 2007 4:49:16 PM java.util.jar.Attributes read
WARNING: Duplicate name in Manifest: Class-Path
Aug 23, 2007 4:49:16 PM java.util.jar.Attributes read
WARNING: Duplicate name in Manifest: Class-Path
Aug 23, 2007 4:49:16 PM java.util.jar.Attributes read
WARNING: Duplicate name in Manifest: Class-Path
Aug 23, 2007 4:49:16 PM java.util.jar.Attributes read
WARNING: Duplicate name in Manifest: Class-Path
Aug 23, 2007 4:49:16 PM java.util.jar.Attributes read
WARNING: Duplicate name in Manifest: Class-Path
Aug 23, 2007 4:49:16 PM org.apache.struts.util.PropertyMessageResources <init>
INFO: Initializing, config='org.apache.struts.util.LocalStrings', returnNull=true
Aug 23, 2007 4:49:16 PM org.apache.struts.util.PropertyMessageResources <init>
INFO: Initializing, config='org.apache.struts.action.ActionResources', returnNull=true
Aug 23, 2007 4:49:18 PM org.apache.struts.util.PropertyMessageResources <init>
INFO: Initializing, config='com.Test.customercare.web.application', returnNull=true
Aug 23, 2007 4:49:18 PM org.apache.struts.tiles.TilesPlugin init
INFO: Tiles definition factory loaded for module ''.
Aug 23, 2007 4:49:19 PM org.apache.struts.validator.ValidatorPlugIn initResources
INFO: Loading validation rules file from '/WEB-INF/validator-rules.xml'
Aug 23, 2007 4:49:39 PM org.apache.struts.validator.ValidatorPlugIn initResources
SEVERE: Connection timed out: connect
java.net.ConnectException: Connection timed out: connect
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:305)
at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:171)
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:158)
at java.net.Socket.connect(Socket.java:452)
at java.net.Socket.connect(Socket.java:402)
at sun.net.NetworkClient.doConnect(NetworkClient.java:139)
at sun.net.www.http.HttpClient.openServer(HttpClient.java:402)
at sun.net.www.http.HttpClient.openServer(HttpClient.java:618)
at sun.net.www.http.HttpClient.<init>(HttpClient.java:306)
at sun.net.www.http.HttpClient.<init>(HttpClient.java:267)
at sun.net.www.http.HttpClient.New(HttpClient.java:339)
at sun.net.www.http.HttpClient.New(HttpClient.java:320)
at sun.net.www.http.HttpClient.New(HttpClient.java:315)
at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:521)
at sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection.java:498)
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:626)
at org.apache.xerces.impl.XMLEntityManager.setupCurrentEntity(Unknown Source)
at org.apache.xerces.impl.XMLEntityManager.startEntity(Unknown Source)
at org.apache.xerces.impl.XMLEntityManager.startDTDEntity(Unknown Source)
at org.apache.xerces.impl.XMLDTDScannerImpl.setInputSource(Unknown Source)
at org.apache.xerces.impl.XMLDocumentScannerImpl$DTDDispatcher.dispatch(Unknown Source)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
at org.apache.commons.digester.Digester.parse(Digester.java:1514)
at org.apache.commons.validator.ValidatorResourcesInitializer.initialize(ValidatorResourcesInitializer.java:256)
at org.apache.struts.validator.ValidatorPlugIn.initResources(ValidatorPlugIn.java:224)
at org.apache.struts.validator.ValidatorPlugIn.init(ValidatorPlugIn.java:167)
at org.apache.struts.action.ActionServlet.initModulePlugIns(ActionServlet.java:1105)
at org.apache.struts.action.ActionServlet.init(ActionServlet.java:468)
at javax.servlet.GenericServlet.init(GenericServlet.java:211)
at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1029)
at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:862)
at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:4013)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:4357)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:823)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:807)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:595)
at org.apache.catalina.core.StandardHostDeployer.install(StandardHostDeployer.java:277)
at org.apache.catalina.core.StandardHost.install(StandardHost.java:832)
at org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:701)
at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:432)
at org.apache.catalina.startup.HostConfig.start(HostConfig.java:983)
at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:349)
at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1091)
at org.apache.catalina.core.StandardHost.start(StandardHost.java:789)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1083)
at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:478)
at org.apache.catalina.core.StandardService.start(StandardService.java:480)
at org.apache.catalina.core.StandardServer.start(StandardServer.java:2313)
at org.apache.catalina.startup.Catalina.start(Catalina.java:556)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:287)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:425)
Aug 23, 2007 4:49:39 PM org.apache.struts.validator.ValidatorPlugIn initResources
INFO: Loading validation rules file from '/WEB-INF/validation.xml'
Aug 23, 2007 4:50:00 PM org.apache.struts.validator.ValidatorPlugIn initResources
SEVERE: Connection timed out: connect
java.net.ConnectException: Connection timed out: connect
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:305)
at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:171)
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:158)
at java.net.Socket.connect(Socket.java:452)
at java.net.Socket.connect(Socket.java:402)
at sun.net.NetworkClient.doConnect(NetworkClient.java:139)
at sun.net.www.http.HttpClient.openServer(HttpClient.java:402)
at sun.net.www.http.HttpClient.openServer(HttpClient.java:618)
at sun.net.www.http.HttpClient.<init>(HttpClient.java:306)
at sun.net.www.http.HttpClient.<init>(HttpClient.java:267)
at sun.net.www.http.HttpClient.New(HttpClient.java:339)
at sun.net.www.http.HttpClient.New(HttpClient.java:320)
at sun.net.www.http.HttpClient.New(HttpClient.java:315)
at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:521)
at sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection.java:498)
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:626)
at org.apache.xerces.impl.XMLEntityManager.setupCurrentEntity(Unknown Source)
at org.apache.xerces.impl.XMLEntityManager.startEntity(Unknown Source)
at org.apache.xerces.impl.XMLEntityManager.startDTDEntity(Unknown Source)
at org.apache.xerces.impl.XMLDTDScannerImpl.setInputSource(Unknown Source)
at org.apache.xerces.impl.XMLDocumentScannerImpl$DTDDispatcher.dispatch(Unknown Source)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
at org.apache.commons.digester.Digester.parse(Digester.java:1514)
at org.apache.commons.validator.ValidatorResourcesInitializer.initialize(ValidatorResourcesInitializer.java:256)
at org.apache.struts.validator.ValidatorPlugIn.initResources(ValidatorPlugIn.java:224)
at org.apache.struts.validator.ValidatorPlugIn.init(ValidatorPlugIn.java:167)
at org.apache.struts.action.ActionServlet.initModulePlugIns(ActionServlet.java:1105)
at org.apache.struts.action.ActionServlet.init(ActionServlet.java:468)
at javax.servlet.GenericServlet.init(GenericServlet.java:211)
at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1029)
at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:862)
at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:4013)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:4357)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:823)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:807)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:595)
at org.apache.catalina.core.StandardHostDeployer.install(StandardHostDeployer.java:277)
at org.apache.catalina.core.StandardHost.install(StandardHost.java:832)
at org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:701)
at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:432)
at org.apache.catalina.startup.HostConfig.start(HostConfig.java:983)
at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:349)
at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1091)
at org.apache.catalina.core.StandardHost.start(StandardHost.java:789)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1083)
at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:478)
at org.apache.catalina.core.StandardService.start(StandardService.java:480)
at org.apache.catalina.core.StandardServer.start(StandardServer.java:2313)
at org.apache.catalina.startup.Catalina.start(Catalina.java:556)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:287)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:425)
Aug 23, 2007 4:50:00 PM com.Test.framework.web.security.SecurityPlugIn init
INFO: Loading roles and permissions for CBS...
Aug 23, 2007 4:50:00 PM com.Test.framework.web.security.SSOAccessController loadRolesAndPermissions
INFO: Loading permissions for application CBS...
Aug 23, 2007 4:50:01 PM org.apache.catalina.core.StandardHostDeployer install
INFO: Installing web application at context path /jsp-examples from URL file:C:\Program Files\Apache Software Foundation\Tomcat 5.0\webapps\jsp-examples
Aug 23, 2007 4:50:01 PM org.apache.catalina.core.StandardHostDeployer install
INFO: Installing web application at context path from URL file:C:\Program Files\Apache Software Foundation\Tomcat 5.0\webapps\ROOT
Aug 23, 2007 4:50:01 PM org.apache.catalina.core.StandardHostDeployer install
INFO: Installing web application at context path /servlets-examples from URL file:C:\Program Files\Apache Software Foundation\Tomcat 5.0\webapps\servlets-examples
Aug 23, 2007 4:50:01 PM org.apache.catalina.core.StandardHostDeployer install
INFO: Installing web application at context path /StrutsExample from URL file:C:\Program Files\Apache Software Foundation\Tomcat 5.0\webapps\StrutsExample
Aug 23, 2007 4:50:01 PM java.util.jar.Attributes read
WARNING: Duplicate name in Manifest: Class-Path
Aug 23, 2007 4:50:01 PM java.util.jar.Attributes read
WARNING: Duplicate name in Manifest: Class-Path
Aug 23, 2007 4:50:01 PM java.util.jar.Attributes read
WARNING: Duplicate name in Manifest: Class-Path
Aug 23, 2007 4:50:01 PM java.util.jar.Attributes read
WARNING: Duplicate name in Manifest: Class-Path
Aug 23, 2007 4:50:01 PM java.util.jar.Attributes read
WARNING: Duplicate name in Manifest: Class-Path
Aug 23, 2007 4:50:01 PM java.util.jar.Attributes read
WARNING: Duplicate name in Manifest: Class-Path
Aug 23, 2007 4:50:01 PM java.util.jar.Attributes read
WARNING: Duplicate name in Manifest: Class-Path
Aug 23, 2007 4:50:01 PM org.apache.catalina.loader.WebappClassLoader validateJarFile
INFO: validateJarFile(C:\Program Files\Apache Software Foundation\Tomcat 5.0\webapps\StrutsExample\WEB-INF\lib\servlet.jar) - jar not loaded. See Servlet Spec 2.3, section 9.7.2. Offending class: javax/servlet/Servlet.class
Aug 23, 2007 4:50:02 PM java.util.jar.Attributes read
WARNING: Duplicate name in Manifest: Class-Path
Aug 23, 2007 4:50:02 PM java.util.jar.Attributes read
WARNING: Duplicate name in Manifest: Class-Path
Aug 23, 2007 4:50:02 PM java.util.jar.Attributes read
WARNING: Duplicate name in Manifest: Class-Path
Aug 23, 2007 4:50:02 PM java.util.jar.Attributes read
WARNING: Duplicate name in Manifest: Class-Path
Aug 23, 2007 4:50:02 PM java.util.jar.Attributes read
WARNING: Duplicate name in Manifest: Class-Path
Aug 23, 2007 4:50:02 PM java.util.jar.Attributes read
WARNING: Duplicate name in Manifest: Class-Path
Aug 23, 2007 4:50:02 PM java.util.jar.Attributes read
WARNING: Duplicate name in Manifest: Class-Path
Aug 23, 2007 4:50:02 PM org.apache.struts.util.PropertyMessageResources <init>
INFO: Initializing, config='org.apache.struts.util.LocalStrings', returnNull=true
Aug 23, 2007 4:50:02 PM org.apache.struts.util.PropertyMessageResources <init>
INFO: Initializing, config='org.apache.struts.action.ActionResources', returnNull=true
Aug 23, 2007 4:50:02 PM org.apache.commons.digester.Digester error
SEVERE: Parse Error at line 25 column 17: The content of element type "struts-config" must match "(data-sources?,form-beans?,global-exceptions?,global-forwards?,action-mappings?,controller?,message-resources*,plug-in*)".
org.xml.sax.SAXParseException: The content of element type "struts-config" must match "(data-sources?,form-beans?,global-exceptions?,global-forwards?,action-mappings?,controller?,message-resources*,plug-in*)".
at org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(Unknown Source)
at org.apache.xerces.util.ErrorHandlerWrapper.error(Unknown Source)
at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
at org.apache.xerces.impl.dtd.XMLDTDValidator.handleEndElement(Unknown Source)
at org.apache.xerces.impl.dtd.XMLDTDValidator.endElement(Unknown Source)
at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanEndElement(Unknown Source)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
at org.apache.commons.digester.Digester.parse(Digester.java:1495)
at org.apache.struts.action.ActionServlet.initModuleConfig(ActionServlet.java:944)
at org.apache.struts.action.ActionServlet.init(ActionServlet.java:465)
at javax.servlet.GenericServlet.init(GenericServlet.java:211)
at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1029)
at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:862)
at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:4013)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:4357)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:823)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:807)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:595)
at org.apache.catalina.core.StandardHostDeployer.install(StandardHostDeployer.java:277)
at org.apache.catalina.core.StandardHost.install(StandardHost.java:832)
at org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:701)
at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:432)
at org.apache.catalina.startup.HostConfig.start(HostConfig.java:983)
at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:349)
at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1091)
at org.apache.catalina.core.StandardHost.start(StandardHost.java:789)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1083)
at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:478)
at org.apache.catalina.core.StandardService.start(StandardService.java:480)
at org.apache.catalina.core.StandardServer.start(StandardServer.java:2313)
at org.apache.catalina.startup.Catalina.start(Catalina.java:556)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:287)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:425)
Aug 23, 2007 4:50:02 PM org.apache.catalina.core.StandardHostDeployer install
INFO: Installing web application at context path /StrutsExample_CMP from URL file:C:\Program Files\Apache Software Foundation\Tomcat 5.0\webapps\StrutsExample_CMP
Aug 23, 2007 4:50:02 PM java.util.jar.Attributes read
WARNING: Duplicate name in Manifest: Class-Path
Aug 23, 2007 4:50:02 PM java.util.jar.Attributes read
WARNING: Duplicate name in Manifest: Class-Path
Aug 23, 2007 4:50:02 PM java.util.jar.Attributes read
WARNING: Duplicate name in Manifest: Class-Path
Aug 23, 2007 4:50:02 PM java.util.jar.Attributes read
WARNING: Duplicate name in Manifest: Class-Path
Aug 23, 2007 4:50:02 PM java.util.jar.Attributes read
WARNING: Duplicate name in Manifest: Class-Path
Aug 23, 2007 4:50:02 PM java.util.jar.Attributes read
WARNING: Duplicate name in Manifest: Class-Path
Aug 23, 2007 4:50:02 PM java.util.jar.Attributes read
WARNING: Duplicate name in Manifest: Class-Path
Aug 23, 2007 4:50:02 PM org.apache.catalina.loader.WebappClassLoader validateJarFile
INFO: validateJarFile(C:\Program Files\Apache Software Foundation\Tomcat 5.0\webapps\StrutsExample_CMP\WEB-INF\lib\servlet.jar) - jar not loaded. See Servlet Spec 2.3, section 9.7.2. Offending class: javax/servlet/Servlet.class
Aug 23, 2007 4:50:02 PM java.util.jar.Attributes read
WARNING: Duplicate name in Manifest: Class-Path
Aug 23, 2007 4:50:02 PM java.util.jar.Attributes read
WARNING: Duplicate name in Manifest: Class-Path
Aug 23, 2007 4:50:02 PM java.util.jar.Attributes read
WARNING: Duplicate name in Manifest: Class-Path
Aug 23, 2007 4:50:02 PM java.util.jar.Attributes read
WARNING: Duplicate name in Manifest: Class-Path
Aug 23, 2007 4:50:02 PM java.util.jar.Attributes read
WARNING: Duplicate name in Manifest: Class-Path
Aug 23, 2007 4:50:02 PM java.util.jar.Attributes read
WARNING: Duplicate name in Manifest: Class-Path
Aug 23, 2007 4:50:02 PM java.util.jar.Attributes read
WARNING: Duplicate name in Manifest: Class-Path
Aug 23, 2007 4:50:02 PM org.apache.struts.util.PropertyMessageResources <init>
INFO: Initializing, config='org.apache.struts.util.LocalStrings', returnNull=true
Aug 23, 2007 4:50:02 PM org.apache.struts.util.PropertyMessageResources <init>
INFO: Initializing, config='org.apache.struts.action.ActionResources', returnNull=true
Aug 23, 2007 4:50:03 PM org.apache.commons.digester.Digester error
SEVERE: Parse Error at line 25 column 17: The content of element type "struts-config" must match "(data-sources?,form-beans?,global-exceptions?,global-forwards?,action-mappings?,controller?,message-resources*,plug-in*)".
org.xml.sax.SAXParseException: The content of element type "struts-config" must match "(data-sources?,form-beans?,global-exceptions?,global-forwards?,action-mappings?,controller?,message-resources*,plug-in*)".
at org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(Unknown Source)
at org.apache.xerces.util.ErrorHandlerWrapper.error(Unknown Source)
at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
at org.apache.xerces.impl.dtd.XMLDTDValidator.handleEndElement(Unknown Source)
at org.apache.xerces.impl.dtd.XMLDTDValidator.endElement(Unknown Source)
at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanEndElement(Unknown Source)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
at org.apache.commons.digester.Digester.parse(Digester.java:1495)
at org.apache.struts.action.ActionServlet.initModuleConfig(ActionServlet.java:944)
at org.apache.struts.action.ActionServlet.init(ActionServlet.java:465)
at javax.servlet.GenericServlet.init(GenericServlet.java:211)
at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1029)
at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:862)
at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:4013)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:4357)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:823)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:807)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:595)
at org.apache.catalina.core.StandardHostDeployer.install(StandardHostDeployer.java:277)
at org.apache.catalina.core.StandardHost.install(StandardHost.java:832)
at org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:701)
at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:432)
at org.apache.catalina.startup.HostConfig.start(HostConfig.java:983)
at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:349)
at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1091)
at org.apache.catalina.core.StandardHost.start(StandardHost.java:789)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1083)
at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:478)
at org.apache.catalina.core.StandardService.start(StandardService.java:480)
at org.apache.catalina.core.StandardServer.start(StandardServer.java:2313)
at org.apache.catalina.startup.Catalina.start(Catalina.java:556)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:287)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:425)
Aug 23, 2007 4:50:03 PM org.apache.catalina.core.StandardHostDeployer install
INFO: Installing web application at context path /tomcat-docs from URL file:C:\Program Files\Apache Software Foundation\Tomcat 5.0\webapps\tomcat-docs
Aug 23, 2007 4:50:03 PM org.apache.catalina.core.StandardHostDeployer install
INFO: Installing web application at context path /webdav from URL file:C:\Program Files\Apache Software Foundation\Tomcat 5.0\webapps\webdav
Aug 23, 2007 4:50:03 PM org.apache.coyote.http11.Http11Protocol start
INFO: Starting Coyote HTTP/1.1 on http-8081
Aug 23, 2007 4:50:03 PM org.apache.jk.common.ChannelSocket init
INFO: JK2: ajp13 listening on /0.0.0.0:8009
Aug 23, 2007 4:50:03 PM org.apache.jk.server.JkMain start
INFO: Jk running ID=0 time=0/93 config=C:\Program Files\Apache Software Foundation\Tomcat 5.0\conf\jk2.properties
Aug 23, 2007 4:50:04 PM org.apache.catalina.startup.Catalina start
INFO: Server startup in 57514 ms
InSEVERE: Parse Error at line 25 column 17: The content
of element type "struts-config" must match
"(data-sources?,form-beans?,global-exceptions?,global-
forwards?,action-mappings?,controller?,message-resourc
es*,plug-in*)".
org.xml.sax.SAXParseException: The content of element
type "struts-config" must match
"(data-sources?,form-beans?,global-exceptions?,global-
forwards?,action-mappings?,controller?,message-resourc
es*,plug-in*)".It's due to an error with your struts-config.xml. Your elements in the <struts-config> tag are not conforming to the DTD against which it is validated. Check if the order of the elements is as specified in this error message and also check if you have closed all tags correctly. -
Possible to grant PUBLIC access to an application component?
I would like to grant access to a application component similar
to the way a PUBLIC (non-authorized) user can access Oracle's
supplied PEOPLE application.
The link for the component is located in a content area within a
tabbed region of our main page. I have looked at the access
settings for everything that I know of (page, content area,
apllication and component) and access privileges seem to be
correct. I must have something wrong, as it still asks for the
user to login.
Any suggestions on where I have slipped up?Check the logs.
-
Hi Experts,
What is the best way or best practise to access the session scoped component in servelt pipeline?
Please share your thoughts.
Thanks,
ankVTo resolve components in the session scope you should be using DynamoHttpServletRequest.resolveName(). And of course the DynamoHttpServletRequest can also be used to resolve global and request scoped components so it is pretty handy to use. You can get the DynamoHttpServletRequest request associated with the current thread from ServletUtil.getCurrentRequest().
You can also reference a session scoped component from another session (or request) scoped component's property file. E.g. to access profile component (which is session scoped) from your custom session scoped component you would typically do this:
$class=com.company.MyCustomComponent
$scope=session
profile=/atg/userprofiling/Profile -
Mutliple user access to Same WD component
Hi,
I want to know whether multiple users can access the same webdynpro component. If possible,how we can acheive this?.
Thanks in Advance
Regards
VasuHi Vasu,
1. i need to know wheather your are talking about WD component at runtime or at the design time.
2. if it is at runtime no need to worry about the accesability your portal will create an instance for every user and it will not be shared by the portal users.
3. if you are taking about the developement time. create a DC Componenet and any number of users can create iviews
Example
DC
(version 1)View 1 View 2 view 3
Dev 1 dev 2
| Administrator can merge the code here
(Version 2) View 1
I think this might clear your question.
Thankx & Regards
Paul -
Accessing dataprovider from mxml component.
Hi,
I have a dataprovider and would like to access the data from mxml component.
Basically I have
Actionscript:
Bindable]
private var dp:ArrayCollection;
private
function dp_handler(e:ResultEvent):void
dp = e.result as ArrayCollection;
I wanted to access dp from mxml component using
<mx:script>
<![CDATA[
mx.core.Application;
lbl.text = Application.application.dp.getItemAt(0).fieldname;
]]>
<mx:Label
id="lbl" x="51" y="136" />
It keeps telling me dp is unknow property. Any idea what am I doing wrong?Thanks Greg. That fixed it!
-
Access data in custom component.
Hi Everyone,
I am new to Flex soo pardon me if my questions are quite basic. I have searched a lot before posting here, might be I was not looking in the right direction. Please redirect me to the path that leads to the solution of the problem. I really appreciate any help that I can get.
I'm followiing this video tutorial.
http://www.gotoandlearn.com/play.php?id=100
All was going fine, until the tutor wanted to add custom component in the application. He added the HBox which I couldn't find in Flash Builder 4.6 so I added HGroup instead in my new component. Now when I want to use the data that was fetched in the parent component in custom component it gives me error. Here is the code and their file names.
File: SearchHomeView.mxml
<?xml version="1.0" encoding="utf-8"?>
<s:View xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark" title="Twitter Search">
<fx:Declarations>
<!-- Place non-visual elements (e.g., services, value objects) here -->
<s:HTTPService result="onResult(event)" id="service" url="http://search.twitter.com/search.atom?q=adobe">
</s:HTTPService>
</fx:Declarations>
<fx:Script>
<![CDATA[
import flash.utils.flash_proxy;
import mx.collections.ArrayCollection;
import mx.rpc.events.ResultEvent;
[Bindable]
private var ac:ArrayCollection;
private function onResult(event:ResultEvent):void
ac = event.result.feed.entry as ArrayCollection;
trace(data);
trace(ac);
private function doSearch(event:MouseEvent):void
//service.url = "http://search.twitter.com/search.atom?q=" + tearch.text;
service.url = "http://search.twitter.com/search.atom?q=adobe";
service.send();
]]>
</fx:Script>
<s:TextInput x="25" y="26" width="146" id="tearch"/>
<s:Button x="224" y="26" height="33" label="Search" click="doSearch(event)" />
<s:List dataProvider="{ac}" itemRenderer="tweet" x="25" y="92" width="274" height="278"></s:List>
</s:View>
File: tweet.mxml
<?xml version="1.0" encoding="utf-8"?>
<s:HGroup xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark" width="400" height="300">
<fx:Declarations>
<!-- Place non-visual elements (e.g., services, value objects) here -->
</fx:Declarations>
<s:Image width="50" height="50" source="{parentDocument.data.link.getItemAt('1').href}">
</s:Image>
<s:TextBase width="100%" text="">
</s:TextBase>
</s:HGroup>
When I use source to be source="{parentDocument.data.link.getItemAt('1').href} ... it removes the error, but displays nothing on the resulting app.
When I use source to be source="{data.link[1].href} ... it gives the error,
Multiple markers at this line:
-1120: Access of undefined property data.
-parentDocument
What needs to be done to use the item renderer right in custom component ? Please tell me the solution to it... I'm stuck on it for quite a few time.
Thanks
Bilal AhmadHello Ravi,
one option is the create a public attribute to share your value note data with other components.
Another option is a function group with two function modules "SET_" and "GET_".
I´m sure one of the webclient UI Gurus here in this forum could share less "dirty" ways with you.
Kind regards
Manfred -
Access UCM 11g Deployed component from Content server URL
Good day to All,
I am successfully deployed custom UCM component ("myservices "--will store data in ucm Scema)
and enabled the component
can you guide me how access the deployed (enable also) componet
I tried call using below url but not working
http://localhost:16200/idc/idcplg/IdcService=myservice
my manifest file contain following
<?hda version="11gR1-11.1.1.3.0-idcprod1-100901T121843" jcharset=UTF8 encoding=utf-8?>
@Properties LocalData
CreateDate=22/10/10 16:34
blFieldTypes=CreateDate date
ComponentName=myservice
blDateFormat=dd/MM{yy}{ HH:mm}!mAM,PM!tEurope/Berlin
@end
@ResultSet Manifest
2
entryType
location
component
myservice/myservice.hda
componentExtra
myservice/readme.txt
componentClasses
myservice/classes
componentLib
myservice/lib/
@endThank you so much Kent ,I am able to call the java component during the check-in process
But My component using opensource jars (ex :docx4j-2.5.0.jar) getting error while calling the java class which part of opensource jar (docx4j-2.5.0.jar)
I added libpath in .hda file below is text in my .hda file
<?hda version="11gR1-11.1.1.3.0-idcprod1-100505T121221" jcharset=UTF8 encoding=utf-8?>
@Properties LocalData
blFieldTypes=
serverVersion=7.1.2.166
hasPreferenceData=false
blDateFormat=M/d{yy}{ h:mm[:ss]{ a}}!mAM,PM!tAmerica/Chicago
classpath=$COMPONENT_DIR/classes;$COMPONENT_DIR/lib/avalon-framework-api-4.3.1.jar;$COMPONENT_DIR/lib/valon-framework-impl-4.3.1.jar;$COMPONENT_DIR/lib/commons-codec-1.3.jar;$COMPONENT_DIR/lib/commons-io-1.3.1.jar;$COMPONENT_DIR/lib/commons-lang-2.4.jar;$COMPONENT_DIR/lib/commons-logging-1.1.1.jar;$COMPONENT_DIR/lib/commons-vfs-patched-1.9.1.jar;$COMPONENT_DIR/lib/docx4j-2.5.0.jar;$COMPONENT_DIR/lib/fop-patched-0.95.756437.jar;$COMPONENT_DIR/lib/hwpf-3.4.0.jar;$COMPONENT_DIR/lib/jcr-1.0.jar;$COMPONENT_DIR/lib/jdom-1.0.jar;$COMPONENT_DIR/lib/junit-4.4.jar;$COMPONENT_DIR/lib/log4j-1.2.15.jar;$COMPONENT_DIR/lib/parent-pointer-plugin-1.0.jar;$COMPONENT_DIR/lib/wmf2svg-0.8.3.jar;$COMPONENT_DIR/lib/xalan-patched-2.7.0.jar;$COMPONENT_DIR/lib/xmlgraphics-commons-1.3.757686.jar;
ComponentName=Test
version=2005_01_24
libpath=$COMPONENT_DIR/lib
@end
@ResultSet Filters
4
type
location
parameter
loadOrder
validateStandard
test.CheckinFilter
null
1
@end
@ResultSet ClassAliases
2
classname
location
@end
Component floder structure
Component name :Test
Under Test following folders
Classes ,lib,resources,.hda file
It not recognizing the libraries which are part of lib folder in component ,Kindly help me
Regards
Varaprasad -
Make public property of a component and access it from another component?
Component "alpha.mxml"
propriety: mapevent_mapready
Component "beta.mxml"
<alpha:alpha mapevent_mapready="some_function()" />
how?Hi leonapster,
Say in your component alpha.mxml
<!--alpha.mxml -->
<AlphaComponent>
public var mapevent_mapready:Boolean=false;
</AlphaComponent>
<!-- Beta.mxml -->
<BetaComponent>
<mx:Script>
private function init():void
//Now you can access the mapevent_mapready property of Alpha Component as below:
var bool:Boolean = alphaComp.mapevent_mapready;
alphaComp.mapevent_mapready
</mx:Script>
<alpha:alpha id="alphaComp" />
</BetaComponent>
Thanks,
Bhasker -
Accessing methods of COM component
I have a COM component whose methods I want to access in Developer/2000 Forms.
Is this possible? Does Forms have support for COM and COM+ servers? Which version of Forms have support for accessing COM components?
Also, Can I pass parameters while executing the application created using Developer/2000? If yes, can you tell me how to do it?
Thanks.
Mustansir UdaipurwalaYou can use the OLE2 built in package (see online help) to communicate with com objects and pass parameters.
I'll suggest you'll have a look at the forms demos to see integration with excel and on metalink.oracle.com for more samples. -
Restrict access to Query Builder component in SQL Workshop
Hello folks,
Can someone tell me if it is possible for an end-user to have access to the Query Builder component only?
End-users on our site are currently using the stand alone version of the old Query Builder (OBE60.EXE), which is not supported any longer, and have compatibility issues when used against a 10g database.
I'm looking for an alternative (query-only) tool, and came across the Query Builder component in Oracle Application Express. But couldn't find anything there that would allow me to limit access to this component for an end-user.
Please let me know if this can be achieved, and if not, is anyone aware of an equivalent tool that would do the job?
Many Thanks,
PraveenHello,
No, that functionality does not exist currently, you would need to build your own.
If you search this forum there are a few threads which detail how you can install the Application Builder and SQL Workshop applications into the APEX environment itself so you can see how they (meaning the Oracle team) have built those apps.
Hope this helps,
John.
http://jes.blogs.shellprompt.net
http://apex-evangelists.com -
Need to access value on another component to cross-validate...
Hi,
I need to do a cross-validation on a field against value filled on the same form. The model is only updated after validation has completed successfully according to the Faces lifecycle, thus reading the managed bean would prove fruitless.
Does anyone know how to access a value in another field on the same form so that I can cross-validate against?
Regards...
ATtry this,
request.getParameter("<BackingBeanName:fieldName>").
This should give you the value.
HTH ! -
Webdav accessing problems with cq5.4..
Hi,
I just trying to use webdav in one of my cq5.4 instance..
Here what iam finding is when i upload an image from cq5.4 digital assets itz showing up correct in my webdav folder with generating the rendations for that particular image...
And when use webdav folder to upload image it is showing u[p in the cq dam but rendetions are not getting created..
Is there any solution for this..And images names which are showing with some 1.0 , 1.2 like names in webdav folder...
Can i get help on this...
Thanks,
Sony CHello Hembanna,
For the issue you describe I recommend this article named iPhone: Troubleshooting a cellular data connection found here http://support.apple.com/kb/ts3780.
Toggle airplane mode: Tap Settings, turn airplane mode on, wait three seconds, and then turn off again.
Restart your iPhone.
Ensure that your software is up to date:
Check for a Carrier Settings Update. Tap Settings > General > About.
Check for an iOS Software Update. Tap Settings > General > Software Update.
Note: Some updates may require a Wi-Fi connection.
Remove the SIM Card and reinsert it. Allow the iPhone to acquire the network again.
If your SIM card has SIM PIN enabled, try toggling it off: Tap Settings > Phone > SIM PIN.
Try another location. If a different location works, but the original location still does not, contact your carrierto report the issue.
Reset network settings: Tap Settings > General > Reset > Reset Network Settings.
Restore the iPhone as new.
Contact your carrier to:
Verify that the iPhone is properly set up on the account with the appropriate, current data plan.
Verify that there are no account-related blocks.
Find out if there are specific error messages in the carrier logs that could help determine why the issue is occurring.
All the best,
Sterling -
Is it possible to access getRequestBean1 from a component in page fragment?
Hi,
Assume I have two pages, the first page has a button (say button1) among other components; the second page contains a page fragment which has a button (say button2) in it.
In the button1 action, I set the value for a property (say X) which has request bean scope. When I click this button, the navigation will lead to the second page.
I then tried to retrieve the value using getRequestBean1( ).getX() in the button2 action. To my disappointment, I found that getX( ) always return null.
I know I may be able to overcome this by making X a session scope property, but I would be grateful if somebody could shed some light on this problem.
Many thanks.
XiaoyanYour problem is not related to page fragments. It has to do with the lifetime of a request bean. Here is an excerpt from http://developers.sun.com/prodtech/javatools/jscreator/learning/tutorials/2/scopes.html
Request scope begins when the user submits the page and ends when the response is fully rendered, whatever page that is.
When you clicked the button on page 1 which submitted the page, the request bean was instantiated. When the response for page 2 was sent to the browser, the request bean's life ended. That is, it is no longer around after the page is displayed.
One of the ways you can keep the value around for the subsequent submission is to add a hidden field to the page fragment.
Bind the hidden field to the request bean's property. Then have something like this in the action method
public String button2_action() {
staticText1.setText( hiddenField1.getText());
return null;
You might want to read the above mention tutorial to learn more about scope and managed beans. -
Error - Document Access Denied. A component for viewing this document needs to be updated
Hi,
I am having a few problems opening a handfull of PDF documents on the network using Adobe Acrobat Reader XI & X. When opening the documents with Adobe Acrobat Reader X I receive the below error message
I am then directed to a site to instal the FileOpen plugin which I do. I have installed the plugin both automatically using an msi file and manually by placing it in the adobe plugins folder however none work. I am still getting the same error message. As this document was located on a network share I copied it to my desktop and launched it. I still received the same error message however I updated adobe reader to XI and re-installed the fileopen plugin. Now I am receivng the below error message and I am still unable to open the document. When clixking OK it takes me to a site to download the FileOpen plugin which I have already installed.
Protected mode is not turned on. Any help with this error would be greatly appreciated.
Regards.You'd need to contact the makers of FileOpen. It isn't an Adobe product.Check especially whether your version of Reader is supposed to be compatible with it.An update to it may be needed.
Maybe you are looking for
-
Today I came across an important issue in InDesign's CSS creation during EPUB export. It is best described here: http://www.pigsgourdsandwikis.com/2010/05/indesign-flubs-exporting-headers-to.html But I will paraphrase... When a paragraph style is def
-
I wonder if it is something to do with gmail. as gmail has been asking to store emails on my local drive and I have been saying no as I was worried it might be a virus or something - maybe I have too many emails on the system. I just dont know. I am
-
Field's content is not fully visible in Sap Transaction iview
Hello Friends, I have deployed a Sap Transaction iview on my portal. I am facing a issue. When i do F4 help on a field, the content of columns is not fully visible in the opened up popup window. Is there any way to adjust the col
-
IMessage from iPhone 5 not working to iPad 2 internationally
Hi there, I am hoping someone can help me with clarifying why iMessage from my wife (iPhone 5, iOS 6.1.3, currently in South Africa) is not working to me (iPad2, iOs 6.1.3) at the moment. She is unable to send to me, but experiences no problems in s
-
This question has likely been asked before, but I did a search of the forum and couldn't find a specific posting. My company has just purchased me a copy of Captivate 2, so some of it is a bit new to me. My question is.... Can the visual components o