RE: Modules with Tiles Problem
Hi Patrick, I'm interested in this thread because it seems we have (had?) similar problems regarding html:link in modules with global tiles; But your last question remained unanswered?? Thanks David, The multiconfig eliminates the error message. Another question is, the html:link is screwed up. In traditional webpages, we've got, Header, Navbar, Body, maybe Footer. The html:links on the Navbar adds the context in their href locations. EG, original link in root context: a href=/jsppages/viewList.jsp now, the link after module switching: a href=/newModule/jsppages/viewList.jsp Did you continue this thread somewhere else? Anyhow I start a new thread now How to use html:link using modules and tiles Greetings, Corné struts-user Digest of: thread.89126 RE : Seven Lessons from the Trenches: 4. Protect JSPs behind WEB-INF 89112 by: Laurent MARQUEZ 89119 by: Laurent MARQUEZ 89126 by: Laurent MARQUEZ 89149 by: Laurent MARQUEZ Administrivia: --- Administrative commands for the struts-user list --- I can handle administrative requests automatically. Please do not send them to the list address! Instead, send your message to the correct command address: To subscribe to the list, send a message to: [EMAIL PROTECTED] To remove your address from the list, send a message to: [EMAIL PROTECTED] Send mail to the following for info and FAQ for this list: [EMAIL PROTECTED] [EMAIL PROTECTED] Similar addresses exist for the digest list: [EMAIL PROTECTED] [EMAIL PROTECTED] To get messages 123 through 145 (a maximum of 100 per request), mail: [EMAIL PROTECTED] To get an index with subject and author for messages 123-456 , mail: [EMAIL PROTECTED] They are always returned as sets of 100, max 2000 per request, so you'll actually get 100-499. To receive all messages with the same subject as message 12345, send an empty message to: [EMAIL PROTECTED] The messages do not really need to be empty, but I will ignore their content. Only the ADDRESS you send to is important. You can start a subscription for an alternate address, for example [EMAIL PROTECTED], just add a hyphen and your address (with '=' instead of '@') after the command word: [EMAIL PROTECTED] To stop subscription for this address, mail: [EMAIL PROTECTED] In both cases, I'll send a confirmation message to that address. When you receive it, simply reply to it to complete your subscription. If despite following these instructions, you do not get the desired results, please contact my owner at [EMAIL PROTECTED] Please be patient, my owner is a lot slower than I am ;-) --- Enclosed is a copy of the request I received. Return-Path: [EMAIL PROTECTED] Received: (qmail 44317 invoked from network); 13 Jan 2004 14:42:35 - Received: from unknown (HELO smtpzilla1.xs4all.nl) (194.109.127.137) by daedalus.apache.org with SMTP; 13 Jan 2004 14:42:35 - Received: from PTWPC019 (213-84-177-228.adsl.xs4all.nl [213.84.177.228]) by smtpzilla1.xs4all.nl (8.12.10/8.12.10) with SMTP id i0DEgaDi034481 for [EMAIL PROTECTED]; Tue, 13 Jan 2004 15:42:36 +0100 (CET) Message-ID: [EMAIL PROTECTED] From: C.Aussems [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: Date: Tue, 13 Jan 2004 15:42:25 +0100 MIME-Version: 1.0 Content-Type: multipart/alternative; boundary==_NextPart_000_0097_01C3D9EB.D7C2B6B0 X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2800.1158 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165 X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N This is a multi-part message in MIME format. --=_NextPart_000_0097_01C3D9EB.D7C2B6B0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable --=_NextPart_000_0097_01C3D9EB.D7C2B6B0 Content-Type: text/html; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable !DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.0 Transitional//EN HTMLHEAD META http-equiv=3DContent-Type content=3Dtext/html; = charset=3Diso-8859-1 META content=3DMSHTML 6.00.2800.1276 name=3DGENERATOR STYLE/STYLE /HEAD BODY bgColor=3D#ff DIVFONT face=3DArial size=3D2/FONTnbsp;/DIV/BODY/HTML --=_NextPart_000_0097_01C3D9EB.D7C2B6B0-- -- - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Modules with Tiles Problem
Thanks David, The multiconfig eliminates the error message. Another question is, the html:link is screwed up. In traditional webpages, we've got, Header, Navbar, Body, maybe Footer. The html:links on the Navbar adds the context in their href locations. EG, original link in root context: a href=/jsppages/viewList.jsp now, the link after module switching: a href=/newModule/jsppages/viewList.jsp What can I do about this? Thanks a lot really. Patrick. -Original Message- From: Hibbs, David [mailto:[EMAIL PROTECTED] Sent: Wednesday, December 17, 2003 11:16 PM To: Patrick Cheng; Struts Users Mailing List Subject: RE: Modules with Tiles Problem If you have components used everywhere for every module, create some new and separate struts-config.xml and tiles-defs.xml files. You can specify multiples of each type of file for each module, so each module is free to reference a shared config file. To reference more than one struts-config.xml, simply list them in the web.xml file separated by commas: init-param param-nameconfig/myModule/param-name param-value/WEB-INF/shared_config.xml,/WEB-INF/myModule_config.xml/pa ram- value /init-param To reference more than one tile definition file, you can do the same thing in the myModule-config.xml file when you initialize the tiles plugin... set-property property=definitions-config value=/WEB-INF/tiles-defs/shared_defs.xml, /WEB-INF/tiles-defs/myModule_defs.xml / Note, however, that you do NOT want to initiaize the tiles plugin in the shared config file, or it will not reinitialize it from your module file with your module definitions! --David David Hibbs, ACS Staff Programmer / Analyst Distributed Applications Development and Support American National Insurance Company -Original Message- From: Patrick Cheng [mailto:[EMAIL PROTECTED] Sent: Wednesday, December 17, 2003 1:27 AM To: Struts Users Mailing List Subject: RE: Modules with Tiles Problem HI All, I found a way to get it working. %org.apache.struts.util.RequestUtils.selectModule(,request, applicatio n);% html:form action=/Layout.do I have to do this for every html:form item. This works, but it is ugly. It's even worse since this method is deprecated in struts1.2. I'm suspecting there must be a better way round right? Can someone tell me if this is the way? Or there're smarter ways? Rgds, Patrick. -Original Message- From: Patrick Cheng Sent: Wednesday, December 17, 2003 10:12 AM To: Struts Users Mailing List Subject: Modules with Tiles Problem Hi All, I have a question on Tiles when using Modules(multiple struts-config.xml's). As far as I know, switching between modules requires more than providing different URLs. Either we use ContextRelative forwards or using the struts Swiching Action class. But in the situation of tiles, if the layout includes two jsp pages and they are from different modules, say, the top part is a generic search function, used everywhere for every module, what can I do about this? Here's my situation. 2 struts configs : struts-config.xml, struts-module1-config.xml Struts-config.xml has an action called 'layout'. Struts-module1-config has an action called 'ViewMultiSelect'. So when I go: http://localhost:7001/RootContext/module1/ViewMultiSelect.do I got my ViewMultiSelect working, but in the tile 'layout', I got: [ServletException in:/layout/Header.jsp] Cannot retrieve mapping for action /Layout' My understanding is, when the current module is in Module1, struts won't care anything in struts-config.xml, therefore it doesn't know about a Layout action. How can I get it to work? Thanks a lot. Rgds. Patrick. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Modules with Tiles Problem
HI All, I found a way to get it working. %org.apache.struts.util.RequestUtils.selectModule(,request,applicatio n);% html:form action=/Layout.do I have to do this for every html:form item. This works, but it is ugly. It's even worse since this method is deprecated in struts1.2. I'm suspecting there must be a better way round right? Can someone tell me if this is the way? Or there're smarter ways? Rgds, Patrick. -Original Message- From: Patrick Cheng Sent: Wednesday, December 17, 2003 10:12 AM To: Struts Users Mailing List Subject: Modules with Tiles Problem Hi All, I have a question on Tiles when using Modules(multiple struts-config.xml's). As far as I know, switching between modules requires more than providing different URLs. Either we use ContextRelative forwards or using the struts Swiching Action class. But in the situation of tiles, if the layout includes two jsp pages and they are from different modules, say, the top part is a generic search function, used everywhere for every module, what can I do about this? Here's my situation. 2 struts configs : struts-config.xml, struts-module1-config.xml Struts-config.xml has an action called 'layout'. Struts-module1-config has an action called 'ViewMultiSelect'. So when I go: http://localhost:7001/RootContext/module1/ViewMultiSelect.do I got my ViewMultiSelect working, but in the tile 'layout', I got: [ServletException in:/layout/Header.jsp] Cannot retrieve mapping for action /Layout' My understanding is, when the current module is in Module1, struts won't care anything in struts-config.xml, therefore it doesn't know about a Layout action. How can I get it to work? Thanks a lot. Rgds. Patrick. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Modules with Tiles Problem
If you have components used everywhere for every module, create some new and separate struts-config.xml and tiles-defs.xml files. You can specify multiples of each type of file for each module, so each module is free to reference a shared config file. To reference more than one struts-config.xml, simply list them in the web.xml file separated by commas: init-param param-nameconfig/myModule/param-name param-value/WEB-INF/shared_config.xml,/WEB-INF/myModule_config.xml/param- value /init-param To reference more than one tile definition file, you can do the same thing in the myModule-config.xml file when you initialize the tiles plugin... set-property property=definitions-config value=/WEB-INF/tiles-defs/shared_defs.xml, /WEB-INF/tiles-defs/myModule_defs.xml / Note, however, that you do NOT want to initiaize the tiles plugin in the shared config file, or it will not reinitialize it from your module file with your module definitions! --David David Hibbs, ACS Staff Programmer / Analyst Distributed Applications Development and Support American National Insurance Company -Original Message- From: Patrick Cheng [mailto:[EMAIL PROTECTED] Sent: Wednesday, December 17, 2003 1:27 AM To: Struts Users Mailing List Subject: RE: Modules with Tiles Problem HI All, I found a way to get it working. %org.apache.struts.util.RequestUtils.selectModule(,request, applicatio n);% html:form action=/Layout.do I have to do this for every html:form item. This works, but it is ugly. It's even worse since this method is deprecated in struts1.2. I'm suspecting there must be a better way round right? Can someone tell me if this is the way? Or there're smarter ways? Rgds, Patrick. -Original Message- From: Patrick Cheng Sent: Wednesday, December 17, 2003 10:12 AM To: Struts Users Mailing List Subject: Modules with Tiles Problem Hi All, I have a question on Tiles when using Modules(multiple struts-config.xml's). As far as I know, switching between modules requires more than providing different URLs. Either we use ContextRelative forwards or using the struts Swiching Action class. But in the situation of tiles, if the layout includes two jsp pages and they are from different modules, say, the top part is a generic search function, used everywhere for every module, what can I do about this? Here's my situation. 2 struts configs : struts-config.xml, struts-module1-config.xml Struts-config.xml has an action called 'layout'. Struts-module1-config has an action called 'ViewMultiSelect'. So when I go: http://localhost:7001/RootContext/module1/ViewMultiSelect.do I got my ViewMultiSelect working, but in the tile 'layout', I got: [ServletException in:/layout/Header.jsp] Cannot retrieve mapping for action /Layout' My understanding is, when the current module is in Module1, struts won't care anything in struts-config.xml, therefore it doesn't know about a Layout action. How can I get it to work? Thanks a lot. Rgds. Patrick. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Modules with Tiles Problem
Hi All, I have a question on Tiles when using Modules(multiple struts-config.xml's). As far as I know, switching between modules requires more than providing different URLs. Either we use ContextRelative forwards or using the struts Swiching Action class. But in the situation of tiles, if the layout includes two jsp pages and they are from different modules, say, the top part is a generic search function, used everywhere for every module, what can I do about this? Here's my situation. 2 struts configs : struts-config.xml, struts-module1-config.xml Struts-config.xml has an action called 'layout'. Struts-module1-config has an action called 'ViewMultiSelect'. So when I go: http://localhost:7001/RootContext/module1/ViewMultiSelect.do I got my ViewMultiSelect working, but in the tile 'layout', I got: [ServletException in:/layout/Header.jsp] Cannot retrieve mapping for action /Layout' My understanding is, when the current module is in Module1, struts won't care anything in struts-config.xml, therefore it doesn't know about a Layout action. How can I get it to work? Thanks a lot. Rgds. Patrick. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Modules and Tiles: Problem
Hi, Cedric - Original Message - From: Cedric Dumoulin [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Monday, December 09, 2002 10:19 PM Subject: Re: Modules and Tiles: Problem Hi, Is there any errors regarding Tiles in the Tomcat console (you may need to enable logging for Tiles) ? Cedric I didn't see any errors in the Tomcat console. I enabled logging for Tiles. I just have downloaded new version (jakarta-struts-20021209) and I don't have this problem. Previous version was jakarta-struts-20021114. Andrew Kuzmin wrote: I have two modules: A) struts-config.xml: plug-in className=org.apache.struts.tiles.TilesPlugin set-property property=definitions-config value=/WEB-INF/conf/tiles-defs.xml, /WEB-INF/conf/tiles-defs-personalize.xml/ set-property property=moduleAware value=true / /plug-in B) struts-config-personalize.xml: action-mappings action path=/Courses type=XXX.actions.CoursesActions forward name=success path=personalize.courses.default / /action /action-mappings plug-in className=org.apache.struts.tiles.TilesPlugin set-property property=definitions-config value=/WEB-INF/conf/tiles-defs.xml, /WEB-INF/conf/tiles-defs-personalize.xml / set-property property=moduleAware value=true / /plug-in When i attempt to invoke http://XXX/personalize/Courses.do i have Error 404 and on Tomcat console i see : DEBUG [Thread-14] (RequestUtils.java:1446) - Get module name for path /personali ze/Courses.do DEBUG [Thread-14] (RequestUtils.java:1468) - Module name found: /personalize INFO [Thread-14] (RequestProcessor.java:225) - Processing a 'GET' for path '/Co urses' DEBUG [Thread-14] (RequestProcessor.java:305) - Looking for Action instance for class XXX.actions.CoursesActions DEBUG [Thread-14] (RequestProcessor.java:314) - Returning existing Action inst ance DEBUG [Thread-14] (RequestProcessor.java:428) - processForwardConfig(ForwardConf ig[name=success,path=personalize.courses.default,redirect=false,contextRela t ive= false]) But i am expecting TilesRequestProcessor. -- Andrew Kuzmin -- Andrew Kuzmin -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Modules and Tiles: Problem
Hi, Is there any errors regarding Tiles in the Tomcat console (you may need to enable logging for Tiles) ? Cedric Andrew Kuzmin wrote: I have two modules: A) struts-config.xml: plug-in className=org.apache.struts.tiles.TilesPlugin set-property property=definitions-config value=/WEB-INF/conf/tiles-defs.xml, /WEB-INF/conf/tiles-defs-personalize.xml/ set-property property=moduleAware value=true / /plug-in B) struts-config-personalize.xml: action-mappings action path=/Courses type=XXX.actions.CoursesActions forward name=success path=personalize.courses.default / /action /action-mappings plug-in className=org.apache.struts.tiles.TilesPlugin set-property property=definitions-config value=/WEB-INF/conf/tiles-defs.xml, /WEB-INF/conf/tiles-defs-personalize.xml / set-property property=moduleAware value=true / /plug-in When i attempt to invoke http://XXX/personalize/Courses.do i have Error 404 and on Tomcat console i see : DEBUG [Thread-14] (RequestUtils.java:1446) - Get module name for path /personali ze/Courses.do DEBUG [Thread-14] (RequestUtils.java:1468) - Module name found: /personalize INFO [Thread-14] (RequestProcessor.java:225) - Processing a 'GET' for path '/Co urses' DEBUG [Thread-14] (RequestProcessor.java:305) - Looking for Action instance for class XXX.actions.CoursesActions DEBUG [Thread-14] (RequestProcessor.java:314) - Returning existing Action inst ance DEBUG [Thread-14] (RequestProcessor.java:428) - processForwardConfig(ForwardConf ig[name=success,path=personalize.courses.default,redirect=false,contextRelat ive= false]) But i am expecting TilesRequestProcessor. -- Andrew Kuzmin -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]