RE: Can struts-1.1 support multiple configurations and multiple resources
Manfred, THanks again for giving clarification. Here I got some solution. I used bundle parametre in so that I can find the Resources where It was tied to the key "sub" which is as I already mentioned given in struts-sub.xml like below But again I got some problem with validation files. Can struts-1.1 support multiple validation files? Thank you Manfred --Venkat -Original Message- From: Manfred Wolff [mailto:[EMAIL PROTECTED] Sent: Tue 6/14/2005 1:12 AM To: Struts Users Mailing List Cc: Subject: Re: Can struts-1.1 support multiple configurations and multiple resources --Venkat Thats the trick. If you set null to false, than *if* a error message is not found, the struts framework prints the language and the key, that is not found. So it says: You have an error here. So you have an other mistake. It is good practice to set null to false in all ressurce bundles, so you can see if anything is wrong. -Manfred Venkat Reddy Valluri wrote: >Hi Manfred, > I have given null="false" for my main module struts config file and still > the error message is not displayed > > instead it is just dipaying like below > en.us.error.user.user_name.required. (It is just displaying > property but not value) > >Thank you very much > >--Venkat > > > > > >-Original Message- >From: Manfred Wolff [mailto:[EMAIL PROTECTED] >Sent: Mon 6/13/2005 1:47 PM >To: Struts Users Mailing List >Cc: >Subject: Re: Can struts-1.1 support multiple configurations and multiple >resources >Venkat > >I think you don't have to deal with suffixes (like sub) because struts >itsselfs concatinate the module in the key, stored into the session. I >have a little example written for my struts book (only in german) that >deals with multiple struts config files. You may download it under > >http://struts-ge-packt.de/download/code.zip > >Because it is no maven project it comes with a lot of libraries. > >1st Struts config: (struts-config.xml) > > >2nd Struts config with Module (struts-modul-confix.xml) > > >It is a struts 1.2 application but the module support is fine in 1.1 > >-Manfred > >Venkat Reddy Valluri wrote: > > > >>Hi Manfred, >>Thank you very much for responding immediately. I ended up multiple >> struts config files successfully. But the thing is when I tried to use >> separate resources for each struts config file using bundle parametre, It >> seems not to be working. >> >>Here is my struts configurations >> >> In my main module struts config file >>I included below one >>struts-main.xml---> >>> parameter="com.main.examp.ApplicationResources"/> >> >> >>In my sub module struts config file >> >>I included below one >>struts-sub.xml---> >> > parameter="com.sub.examp.SubResources" key="sub"> >> >> >>SubResources.properties> >>error.user.user_name.required=UserName is required >> >>Here in my sub module >> >>SubEditActionForm.java---> >> >>In validate method I have given like this >> >>public ActionErrors validate(ActionMapping mapping, >>HttpServletRequest request) { >> ActionErrors errors = new ActionErrors(); >> >> if (user_name == null || user_name.length() == 0) { >> errors.add("user_name", new >> ActionError("error.user.user_name.required")); >> } >> return errors; >>} >> >>But here the error messgae "UserName is required" is not able to be displyed >>on screen when I submit the page with out entering user_name >> >> So I thought of passing buddle attribute "sub" which is used >> struts-sub.xml to ActionError class >>( >>> parameter="com.sub.examp.SubResources" key="sub"> >>) >> >> But there is no option to pass that attribute in ActionError or >> ActionMessage class >> >> SO here where I struck >> >>Can you please throw some light on this >> >>Thanks in advace >> >>--Venkat >> >> >> >> >> >> >> >> >> >> >>-Original Message- >>From: Manfred Wolff [mailto:[EMAIL PROTECTED] >>Sent: Mon 6/13/2005 10:00 AM >>To: Struts Users Mailing List >>Cc: >&
Re: Can struts-1.1 support multiple configurations and multiple resources
--Venkat Thats the trick. If you set null to false, than *if* a error message is not found, the struts framework prints the language and the key, that is not found. So it says: You have an error here. So you have an other mistake. It is good practice to set null to false in all ressurce bundles, so you can see if anything is wrong. -Manfred Venkat Reddy Valluri wrote: Hi Manfred, I have given null="false" for my main module struts config file and still the error message is not displayed instead it is just dipaying like below en.us.error.user.user_name.required. (It is just displaying property but not value) Thank you very much --Venkat -Original Message- From: Manfred Wolff [mailto:[EMAIL PROTECTED] Sent: Mon 6/13/2005 1:47 PM To: Struts Users Mailing List Cc: Subject: Re: Can struts-1.1 support multiple configurations and multiple resources Venkat I think you don't have to deal with suffixes (like sub) because struts itsselfs concatinate the module in the key, stored into the session. I have a little example written for my struts book (only in german) that deals with multiple struts config files. You may download it under http://struts-ge-packt.de/download/code.zip Because it is no maven project it comes with a lot of libraries. 1st Struts config: (struts-config.xml) 2nd Struts config with Module (struts-modul-confix.xml) It is a struts 1.2 application but the module support is fine in 1.1 -Manfred Venkat Reddy Valluri wrote: Hi Manfred, Thank you very much for responding immediately. I ended up multiple struts config files successfully. But the thing is when I tried to use separate resources for each struts config file using bundle parametre, It seems not to be working. Here is my struts configurations In my main module struts config file I included below one struts-main.xml---> In my sub module struts config file I included below one struts-sub.xml---> SubResources.properties> error.user.user_name.required=UserName is required Here in my sub module SubEditActionForm.java---> In validate method I have given like this public ActionErrors validate(ActionMapping mapping, HttpServletRequest request) { ActionErrors errors = new ActionErrors(); if (user_name == null || user_name.length() == 0) { errors.add("user_name", new ActionError("error.user.user_name.required")); } return errors; } But here the error messgae "UserName is required" is not able to be displyed on screen when I submit the page with out entering user_name So I thought of passing buddle attribute "sub" which is used struts-sub.xml to ActionError class ( ) But there is no option to pass that attribute in ActionError or ActionMessage class SO here where I struck Can you please throw some light on this Thanks in advace --Venkat -Original Message- From: Manfred Wolff [mailto:[EMAIL PROTECTED] Sent: Mon 6/13/2005 10:00 AM To: Struts Users Mailing List Cc: Subject: Re: Can struts-1.1 support multiple configurations and multiple resources Yes it can with multiple module support. http://struts.apache.org/userGuide/configuration.html#dd_config_modules Manfred Venkat Reddy Valluri wrote: Hi Can struts-1.1 support multiple configurations and multiple resources. Can some body please throw some light on this. I need it very urgent Thanks in advance --Venkat - 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] -- === Dipl.-Inf. Manfred Wolff --- phone neusta : +49 421 20696-0 fax neusta: +49 421 20696-99 phone private : +49 421 534522 eFax : +49 1212 6 62663 96533 --- Diese E-Mail enthält möglicherweise vertrauliche und/oder rechtlich geschützte Informationen. Wenn Sie nicht der richtige Adressat sind oder diese E-Mail irrtümlich erhalten haben, informieren Sie bitte sofort den Absender und vernichten Sie diese Mail. Das unerlaubte Kopieren sowie die unbefugte Weitergabe dieser Mail ist nicht gestattet. This e-mail may contain confidential and/or privileged information. If you are not the intended recipient (or have received this e-mail in error) please noti
RE: Can struts-1.1 support multiple configurations and multiple resources
Hi Manfred, I have given null="false" for my main module struts config file and still the error message is not displayed instead it is just dipaying like below en.us.error.user.user_name.required. (It is just displaying property but not value) Thank you very much --Venkat -Original Message- From: Manfred Wolff [mailto:[EMAIL PROTECTED] Sent: Mon 6/13/2005 1:47 PM To: Struts Users Mailing List Cc: Subject: Re: Can struts-1.1 support multiple configurations and multiple resources Venkat I think you don't have to deal with suffixes (like sub) because struts itsselfs concatinate the module in the key, stored into the session. I have a little example written for my struts book (only in german) that deals with multiple struts config files. You may download it under http://struts-ge-packt.de/download/code.zip Because it is no maven project it comes with a lot of libraries. 1st Struts config: (struts-config.xml) 2nd Struts config with Module (struts-modul-confix.xml) It is a struts 1.2 application but the module support is fine in 1.1 -Manfred Venkat Reddy Valluri wrote: >Hi Manfred, > Thank you very much for responding immediately. I ended up multiple > struts config files successfully. But the thing is when I tried to use > separate resources for each struts config file using bundle parametre, It > seems not to be working. > >Here is my struts configurations > > In my main module struts config file >I included below one >struts-main.xml---> > parameter="com.main.examp.ApplicationResources"/> > > >In my sub module struts config file > >I included below one >struts-sub.xml---> > parameter="com.sub.examp.SubResources" key="sub"> > > >SubResources.properties> >error.user.user_name.required=UserName is required > >Here in my sub module > >SubEditActionForm.java---> > >In validate method I have given like this > >public ActionErrors validate(ActionMapping mapping, > HttpServletRequest request) { > ActionErrors errors = new ActionErrors(); > >if (user_name == null || user_name.length() == 0) { >errors.add("user_name", new > ActionError("error.user.user_name.required")); >} > return errors; > } > >But here the error messgae "UserName is required" is not able to be displyed >on screen when I submit the page with out entering user_name > >So I thought of passing buddle attribute "sub" which is used > struts-sub.xml to ActionError class >( >parameter="com.sub.examp.SubResources" key="sub"> >) > > But there is no option to pass that attribute in ActionError or > ActionMessage class > >SO here where I struck > >Can you please throw some light on this > >Thanks in advace > >--Venkat > > > > > > > > > > >-Original Message- >From: Manfred Wolff [mailto:[EMAIL PROTECTED] >Sent: Mon 6/13/2005 10:00 AM >To:Struts Users Mailing List >Cc: >Subject: Re: Can struts-1.1 support multiple configurations and multiple >resources > >Yes it can with multiple module support. > >http://struts.apache.org/userGuide/configuration.html#dd_config_modules > >Manfred > >Venkat Reddy Valluri wrote: > > > >>Hi >> >> Can struts-1.1 support multiple configurations and multiple resources. Can >> some body please throw some light on this. I need it very urgent >> >>Thanks in advance >> >>--Venkat >> >> >> >> >> >>- >>To unsubscribe, e-mail: [EMAIL PROTECTED] >>For additional commands, e-mail: [EMAIL PROTECTED] >> >> >> > > > > -- === Dipl.-Inf. Manfred Wolff Software Engineer --- http://www.manfred-wolff.de http://www.struts-it.org --- Die fatale Neigung der Menschen, vom Nachdenken über eine Sache nachzulassen, wenn sie nicht länger zweifelhaft ist, ist die Ursache der Hälfte ihrer Irrtümer. - John Stuart Mil - ___ - 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: Can struts-1.1 support multiple configurations and multiple resources
Venkat I think you don't have to deal with suffixes (like sub) because struts itsselfs concatinate the module in the key, stored into the session. I have a little example written for my struts book (only in german) that deals with multiple struts config files. You may download it under http://struts-ge-packt.de/download/code.zip Because it is no maven project it comes with a lot of libraries. 1st Struts config: (struts-config.xml) 2nd Struts config with Module (struts-modul-confix.xml) It is a struts 1.2 application but the module support is fine in 1.1 -Manfred Venkat Reddy Valluri wrote: Hi Manfred, Thank you very much for responding immediately. I ended up multiple struts config files successfully. But the thing is when I tried to use separate resources for each struts config file using bundle parametre, It seems not to be working. Here is my struts configurations In my main module struts config file I included below one struts-main.xml---> In my sub module struts config file I included below one struts-sub.xml---> SubResources.properties> error.user.user_name.required=UserName is required Here in my sub module SubEditActionForm.java---> In validate method I have given like this public ActionErrors validate(ActionMapping mapping, HttpServletRequest request) { ActionErrors errors = new ActionErrors(); if (user_name == null || user_name.length() == 0) { errors.add("user_name", new ActionError("error.user.user_name.required")); } return errors; } But here the error messgae "UserName is required" is not able to be displyed on screen when I submit the page with out entering user_name So I thought of passing buddle attribute "sub" which is used struts-sub.xml to ActionError class ( ) But there is no option to pass that attribute in ActionError or ActionMessage class SO here where I struck Can you please throw some light on this Thanks in advace --Venkat -Original Message- From: Manfred Wolff [mailto:[EMAIL PROTECTED] Sent: Mon 6/13/2005 10:00 AM To: Struts Users Mailing List Cc: Subject: Re: Can struts-1.1 support multiple configurations and multiple resources Yes it can with multiple module support. http://struts.apache.org/userGuide/configuration.html#dd_config_modules Manfred Venkat Reddy Valluri wrote: Hi Can struts-1.1 support multiple configurations and multiple resources. Can some body please throw some light on this. I need it very urgent Thanks in advance --Venkat - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- === Dipl.-Inf. Manfred Wolff Software Engineer --- http://www.manfred-wolff.de http://www.struts-it.org --- Die fatale Neigung der Menschen, vom Nachdenken über eine Sache nachzulassen, wenn sie nicht länger zweifelhaft ist, ist die Ursache der Hälfte ihrer Irrtümer. - John Stuart Mil - ___ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Can struts-1.1 support multiple configurations and multiple resources
Hi Manfred, Thank you very much for responding immediately. I ended up multiple struts config files successfully. But the thing is when I tried to use separate resources for each struts config file using bundle parametre, It seems not to be working. Here is my struts configurations In my main module struts config file I included below one struts-main.xml---> In my sub module struts config file I included below one struts-sub.xml---> SubResources.properties> error.user.user_name.required=UserName is required Here in my sub module SubEditActionForm.java---> In validate method I have given like this public ActionErrors validate(ActionMapping mapping, HttpServletRequest request) { ActionErrors errors = new ActionErrors(); if (user_name == null || user_name.length() == 0) { errors.add("user_name", new ActionError("error.user.user_name.required")); } return errors; } But here the error messgae "UserName is required" is not able to be displyed on screen when I submit the page with out entering user_name So I thought of passing buddle attribute "sub" which is used struts-sub.xml to ActionError class ( ) But there is no option to pass that attribute in ActionError or ActionMessage class SO here where I struck Can you please throw some light on this Thanks in advace --Venkat -Original Message- From: Manfred Wolff [mailto:[EMAIL PROTECTED] Sent: Mon 6/13/2005 10:00 AM To: Struts Users Mailing List Cc: Subject: Re: Can struts-1.1 support multiple configurations and multiple resources Yes it can with multiple module support. http://struts.apache.org/userGuide/configuration.html#dd_config_modules Manfred Venkat Reddy Valluri wrote: >Hi > > Can struts-1.1 support multiple configurations and multiple resources. Can > some body please throw some light on this. I need it very urgent > >Thanks in advance > >--Venkat > > > > > >- >To unsubscribe, e-mail: [EMAIL PROTECTED] >For additional commands, e-mail: [EMAIL PROTECTED] > -- === Dipl.-Inf. Manfred Wolff --- phone neusta : +49 421 20696-0 fax neusta: +49 421 20696-99 phone private : +49 421 534522 eFax : +49 1212 6 62663 96533 --- Diese E-Mail enthält möglicherweise vertrauliche und/oder rechtlich geschützte Informationen. Wenn Sie nicht der richtige Adressat sind oder diese E-Mail irrtümlich erhalten haben, informieren Sie bitte sofort den Absender und vernichten Sie diese Mail. Das unerlaubte Kopieren sowie die unbefugte Weitergabe dieser Mail ist nicht gestattet. This e-mail may contain confidential and/or privileged information. If you are not the intended recipient (or have received this e-mail in error) please notify the sender immediately and destroy this e-mail. Any unauthorised copying, disclosure or distribution of the material in this e-mail is strictly forbidden. - 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: Can struts-1.1 support multiple configurations and multiple resources
Hi Manfred, Thank you very much for responding immediately. I ended up multiple struts config files successfully. But the thing is when I tried to use separate resources for each struts config file using bundle parametre, It seems not to be working. Here is my struts configurations In my main module struts config file I included below one struts-main.xml---> In my sub module struts config file I included below one struts-sub.xml---> SubResources.properties> error.user.user_name.required=UserName is required Here in my sub module SubEditActionForm.java---> In validate method I have given like this public ActionErrors validate(ActionMapping mapping, HttpServletRequest request) { ActionErrors errors = new ActionErrors(); if (user_name == null || user_name.length() == 0) { errors.add("user_name", new ActionError("error.user.user_name.required")); } return errors; } But here the error messgae "UserName is required" is not able to be displyed on screen when I submit the page with out entering user_name So I thought of passing buddle attribute "sub" which is used struts-sub.xml to ActionError class ( ) But there is no option to pass that attribute in ActionError or ActionMessage class SO here where I struck Can you please throw some light on this Thanks in advace --Venkat -Original Message- From: Manfred Wolff [mailto:[EMAIL PROTECTED] Sent: Mon 6/13/2005 10:00 AM To: Struts Users Mailing List Cc: Subject: Re: Can struts-1.1 support multiple configurations and multiple resources Yes it can with multiple module support. http://struts.apache.org/userGuide/configuration.html#dd_config_modules Manfred Venkat Reddy Valluri wrote: >Hi > > Can struts-1.1 support multiple configurations and multiple resources. Can > some body please throw some light on this. I need it very urgent > >Thanks in advance > >--Venkat > > > > > >- >To unsubscribe, e-mail: [EMAIL PROTECTED] >For additional commands, e-mail: [EMAIL PROTECTED] > -- === Dipl.-Inf. Manfred Wolff --- phone neusta : +49 421 20696-0 fax neusta: +49 421 20696-99 phone private : +49 421 534522 eFax : +49 1212 6 62663 96533 --- Diese E-Mail enthält möglicherweise vertrauliche und/oder rechtlich geschützte Informationen. Wenn Sie nicht der richtige Adressat sind oder diese E-Mail irrtümlich erhalten haben, informieren Sie bitte sofort den Absender und vernichten Sie diese Mail. Das unerlaubte Kopieren sowie die unbefugte Weitergabe dieser Mail ist nicht gestattet. This e-mail may contain confidential and/or privileged information. If you are not the intended recipient (or have received this e-mail in error) please notify the sender immediately and destroy this e-mail. Any unauthorised copying, disclosure or distribution of the material in this e-mail is strictly forbidden. - 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: Can struts-1.1 support multiple configurations and multiple resources
Yes it can with multiple module support. http://struts.apache.org/userGuide/configuration.html#dd_config_modules Manfred Venkat Reddy Valluri wrote: Hi Can struts-1.1 support multiple configurations and multiple resources. Can some body please throw some light on this. I need it very urgent Thanks in advance --Venkat - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- === Dipl.-Inf. Manfred Wolff --- phone neusta : +49 421 20696-0 fax neusta: +49 421 20696-99 phone private : +49 421 534522 eFax : +49 1212 6 62663 96533 --- Diese E-Mail enthält möglicherweise vertrauliche und/oder rechtlich geschützte Informationen. Wenn Sie nicht der richtige Adressat sind oder diese E-Mail irrtümlich erhalten haben, informieren Sie bitte sofort den Absender und vernichten Sie diese Mail. Das unerlaubte Kopieren sowie die unbefugte Weitergabe dieser Mail ist nicht gestattet. This e-mail may contain confidential and/or privileged information. If you are not the intended recipient (or have received this e-mail in error) please notify the sender immediately and destroy this e-mail. Any unauthorised copying, disclosure or distribution of the material in this e-mail is strictly forbidden. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]