Re: [struts-menu] contextRelative locations
Have you tried using the page attribute? This pre-pends it's value with the contextPath. You can also use forward or action if you're using Struts. Matt On Jun 9, 2004, at 6:46 PM, Brown, James wrote: Is it possible to specify context relative (similar to struts global forward's contextRelative) equal to true such that locations starting with / will have a root of treated as http://host/context/ Rather than http://host/ The issue I am having is that I have a large menu structure that I would like to use in multiple places within a multi-module application (one parent struts-config and 3 children). The layout of the site is as follows: / /mod1 /mod2 /mod3 My desire is that when a user requests: http://host/context/ http://host/context/mod1 http://host/context/mod2 http://host/context/mod3 They receive the same menu, but if I specify locations such as location=mod1/page1 they will not work when displayed within the modules as the URL becomes if in mod1: http://host/context/mod1/mod1/page1 if I specify locations such as location=/mod1/page1 they will not work when displayed within the modules as the URL becomes: http://host/mod1/mod1/page1 Note the missing context which I cannot hard code as it changes as we roll through our environments from development through to production. Any ideas? -- James THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. --- This SF.Net email is sponsored by: GNOME Foundation Hackers Unite! GUADEC: The world's #1 Open Source Desktop Event. GNOME Users and Developers European Conference, 28-30th June in Norway http://2004/guadec.org ___ struts-menu-user mailing list [EMAIL PROTECTED] https://lists.sf.net/lists/listinfo/struts-menu-user
RE: [struts-menu] contextRelative locations
Appologies. Page does work as expected - I had made changes in a (local) custom MenuDisplayer class. -- James THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Brown, James Sent: 2004 June 10 07:51 To: [EMAIL PROTECTED] Subject: RE: [struts-menu] contextRelative locations Doesn't see to make much of a difference. With the following configuration: Menu name=registration title=registration width=50 roles=registrant Item name=new title=registration.new page=/index.do/ Item name=new title=registration.new page=index.do/ Item name=new title=registration.new page=/index/ Item name=new title=registration.new page=index/ The resulting links are: http://host/context//context/index.do http://host/context//context/index.do http://host/context//context/index http://host/context//context/index When what I need is: http://host/context/index.do Is this a bug in struts-menu? Why is the context repeated twice? -- James THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Matt Raible Sent: 2004 June 10 04:13 To: [EMAIL PROTECTED] Subject: Re: [struts-menu] contextRelative locations Have you tried using the page attribute? This pre-pends it's value with the contextPath. You can also use forward or action if you're using Struts. Matt On Jun 9, 2004, at 6:46 PM, Brown, James wrote: Is it possible to specify context relative (similar to struts global forward's contextRelative) equal to true such that locations starting with / will have a root of treated as http://host/context/ Rather than http://host/ The issue I am having is that I have a large menu structure that I would like to use in multiple places within a multi-module application (one parent struts-config and 3 children). The layout of the site is as follows: / /mod1 /mod2 /mod3 My desire is that when a user requests: http://host/context/ http://host/context/mod1 http://host/context/mod2 http://host/context/mod3 They receive the same menu, but if I specify locations such as location=mod1/page1 they will not work when displayed within the modules as the URL becomes if in mod1: http://host/context/mod1/mod1/page1 if I specify locations such as location=/mod1/page1 they will not work when displayed within the modules as the URL becomes: http://host/mod1/mod1/page1 Note the missing context which I cannot hard code as it changes as we roll through our environments from development through to production. Any ideas? -- James THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. --- This SF.Net email is sponsored by: GNOME Foundation Hackers Unite! GUADEC: The world's #1 Open Source Desktop Event. GNOME Users and Developers European Conference, 28-30th June in Norway http://2004/guadec.org ___ struts-menu-user mailing list [EMAIL PROTECTED] https://lists.sf.net/lists/listinfo/struts-menu-user --- This SF.Net email is sponsored by: GNOME Foundation Hackers Unite! GUADEC: The world's #1 Open Source Desktop Event. GNOME Users and Developers European Conference, 28-30th June in Norway http://2004/guadec.org ___ struts-menu-user mailing list [EMAIL PROTECTED] https://lists.sf.net/lists/listinfo/struts-menu-user --- This SF.Net email is sponsored by: GNOME Foundation Hackers Unite! GUADEC: The world's #1 Open Source Desktop Event. GNOME Users and Developers European Conference, 28-30th June in Norway http://2004/guadec.org ___ struts-menu-user mailing list [EMAIL PROTECTED] https://lists.sf.net/lists/listinfo/struts-menu-user
RE: [struts-menu] contextRelative locations
Are you using the latest version of Struts menu (2.2)? This should not be happening and is probably a bug. You could also try Item name=new title=registration.new action=/index/ - where the action's value matches the path of your action in struts-config.xml. Matt -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Brown, James Sent: Thursday, June 10, 2004 4:51 AM To: [EMAIL PROTECTED] Subject: RE: [struts-menu] contextRelative locations Doesn't see to make much of a difference. With the following configuration: Menu name=registration title=registration width=50 roles=registrant Item name=new title=registration.new page=/index.do/ Item name=new title=registration.new page=index.do/ Item name=new title=registration.new page=/index/ Item name=new title=registration.new page=index/ The resulting links are: http://host/context//context/index.do http://host/context//context/index.do http://host/context//context/index http://host/context//context/index When what I need is: http://host/context/index.do Is this a bug in struts-menu? Why is the context repeated twice? -- James THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Matt Raible Sent: 2004 June 10 04:13 To: [EMAIL PROTECTED] Subject: Re: [struts-menu] contextRelative locations Have you tried using the page attribute? This pre-pends it's value with the contextPath. You can also use forward or action if you're using Struts. Matt On Jun 9, 2004, at 6:46 PM, Brown, James wrote: Is it possible to specify context relative (similar to struts global forward's contextRelative) equal to true such that locations starting with / will have a root of treated as http://host/context/ Rather than http://host/ The issue I am having is that I have a large menu structure that I would like to use in multiple places within a multi-module application (one parent struts-config and 3 children). The layout of the site is as follows: / /mod1 /mod2 /mod3 My desire is that when a user requests: http://host/context/ http://host/context/mod1 http://host/context/mod2 http://host/context/mod3 They receive the same menu, but if I specify locations such as location=mod1/page1 they will not work when displayed within the modules as the URL becomes if in mod1: http://host/context/mod1/mod1/page1 if I specify locations such as location=/mod1/page1 they will not work when displayed within the modules as the URL becomes: http://host/mod1/mod1/page1 Note the missing context which I cannot hard code as it changes as we roll through our environments from development through to production. Any ideas? -- James THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. --- This SF.Net email is sponsored by: GNOME Foundation Hackers Unite! GUADEC: The world's #1 Open Source Desktop Event. GNOME Users and Developers European Conference, 28-30th June in Norway http://2004/guadec.org ___ struts-menu-user mailing list [EMAIL PROTECTED] https://lists.sf.net/lists/listinfo/struts-menu-user --- This SF.Net email is sponsored by: GNOME Foundation Hackers Unite! GUADEC: The world's #1 Open Source Desktop Event. GNOME Users and Developers European Conference, 28-30th June in Norway http://2004/guadec.org ___ struts-menu-user mailing list [EMAIL PROTECTED] https://lists.sf.net/lists/listinfo/struts-menu-user --- This SF.Net email is sponsored by: GNOME Foundation Hackers Unite! GUADEC: The world's #1 Open Source Desktop Event. GNOME Users and Developers European Conference, 28-30th June in Norway http://2004/guadec.org ___ struts-menu-user mailing list [EMAIL PROTECTED] https://lists.sf.net/lists/listinfo/struts-menu-user