Hi all,
I'm trying to use the include directive in the controller.xml to try to reorganize a big one in many smaller. Anyone can help me? I'va tried that. "controller.xml" <site-conf xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://www.ofbiz.org/dtds/site-conf.xsd"> <include location="controller_main.xml"/> <include location="controller_extras.xml"/> <description>Party Manager Module Site Configuration File</description> <owner>Copyright 2001-2006 The Apache Software Foundation</owner> <handler ......./> <preprocessor ..../> <postprocessor .../> </site-conf> "controller_main.xml" <site-conf xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://www.ofbiz.org/dtds/site-conf.xsd"> <description>Party Manager Module Site Configuration File</description> <owner>Copyright 2001-2006 The Apache Software Foundation</owner> <errorpage>/error/error.jsp</errorpage> <!-- Security Mappings --> <request-map uri="checkLogin" edit="false"> <description>Verify a user is logged in.</description> <security https="true" auth="false"/> <event type="java" path="org.ofbiz.webapp.control.LoginWorker" invoke="checkLogin" /> <response name="success" type="view" value="main"/> <response name="error" type="view" value="login"/> </request-map> <request-map uri="login"> <security https="true" auth="false"/> <event type="java" path="org.ofbiz.webapp.control.LoginWorker" invoke="login"/> <response name="success" type="view" value="main"/> <response name="error" type="view" value="login"/> </request-map> <request-map uri="logout"> <security https="true" auth="true"/> <event type="java" path="org.ofbiz.webapp.control.LoginWorker" invoke="logout"/> <response name="success" type="request" value="checkLogin"/> <response name="error" type="view" value="main"/> </request-map> <!-- End of Security Mappings --> <!-- Request Mappings --> <request-map uri="main"> <security https="true" auth="true"/> <response name="success" type="view" value="main"/> </request-map> <!-- View Mappings --> <view-map name="error" page="/error/error.jsp"/> <view-map name="main" type="ftl" page="main.ftl"/> <view-map name="login" type="ftl" page="login.ftl"/> <!-- end of view mappings --> </site-conf> 2007-03-19 12:44:05,109 (main) [ UtilXml.java:243:DEBUG] XML Read 0.0080s: jndi:/0.0.0.0/partymgr/WEB-INF/controller.xml 2007-03-19 12:44:05,114 (main) [ UtilXml.java:176:WARN ] [UtilXml.readXmlDocument] URL was null, doing nothing 2007-03-19 12:44:05,119 (main) [ ConfigXMLReader.java:150:ERROR] ---- runtime exception report -------------------------------------------------- Exception: java.lang.NullPointerException Message: null ---- stack trace --------------------------------------------------------------- java.lang.NullPointerException org.ofbiz.webapp.control.ConfigXMLReader.loadDocument(ConfigXMLReader.java:145) org.ofbiz.webapp.control.ConfigXMLReader.loadConfigMap(ConfigXMLReader.java:391) org.ofbiz.webapp.control.ConfigXMLReader.loadConfigMap(ConfigXMLReader.java:405) org.ofbiz.webapp.control.ConfigXMLReader$ControllerConfig.<init>(ConfigXMLReader.java:77) org.ofbiz.webapp.control.ConfigXMLReader.getControllerConfig(ConfigXMLReader.java:53) org.ofbiz.webapp.control.ConfigXMLReader.getConfigMap(ConfigXMLReader.java:382) org.ofbiz.webapp.control.RequestManager.<init>(RequestManager.java:53) org.ofbiz.webapp.control.RequestHandler.init(RequestHandler.java:82) org.ofbiz.webapp.control.RequestHandler.getRequestHandler(RequestHandler.java:69) org.ofbiz.webapp.control.ControlServlet.getRequestHandler(ControlServlet.java:267) org.ofbiz.webapp.control.ControlServlet.init(ControlServlet.java:70) org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1105) org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:932) org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:3951) org.apache.catalina.core.StandardContext.start(StandardContext.java:4225) org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1013) org.apache.catalina.core.StandardHost.start(StandardHost.java:718) org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1013) org.apache.catalina.core.StandardEngine.start(StandardEngine.java:442) org.apache.catalina.startup.Embedded.start(Embedded.java:821) org.ofbiz.catalina.container.CatalinaContainer.start(CatalinaContainer.java:216) org.ofbiz.base.container.ContainerLoader.start(ContainerLoader.java:80) org.ofbiz.base.start.Start.startStartLoaders(Start.java:263) org.ofbiz.base.start.Start.startServer(Start.java:314) org.ofbiz.base.start.Start.start(Start.java:318) org.ofbiz.base.start.Start.main(Start.java:404) -------------------------------------------------------------------------------- Thanks in advance. |
The assetmaint component is good example for this.
Anil On 3/19/07, Albert Murillo Aguirre <[hidden email]> wrote: > Hi all, > > I'm trying to use the include directive in the controller.xml to try to > reorganize a big one in many smaller. Anyone can help me? I'va tried that. > > "controller.xml" > <site-conf xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" > > xsi:noNamespaceSchemaLocation="http://www.ofbiz.org/dtds/site-conf.xsd"> > <include location="controller_main.xml"/> > <include location="controller_extras.xml"/> > <description>Party Manager Module Site Configuration File</description> > <owner>Copyright 2001-2006 The Apache Software Foundation</owner> > > <handler ......./> > <preprocessor ..../> > <postprocessor .../> > </site-conf> > > > > "controller_main.xml" > <site-conf xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" > > xsi:noNamespaceSchemaLocation="http://www.ofbiz.org/dtds/site-conf.xsd"> > <description>Party Manager Module Site Configuration File</description> > <owner>Copyright 2001-2006 The Apache Software Foundation</owner> > <errorpage>/error/error.jsp</errorpage> > > <!-- Security Mappings --> > <request-map uri="checkLogin" edit="false"> > <description>Verify a user is logged in.</description> > <security https="true" auth="false"/> > <event type="java" path="org.ofbiz.webapp.control.LoginWorker" > invoke="checkLogin" /> > <response name="success" type="view" value="main"/> > <response name="error" type="view" value="login"/> > </request-map> > > <request-map uri="login"> > <security https="true" auth="false"/> > <event type="java" path="org.ofbiz.webapp.control.LoginWorker" > invoke="login"/> > <response name="success" type="view" value="main"/> > <response name="error" type="view" value="login"/> > </request-map> > > <request-map uri="logout"> > <security https="true" auth="true"/> > <event type="java" path="org.ofbiz.webapp.control.LoginWorker" > invoke="logout"/> > <response name="success" type="request" value="checkLogin"/> > <response name="error" type="view" value="main"/> > </request-map> > <!-- End of Security Mappings --> > > <!-- Request Mappings --> > <request-map uri="main"> > <security https="true" auth="true"/> > <response name="success" type="view" value="main"/> > </request-map> > > <!-- View Mappings --> > <view-map name="error" page="/error/error.jsp"/> > <view-map name="main" type="ftl" page="main.ftl"/> > <view-map name="login" type="ftl" page="login.ftl"/> > <!-- end of view mappings --> > </site-conf> > > > 2007-03-19 12:44:05,109 (main) [ UtilXml.java:243:DEBUG] XML > Read 0.0080s: jndi:/0.0.0.0/partymgr/WEB-INF/controller.xml > 2007-03-19 12:44:05,114 (main) [ UtilXml.java:176:WARN ] > [UtilXml.readXmlDocument] URL was null, doing nothing > 2007-03-19 12:44:05,119 (main) [ ConfigXMLReader.java:150:ERROR] > ---- runtime exception report > -------------------------------------------------- > Exception: java.lang.NullPointerException > Message: null > ---- stack trace > --------------------------------------------------------------- > java.lang.NullPointerException > org.ofbiz.webapp.control.ConfigXMLReader.loadDocument(ConfigXMLReader.java:145) > org.ofbiz.webapp.control.ConfigXMLReader.loadConfigMap(ConfigXMLReader.java:391) > org.ofbiz.webapp.control.ConfigXMLReader.loadConfigMap(ConfigXMLReader.java:405) > org.ofbiz.webapp.control.ConfigXMLReader$ControllerConfig.<init>(ConfigXMLReader.java:77) > org.ofbiz.webapp.control.ConfigXMLReader.getControllerConfig(ConfigXMLReader.java:53) > org.ofbiz.webapp.control.ConfigXMLReader.getConfigMap(ConfigXMLReader.java:382) > org.ofbiz.webapp.control.RequestManager.<init>(RequestManager.java:53) > org.ofbiz.webapp.control.RequestHandler.init(RequestHandler.java:82) > org.ofbiz.webapp.control.RequestHandler.getRequestHandler(RequestHandler.java:69) > org.ofbiz.webapp.control.ControlServlet.getRequestHandler(ControlServlet.java:267) > org.ofbiz.webapp.control.ControlServlet.init(ControlServlet.java:70) > org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1105) > org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:932) > org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:3951) > org.apache.catalina.core.StandardContext.start(StandardContext.java:4225) > org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1013) > org.apache.catalina.core.StandardHost.start(StandardHost.java:718) > org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1013) > org.apache.catalina.core.StandardEngine.start(StandardEngine.java:442) > org.apache.catalina.startup.Embedded.start(Embedded.java:821) > org.ofbiz.catalina.container.CatalinaContainer.start(CatalinaContainer.java:216) > org.ofbiz.base.container.ContainerLoader.start(ContainerLoader.java:80) > org.ofbiz.base.start.Start.startStartLoaders(Start.java:263) > org.ofbiz.base.start.Start.startServer(Start.java:314) > org.ofbiz.base.start.Start.start(Start.java:318) > org.ofbiz.base.start.Start.main(Start.java:404) > -------------------------------------------------------------------------------- > > > Thanks in advance. > |
In reply to this post by Albert Murillo Aguirre
If I'm not mistaken location="controller_main.xml" in your example
expands to: location="component://party/webapp/partymgr/controller_main.xml" you want... location="component://party/webapp/partymgr/WEB-INF/controller_main.xml" if your controller_main.xml is in the same dir as controller.xml. Throughout OFBiz, it's usually easier to utilize the full component://... path for your locations. --- Albert Murillo Aguirre <[hidden email]> wrote: > Hi all, > > I'm trying to use the include directive in the controller.xml to try > to > reorganize a big one in many smaller. Anyone can help me? I'va tried > that. > > "controller.xml" > <site-conf xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" > > > <include location="controller_main.xml"/> > <include location="controller_extras.xml"/> > <description>Party Manager Module Site Configuration > File</description> > <owner>Copyright 2001-2006 The Apache Software Foundation</owner> > > <handler ......./> > <preprocessor ..../> > <postprocessor .../> > </site-conf> > > > > "controller_main.xml" > <site-conf xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" > > > <description>Party Manager Module Site Configuration > File</description> > <owner>Copyright 2001-2006 The Apache Software Foundation</owner> > <errorpage>/error/error.jsp</errorpage> > > <!-- Security Mappings --> > <request-map uri="checkLogin" edit="false"> > <description>Verify a user is logged in.</description> > <security https="true" auth="false"/> > <event type="java" > path="org.ofbiz.webapp.control.LoginWorker" > invoke="checkLogin" /> > <response name="success" type="view" value="main"/> > <response name="error" type="view" value="login"/> > </request-map> > > <request-map uri="login"> > <security https="true" auth="false"/> > <event type="java" > path="org.ofbiz.webapp.control.LoginWorker" > invoke="login"/> > <response name="success" type="view" value="main"/> > <response name="error" type="view" value="login"/> > </request-map> > > <request-map uri="logout"> > <security https="true" auth="true"/> > <event type="java" > path="org.ofbiz.webapp.control.LoginWorker" > invoke="logout"/> > <response name="success" type="request" value="checkLogin"/> > <response name="error" type="view" value="main"/> > </request-map> > <!-- End of Security Mappings --> > > <!-- Request Mappings --> > <request-map uri="main"> > <security https="true" auth="true"/> > <response name="success" type="view" value="main"/> > </request-map> > > <!-- View Mappings --> > <view-map name="error" page="/error/error.jsp"/> > <view-map name="main" type="ftl" page="main.ftl"/> > <view-map name="login" type="ftl" page="login.ftl"/> > <!-- end of view mappings --> > </site-conf> > > > 2007-03-19 12:44:05,109 (main) [ UtilXml.java:243:DEBUG] > XML > Read 0.0080s: jndi:/0.0.0.0/partymgr/WEB-INF/controller.xml > 2007-03-19 12:44:05,114 (main) [ UtilXml.java:176:WARN ] > [UtilXml.readXmlDocument] URL was null, doing nothing > 2007-03-19 12:44:05,119 (main) [ ConfigXMLReader.java:150:ERROR] > ---- runtime exception report > -------------------------------------------------- > Exception: java.lang.NullPointerException > Message: null > ---- stack trace > --------------------------------------------------------------- > java.lang.NullPointerException > > org.ofbiz.webapp.control.ConfigXMLReader.loadConfigMap(ConfigXMLReader.java:391) > org.ofbiz.webapp.control.ConfigXMLReader.loadConfigMap(ConfigXMLReader.java:405) > org.ofbiz.webapp.control.ConfigXMLReader$ControllerConfig.<init>(ConfigXMLReader.java:77) > org.ofbiz.webapp.control.ConfigXMLReader.getControllerConfig(ConfigXMLReader.java:53) > org.ofbiz.webapp.control.ConfigXMLReader.getConfigMap(ConfigXMLReader.java:382) > org.ofbiz.webapp.control.RequestManager.<init>(RequestManager.java:53) > org.ofbiz.webapp.control.RequestHandler.init(RequestHandler.java:82) > org.ofbiz.webapp.control.RequestHandler.getRequestHandler(RequestHandler.java:69) > org.ofbiz.webapp.control.ControlServlet.getRequestHandler(ControlServlet.java:267) > org.ofbiz.webapp.control.ControlServlet.init(ControlServlet.java:70) > org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1105) > org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:932) > org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:3951) > org.apache.catalina.core.StandardContext.start(StandardContext.java:4225) > org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1013) > org.apache.catalina.core.StandardHost.start(StandardHost.java:718) > org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1013) > org.apache.catalina.core.StandardEngine.start(StandardEngine.java:442) > org.apache.catalina.startup.Embedded.start(Embedded.java:821) > org.ofbiz.catalina.container.CatalinaContainer.start(CatalinaContainer.java:216) > org.ofbiz.base.container.ContainerLoader.start(ContainerLoader.java:80) > org.ofbiz.base.start.Start.startStartLoaders(Start.java:263) > org.ofbiz.base.start.Start.startServer(Start.java:314) > org.ofbiz.base.start.Start.start(Start.java:318) > org.ofbiz.base.start.Start.main(Start.java:404) > -------------------------------------------------------------------------------- > > > Thanks in advance. > |
Free forum by Nabble | Edit this page |