RE: multiple struts-config files
The advantage (from what I have read and seen) is geared more towards team development. Having multiple struts configuration files allows you to modularize the areas of your app, so that people aren't stepping on each others toes with new changes. Another advantage of multiple config files is to separate your app. For example, you could have one config file that contains all actions the users access, and one config file that has all actions for admin functions of your app. Now with regards to the other questions, I am not exactly sure whether or not you could call an action from a different config file. I want to think yes, because otherwise it would defeat the purpose of allowing multiple config files. Can someone who uses two config file confirm that when struts loads, that both config files get loaded together and can reference each others parts? HTH, Daniel -Original Message- From: koen boutsen [mailto:[EMAIL PROTECTED] Sent: Thursday, February 12, 2004 9:40 AM To: [EMAIL PROTECTED] Subject: multiple struts-config files Hi I've read some mails about multiple struts-config files, but still have some questions: -what's the advantage of using multiple struts-config files in one application ? Is it better for performance ? -how can I call a forward or action in my second struts-config from within a jsp ? -can I call a forward or action in one struts-config from within another struts-config ? Any help is very appreciated Koen Find what you are looking for with the Lycos Yellow Pages http://r.lycos.com/r/yp_emailfooter/http://yellowpages.lycos.com/default .asp?SRC=lycos10 - 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: multiple struts-config files
If you use multiple struts-config files in a single module, the net result is a module which is configured from the union of all the files; Struts has no knowledge of which components were defined in which files, so those questions are not relevant. Note that if you use MODULES, by adding more than one config... init parameter in web.xml, this is not the case; there are boundaries between modules that affect calling actions, forwarding to JSPs, etc. As modules are now, they are really designed for fairly compartmentalized sub-applications which should have minimal need for cross-over; if that doesn't describe your modules, you probably don't want to use them -- but you can achieve some of the same goals by specifying a comma-separated list of struts-config files. Daniel has it right -- having multiple files helps teams work together, and for a big app, it just makes it easier to find what you are looking for. There are no performance implications to using more than one struts-config file, unless perhaps the servlet initialization would be infinitesimally slower. Joe At 9:48 AM -0800 2/12/04, Daniel Kalcevich wrote: The advantage (from what I have read and seen) is geared more towards team development. Having multiple struts configuration files allows you to modularize the areas of your app, so that people aren't stepping on each others toes with new changes. Another advantage of multiple config files is to separate your app. For example, you could have one config file that contains all actions the users access, and one config file that has all actions for admin functions of your app. Now with regards to the other questions, I am not exactly sure whether or not you could call an action from a different config file. I want to think yes, because otherwise it would defeat the purpose of allowing multiple config files. Can someone who uses two config file confirm that when struts loads, that both config files get loaded together and can reference each others parts? HTH, Daniel -Original Message- From: koen boutsen [mailto:[EMAIL PROTECTED] Sent: Thursday, February 12, 2004 9:40 AM To: [EMAIL PROTECTED] Subject: multiple struts-config files Hi I've read some mails about multiple struts-config files, but still have some questions: -what's the advantage of using multiple struts-config files in one application ? Is it better for performance ? -how can I call a forward or action in my second struts-config from within a jsp ? -can I call a forward or action in one struts-config from within another struts-config ? Any help is very appreciated Koen Find what you are looking for with the Lycos Yellow Pages http://r.lycos.com/r/yp_emailfooter/http://yellowpages.lycos.com/default .asp?SRC=lycos10 - 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] -- Joe Germuska [EMAIL PROTECTED] http://blog.germuska.com Imagine if every Thursday your shoes exploded if you tied them the usual way. This happens to us all the time with computers, and nobody thinks of complaining. -- Jef Raskin - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: multiple struts-config files
This is the answer to your third question: Yes, you can forward an action in one struts-config from within another struts-config... All the mapping(from all config file) will be in put in a single ActionMapping class at the start of the web server Regards VasudevRaoGupta -Original Message- From: koen boutsen [mailto:[EMAIL PROTECTED] Sent: 12 February 2004 23:10 To: [EMAIL PROTECTED] Subject: multiple struts-config files Hi I've read some mails about multiple struts-config files, but still have some questions: -what's the advantage of using multiple struts-config files in one application ? Is it better for performance ? -how can I call a forward or action in my second struts-config from within a jsp ? -can I call a forward or action in one struts-config from within another struts-config ? Any help is very appreciated Koen Find what you are looking for with the Lycos Yellow Pages http://r.lycos.com/r/yp_emailfooter/http://yellowpages.lycos.com/default .asp?SRC=lycos10 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] Confidentiality Notice The information contained in this electronic message and any attachments to this message are intended for the exclusive use of the addressee(s) and may contain confidential or privileged information. If you are not the intended recipient, please notify the sender at Wipro or [EMAIL PROTECTED] immediately and destroy all copies of this message and any attachments. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: multiple struts-config files
Hi I've read some mails about multiple struts-config files, but still have some questions: -what's the advantage of using multiple struts-config files in one application ? Is it better for performance ? Rather than performace issue, it's more of teams-developing-on-diff-modules and project-maintainance issue. -how can I call a forward or action in my second struts-config from within a jsp ? you know jsp:forward tag. the url in that tag needs to have module name and path under than module name defined. -can I call a forward or action in one struts-config from within another struts-config ? yes, see module switching in docs. HTH Navjot Singh Any help is very appreciated Koen Find what you are looking for with the Lycos Yellow Pages http://r.lycos.com/r/yp_emailfooter/http://yellowpages.lycos.com/de fault.asp?SRC=lycos10 - 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: Multiple struts-config.xml
On Sat, 20 Dec 2003, Sudhakar G wrote: Hi, Can any one give me a example how struts supports multiple struts-config.xml file? See the struts-example.war that comes with the distribution. Thanks in advance.. cheers Sudhakar DISCLAIMER: This message (including attachment if any) is confidential and may be privileged. Before opening attachments please check them for viruses and defects. MindTree Consulting Private Limited (MindTree) will not be responsible for any viruses or defects or any forwarded attachments emanating either from within MindTree or outside. If you have received this message by mistake please notify the sender by return e-mail and delete this message from your system. Any unauthorized use or dissemination of this message in whole or in part is strictly prohibited. Please note that e-mails are susceptible to change and MindTree shall not be liable for any improper, untimely or incomplete transmission. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- James Mitchell Software Developer / Struts Evangelist http://www.struts-atlanta.org - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Multiple struts-config.xml
Hi Ashutosh, My application is huge one and hence the single struts-config.xml becomes bulky. Sometimes even we are getting exception while in purging the struts-config file. So I want to split it in two. From that persepective after going through your mail I have two doubts regarding this. 1. Is splitting the file in the way you mentioned in your mail is possible in Struts 1.0.2 ? 2. If both the struts file related to same application how do we set the relative path of the second struts file in param-name element ? Regards, Sourav -Original Message- From: Ashutosh Satyam [mailto:[EMAIL PROTECTED] Sent: Saturday, December 20, 2003 10:37 AM To: Struts Users Mailing List Subject: RE: Multiple struts-config.xml Hi, In order to use multiple struts config file, you need to modify the web descriptor file as mentioned below. Thus, the ActionServlet loads each of the application related config file. servlet servlet-nameaction/servlet-name servlet-class org.apache.struts.action.ActionServlet /servlet-class init-param param-nameconfig/param-name param-value/WEB-INF/config/struts1.xml/param-value /init-param init-param param-nameconfig/secondApp/param-name param-value/WEB-INF/config/struts2.xml/param-value /init-param load-on-startup2/load-on-startup /servlet While invoking the Action classes you need to use proper relative path. For this particular case, say you have an Action mapping - Action1 defined in struts1.xml and Action2 defined in struts2.xml To invoke them the URL should be http://hostname/Action1.do http://hostname/secondApp/Action2.do Regards, Ashutosh Satyam -Original Message- From: Sudhakar G [mailto:[EMAIL PROTECTED] Sent: Saturday, December 20, 2003 9:51 AM To: [EMAIL PROTECTED] Subject: Multiple struts-config.xml Hi, Can any one give me a example how struts supports multiple struts-config.xml file? Thanks in advance.. cheers Sudhakar DISCLAIMER: This message (including attachment if any) is confidential and may be privileged. Before opening attachments please check them for viruses and defects. MindTree Consulting Private Limited (MindTree) will not be responsible for any viruses or defects or any forwarded attachments emanating either from within MindTree or outside. If you have received this message by mistake please notify the sender by return e-mail and delete this message from your system. Any unauthorized use or dissemination of this message in whole or in part is strictly prohibited. Please note that e-mails are susceptible to change and MindTree shall not be liable for any improper, untimely or incomplete transmission. - 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] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Multiple struts-config.xml
Your problem could be solve by this simple method init-param param-nameconfig/param-name param-value/WEB-INF/struts-config.xml, /WEB-INF/struts-config-timesheet.xml, /WEB-INF/struts-config-recruitment.xml, /WEB-INF/struts-config-staffing.xml, /WEB-INF/struts-config-training.xml, /WEB-INF/struts-config-employeedetails.xml /param-value /init-param Or else the following method posted by Craig. ?xml version=1.0? !DOCTYPE ... [ !ENTITY part1 SYSTEM form-beans.xml !ENTITY part2 SYSTEM global-forwards.xml !ENTITY part3 SYSTEM action-mappings.xml ] struts-config form-beans part1; /form-beans global-forwards part2; /global-forwards action-mappings part3; /action-mappings /struts-config Mohan -Original Message- From: souravm [mailto:[EMAIL PROTECTED] Sent: Saturday, December 20, 2003 12:28 PM To: Struts Users Mailing List Subject: RE: Multiple struts-config.xml Hi Ashutosh, My application is huge one and hence the single struts-config.xml becomes bulky. Sometimes even we are getting exception while in purging the struts-config file. So I want to split it in two. From that persepective after going through your mail I have two doubts regarding this. 1. Is splitting the file in the way you mentioned in your mail is possible in Struts 1.0.2 ? 2. If both the struts file related to same application how do we set the relative path of the second struts file in param-name element ? Regards, Sourav -Original Message- From: Ashutosh Satyam [mailto:[EMAIL PROTECTED] Sent: Saturday, December 20, 2003 10:37 AM To: Struts Users Mailing List Subject: RE: Multiple struts-config.xml Hi, In order to use multiple struts config file, you need to modify the web descriptor file as mentioned below. Thus, the ActionServlet loads each of the application related config file. servlet servlet-nameaction/servlet-name servlet-class org.apache.struts.action.ActionServlet /servlet-class init-param param-nameconfig/param-name param-value/WEB-INF/config/struts1.xml/param-value /init-param init-param param-nameconfig/secondApp/param-name param-value/WEB-INF/config/struts2.xml/param-value /init-param load-on-startup2/load-on-startup /servlet While invoking the Action classes you need to use proper relative path. For this particular case, say you have an Action mapping - Action1 defined in struts1.xml and Action2 defined in struts2.xml To invoke them the URL should be http://hostname/Action1.do http://hostname/secondApp/Action2.do Regards, Ashutosh Satyam -Original Message- From: Sudhakar G [mailto:[EMAIL PROTECTED] Sent: Saturday, December 20, 2003 9:51 AM To: [EMAIL PROTECTED] Subject: Multiple struts-config.xml Hi, Can any one give me a example how struts supports multiple struts-config.xml file? Thanks in advance.. cheers Sudhakar DISCLAIMER: This message (including attachment if any) is confidential and may be privileged. Before opening attachments please check them for viruses and defects. MindTree Consulting Private Limited (MindTree) will not be responsible for any viruses or defects or any forwarded attachments emanating either from within MindTree or outside. If you have received this message by mistake please notify the sender by return e-mail and delete this message from your system. Any unauthorized use or dissemination of this message in whole or in part is strictly prohibited. Please note that e-mails are susceptible to change and MindTree shall not be liable for any improper, untimely or incomplete transmission. - 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] - 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: Multiple struts-config.xml
Just specify whatever files you want to use as a comma-delimited list in the web-xml. See the Struts Mailreader (struts-example) for a working example. HTH, Ted Sudhakar G wrote: Hi, Can any one give me a example how struts supports multiple struts-config.xml file? Thanks in advance.. cheers Sudhakar - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Multiple struts-config.xml
Hi, In order to use multiple struts config file, you need to modify the web descriptor file as mentioned below. Thus, the ActionServlet loads each of the application related config file. servlet servlet-nameaction/servlet-name servlet-class org.apache.struts.action.ActionServlet /servlet-class init-param param-nameconfig/param-name param-value/WEB-INF/config/struts1.xml/param-value /init-param init-param param-nameconfig/secondApp/param-name param-value/WEB-INF/config/struts2.xml/param-value /init-param load-on-startup2/load-on-startup /servlet While invoking the Action classes you need to use proper relative path. For this particular case, say you have an Action mapping - Action1 defined in struts1.xml and Action2 defined in struts2.xml To invoke them the URL should be http://hostname/Action1.do http://hostname/secondApp/Action2.do Regards, Ashutosh Satyam -Original Message- From: Sudhakar G [mailto:[EMAIL PROTECTED] Sent: Saturday, December 20, 2003 9:51 AM To: [EMAIL PROTECTED] Subject: Multiple struts-config.xml Hi, Can any one give me a example how struts supports multiple struts-config.xml file? Thanks in advance.. cheers Sudhakar DISCLAIMER: This message (including attachment if any) is confidential and may be privileged. Before opening attachments please check them for viruses and defects. MindTree Consulting Private Limited (MindTree) will not be responsible for any viruses or defects or any forwarded attachments emanating either from within MindTree or outside. If you have received this message by mistake please notify the sender by return e-mail and delete this message from your system. Any unauthorized use or dissemination of this message in whole or in part is strictly prohibited. Please note that e-mails are susceptible to change and MindTree shall not be liable for any improper, untimely or incomplete transmission. - 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: Multiple struts-config files
In Struts 1.1, you have two options: you can list multiple struts-config files as a comma-delimited list, or you can subdivide a larger application into modules. Do so in the web.xml file. Add the init-param tag to the servlet tag. init-param param-nameconfig/param-name param-value/WEB-INF/conf/struts-default.xml,another-struts-config.xml/param-value /init-param -- OR -- init-param param-nameconfig/param-name param-value/WEB-INF/conf/struts-default.xml/param-value /init-param init-param param-nameconfig/module1/param-name param-value/WEB-INF/conf/struts-module1.xml/param-value /init-param Phil = Java Web Application Architect mapimage.com - Java and GIS struts1.1:tomcat4.1.27:linuxRH8 __ Do you Yahoo!? New Yahoo! Photos - easier uploading and sharing. http://photos.yahoo.com/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: multiple struts-config.xml - multiple modules?
If the tools are being developed by the same people, you'll probably be better off using mutiple struts configuration files than modules. Modules are best suited for when things are being developed by independant parties who aren't working together. If that doesn't describe you, then just give each tool it's own subdirectory and use that same name to identify everything else that goes with the tool. Even if you used modules, you can't distribute them as separate WARs. If your container supports single logon, as Tomcat does, you can distribute each tool as a separate application and flip back and forth between after a single logon. With a modern container, you can also share JARs and save some resources. The applications can't share session information, though, so you'd have to pass everything through the request or cookies or a database. HTH, Ted. -- Ted Husted, Junit in Action - http://www.manning.com/massol/, Struts in Action - http://husted.com/struts/book.html, JSP Site Design - http://www.amazon.com/exec/obidos/ISBN=1861005512. Michael Blair wrote: I have a question regarding overall architecture. I am going to have a huge web app; well it will be a suite of web based tools. Lets say I will have one main menu, and from there possibly 5 separate modules (separate content areas). First, how hard is it to have a struts-config for each module (I have an example below). Second, can each module be in its own war and still be able to go back and forth among the other modules? web.xml init-param param-nameconfig/param-name param-value/WEB-INF/config/struts-config.xml/param-value /init-param init-param param-nameconfig/module1param-name param-value/WEB-INF/config/struts-module1-config.xml/param-value /init-param now the actions work fine in the default config, but how do I call an action FROM the default to module 1? Here is what I have tried in my .jsp. Note, this .jsp is part of the default and im trying to call something in module1. html:link page=/action/module1/getmodule1action . . . Thanks, Mike - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Multiple Struts-Config files
They should each be standalone/valid configs. -Original Message- From: Jerry Jalenak [mailto:[EMAIL PROTECTED] Sent: Thursday, July 24, 2003 2:29 PM To: '[EMAIL PROTECTED]' Subject: Multiple Struts-Config files When using multiple struts-config files in web.xml, should each file be complete? i.e. should each begin and end with appropriate struts-config / /struts-config tags? Or should the first one in the list contain the struts-config, and the last one contain the /struts-config tag? Jerry Jalenak Team Lead, Web Publishing LabOne, Inc. 10101 Renner Blvd. Lenexa, KS 66219 (913) 577-1496 [EMAIL PROTECTED] This transmission (and any information attached to it) may be confidential and is intended solely for the use of the individual or entity to which it is addressed. If you are not the intended recipient or the person responsible for delivering the transmission to the intended recipient, be advised that you have received this transmission in error and that any use, dissemination, forwarding, printing, or copying of this information is strictly prohibited. If you have received this transmission in error, please immediately notify LabOne at the following email address: [EMAIL PROTECTED] - 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: Multiple Struts-Config files
That's what I suspected, but wanted to get some independant confirmation :-) Should the last config file contain the controller/, message-resources/, and plug-in/ stuff? The doc seems to imply that if you re-define a parameter, the last one 'quietly wins'. To me this means that I should only have these tags in the last config file. Is it possible to have a config file with ONLY these tags? Jerry Jalenak Team Lead, Web Publishing LabOne, Inc. 10101 Renner Blvd. Lenexa, KS 66219 (913) 577-1496 [EMAIL PROTECTED] -Original Message- From: Mike Jasnowski [mailto:[EMAIL PROTECTED] Sent: Thursday, July 24, 2003 1:30 PM To: Struts Users Mailing List Subject: RE: Multiple Struts-Config files They should each be standalone/valid configs. -Original Message- From: Jerry Jalenak [mailto:[EMAIL PROTECTED] Sent: Thursday, July 24, 2003 2:29 PM To: '[EMAIL PROTECTED]' Subject: Multiple Struts-Config files When using multiple struts-config files in web.xml, should each file be complete? i.e. should each begin and end with appropriate struts-config / /struts-config tags? Or should the first one in the list contain the struts-config, and the last one contain the /struts-config tag? Jerry Jalenak Team Lead, Web Publishing LabOne, Inc. 10101 Renner Blvd. Lenexa, KS 66219 (913) 577-1496 [EMAIL PROTECTED] This transmission (and any information attached to it) may be confidential and is intended solely for the use of the individual or entity to which it is addressed. If you are not the intended recipient or the person responsible for delivering the transmission to the intended recipient, be advised that you have received this transmission in error and that any use, dissemination, forwarding, printing, or copying of this information is strictly prohibited. If you have received this transmission in error, please immediately notify LabOne at the following email address: [EMAIL PROTECTED] - 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] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Multiple Struts-Config files
Here's what a struts-config element can contain: !ELEMENT struts-config (data-sources?, form-beans?, global-exceptions?, global-forwards?, action-mappings?, controller?, message-resources*, plug-in*) ? - 0 or 1 * - 0 or more So, yes, you can have a config with just controller, message-resources, and plug-in elements. Quoting Jerry Jalenak [EMAIL PROTECTED]: That's what I suspected, but wanted to get some independant confirmation :-) Should the last config file contain the controller/, message-resources/, and plug-in/ stuff? The doc seems to imply that if you re-define a parameter, the last one 'quietly wins'. To me this means that I should only have these tags in the last config file. Is it possible to have a config file with ONLY these tags? Jerry Jalenak Team Lead, Web Publishing LabOne, Inc. 10101 Renner Blvd. Lenexa, KS 66219 (913) 577-1496 [EMAIL PROTECTED] -Original Message- From: Mike Jasnowski [mailto:[EMAIL PROTECTED] Sent: Thursday, July 24, 2003 1:30 PM To: Struts Users Mailing List Subject: RE: Multiple Struts-Config files They should each be standalone/valid configs. -Original Message- From: Jerry Jalenak [mailto:[EMAIL PROTECTED] Sent: Thursday, July 24, 2003 2:29 PM To: '[EMAIL PROTECTED]' Subject: Multiple Struts-Config files When using multiple struts-config files in web.xml, should each file be complete? i.e. should each begin and end with appropriate struts-config / /struts-config tags? Or should the first one in the list contain the struts-config, and the last one contain the /struts-config tag? Jerry Jalenak Team Lead, Web Publishing LabOne, Inc. 10101 Renner Blvd. Lenexa, KS 66219 (913) 577-1496 [EMAIL PROTECTED] -- Kris Schneider mailto:[EMAIL PROTECTED] D.O.Tech http://www.dotech.com/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Multiple Struts-config files ???
Raj, not sure if this is what you are after, but for a single module you can do a comma-delimited list of config files. See your web.xml below: On 06/12/2003 04:08:45 PM Raj Atchutuni wrote: The following is the error message i get when i am trying to configure multiple struts-config files. It could retrieve mapping for the action path in the second config file(i.e struts-config-private.xml) Here are the entries in my web.xml and 1,2 struts-config files. Can any one help me please. - Raj [6/12/03 16:01:01:594 EDT] 34b56128 WebGroup X Servlet Error: Cannot retrieve mapping for action /secondfile: javax.servlet.jsp.JspException: Cannot retrieve mapping for action /secondfile at org.apache.struts.taglib.html.FormTag.lookup(FormTag.java:871) at org.apache.struts.taglib.html.FormTag.doStartTag(FormTag.java:543) web.xml--- -- init-param param-nameconfig/param-name param-value/WEB-INF/struts-config-public.xml try this: param-value/WEB-INF/struts-config-public.xml,/WEB-INF/struts-config-private.xml /param-value In this scenario, the last file in the list wins. So if you have an action in each file named the same, then the one in the last file will be used. Hope that helps, Susan Bradeen /init-param init-param param-nameconfig/private/param-name param-value/WEB-INF/struts-config-private.xml /param-value /init-param struts-config-public.xml-- -- action path=/firstfile type=org.apache.struts.webapp.example.LogonAction name=logonForm scope=session validate=true input=/logon.jsp forward name=success path=test.try/ /action struts-config-private.xml- --- action-mappings action path=/secondfile type=org.apache.struts.webapp.example.LogonAction name=logonForm scope=session validate=true input=/logon.jsp forward name=success path=test.try/ /action /action-mappings - Do you Yahoo!?Free online calendar with sync to Outlook(TM). - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Multiple struts-config files - help
Then the problem is that you are telling the Servlet that the second struts config is in a module when you add the /private to the end of config as in config/private. You need to find another way then to specify struts config files. It was suggested to use commas separating them with the same config init param. Let us know if that works. -Original Message- From: Raj Atchutuni [mailto:[EMAIL PROTECTED] Sent: Thursday, June 12, 2003 8:52 PM To: Struts Users Mailing List Subject: RE: Multiple struts-config files - help Bailey, Thanks for your reply. I am testing this concept to implement in my team. I am trying to access the actions in 2 struts-config files from the SAME MODULE (local web project). In other words i have separate struts-config file with actions like 1. /firstfile in struts-config-private.xml 2. /secondfile in struts-config-public.xml I am testing this by switching the action in my jsp. I could access actions in default parm in web.xml --- default - config /WEB-INF/struts-config-public.xml I read some where on the net i need some struts patches to make it work. Does any know something abt it or should i get the latest nightly build ? Thanks Raj. Bailey, Shane C. [EMAIL PROTECTED] wrote: That is because you are trying to submit to an action in one module from another. I bet that action=private/secondfile will work. This sounds bad to have to add the module name but it isn't. This is because most of the time you will always be submitting to the same module and struts will add the module prefix for you. To get from one module to the other (linking and not posting to) I use global forwards in my struts config. Like in my main module I have and in my main modules struts config I have a Any other time that you are not going between modules then you don't have to worry (do anything) for the modules to work (because struts knows by going through the controller first since you don't directly link to JSPs from JSPs which module you are in). Hope that helps. -Original Message- From: Raj Atchutuni [mailto:[EMAIL PROTECTED] Sent: Thursday, June 12, 2003 7:36 PM To: [EMAIL PROTECTED] Subject: Re: Multiple struts-config files - help The following is the error message i get when i am trying to configure multiple struts-config files. It could NOT retrieve mapping for the action path in the second config file(i.e struts-config-private.xml) Here are the entries in my web.xml and 1,2 struts-config files. in jsp file i have action=/secondfile in form element. if i switch action=/firstfile, it is working. Can any one help me please. - Raj [6/12/03 16:01:01:594 EDT] 34b56128 WebGroup X Servlet Error: Cannot retrieve mapping for action /secondfile: javax.servlet.jsp.JspException: Cannot retrieve mapping for action /secondfile at org.apache.struts.taglib.html.FormTag.lookup(FormTag.java:871) at org.apache.struts.taglib.html.FormTag.doStartTag(FormTag.java:543) web.xml--- -- config /WEB-INF/struts-config-public.xml config/private /WEB-INF/struts-config-private.xml struts-config-public.xml-- -- type=org.apache.struts.webapp.example.LogonAction name=logonForm scope=session validate=true input=/logon.jsp struts-config-private.xml- --- type=org.apache.struts.webapp.example.LogonAction name=logonForm scope=session validate=true input=/logon.jsp - Do you Yahoo!? Free online calendar with sync to Outlook(TM). - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - Do you Yahoo!? Free online calendar with sync to Outlook(TM). - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Multiple struts-config files - help
If you want to use a xml struts config file for each of the modules, you can solve your problem by retrieving a common form beans xml file, on each xml file. (you can apply the same thing for other elements). struts-public-config.xml ?xml version=1.0 ...? !DOCTYPE struts-config ... [ !ENTITY common-formbeans SYSTEM common-form-beans.xml ] struts-config form-beans !-- common form beans -- common-formbeans !-- specific form beans -- form-bean ... /form-bean /form-beans ... /struts-config struts-private-config.xml ?xml version=1.0 ...? !DOCTYPE struts-config ... [ !ENTITY common-formbeans SYSTEM common-form-beans.xml ] struts-config form-beans common-formbeans !-- specific form beans -- form-bean ... /form-bean /form-beans ... /struts-config common-form-beans.xml form-bean form property ... /form-bean - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Multiple Struts-config files ???
The following is the error message i get when i am trying to configure multiple struts-config files. It could retrieve mapping for the action path in the second config file(i.e struts-config-private.xml) Here are the entries in my web.xml and 1,2 struts-config files. Can any one help me please. - Raj [6/12/03 16:01:01:594 EDT] 34b56128 WebGroup X Servlet Error: Cannot retrieve mapping for action /secondfile: javax.servlet.jsp.JspException: Cannot retrieve mapping for action /secondfile at org.apache.struts.taglib.html.FormTag.lookup(FormTag.java:871) at org.apache.struts.taglib.html.FormTag.doStartTag(FormTag.java:543) web.xml- init-param param-nameconfig/param-name param-value/WEB-INF/struts-config-public.xml /param-value /init-param init-param param-nameconfig/private/param-name param-value/WEB-INF/struts-config-private.xml /param-value /init-param struts-config-public.xml action path=/firstfile type=org.apache.struts.webapp.example.LogonAction name=logonForm scope=session validate=true input=/logon.jsp forward name=success path=test.try/ /action struts-config-private.xml action-mappings action path=/secondfile type=org.apache.struts.webapp.example.LogonAction name=logonForm scope=session validate=true input=/logon.jsp forward name=success path=test.try/ /action /action-mappings - Do you Yahoo!? Free online calendar with sync to Outlook(TM).
Re: Multiple Struts-config files - Typo
there is typo in question. Please read as It could retrieve mapping for the action path in the second config file(i.e struts-config-private.xml) - Do you Yahoo!? Free online calendar with sync to Outlook(TM).
Re: Multiple Struts-config files ???
sorry, It could NOT retrieve mapping for the action path in the second config file(i.e struts-config-private.xml) - Do you Yahoo!? Free online calendar with sync to Outlook(TM).
Re: Multiple struts-config files - help
The following is the error message i get when i am trying to configure multiple struts-config files. It could NOT retrieve mapping for the action path in the second config file(i.e struts-config-private.xml) Here are the entries in my web.xml and 1,2 struts-config files. in jsp file i have action=/secondfile in form element. if i switch action=/firstfile, it is working. Can any one help me please. - Raj [6/12/03 16:01:01:594 EDT] 34b56128 WebGroup X Servlet Error: Cannot retrieve mapping for action /secondfile: javax.servlet.jsp.JspException: Cannot retrieve mapping for action /secondfile at org.apache.struts.taglib.html.FormTag.lookup(FormTag.java:871) at org.apache.struts.taglib.html.FormTag.doStartTag(FormTag.java:543) web.xml- init-param param-nameconfig/param-name param-value/WEB-INF/struts-config-public.xml /param-value /init-param init-param param-nameconfig/private/param-name param-value/WEB-INF/struts-config-private.xml /param-value /init-param struts-config-public.xml action path=/firstfile type=org.apache.struts.webapp.example.LogonAction name=logonForm scope=session validate=true input=/logon.jsp forward name=success path=test.try/ /action struts-config-private.xml action-mappings action path=/secondfile type=org.apache.struts.webapp.example.LogonAction name=logonForm scope=session validate=true input=/logon.jsp forward name=success path=test.try/ /action /action-mappings - Do you Yahoo!? Free online calendar with sync to Outlook(TM).
RE: Multiple struts-config files - help
That is because you are trying to submit to an action in one module from another. I bet that action=private/secondfile will work. This sounds bad to have to add the module name but it isn't. This is because most of the time you will always be submitting to the same module and struts will add the module prefix for you. To get from one module to the other (linking and not posting to) I use global forwards in my struts config. Like in my main module I have html:link forward=usermgmt.home / and in my main modules struts config I have a forward name=usermgmt.home path=/usermgmt/home.do / Any other time that you are not going between modules then you don't have to worry (do anything) for the modules to work (because struts knows by going through the controller first since you don't directly link to JSPs from JSPs which module you are in). Hope that helps. -Original Message- From: Raj Atchutuni [mailto:[EMAIL PROTECTED] Sent: Thursday, June 12, 2003 7:36 PM To: [EMAIL PROTECTED] Subject: Re: Multiple struts-config files - help The following is the error message i get when i am trying to configure multiple struts-config files. It could NOT retrieve mapping for the action path in the second config file(i.e struts-config-private.xml) Here are the entries in my web.xml and 1,2 struts-config files. in jsp file i have action=/secondfile in form element. if i switch action=/firstfile, it is working. Can any one help me please. - Raj [6/12/03 16:01:01:594 EDT] 34b56128 WebGroup X Servlet Error: Cannot retrieve mapping for action /secondfile: javax.servlet.jsp.JspException: Cannot retrieve mapping for action /secondfile at org.apache.struts.taglib.html.FormTag.lookup(FormTag.java:871) at org.apache.struts.taglib.html.FormTag.doStartTag(FormTag.java:543) web.xml--- -- init-param param-nameconfig/param-name param-value/WEB-INF/struts-config-public.xml /param-value /init-param init-param param-nameconfig/private/param-name param-value/WEB-INF/struts-config-private.xml /param-value /init-param struts-config-public.xml-- -- action path=/firstfile type=org.apache.struts.webapp.example.LogonAction name=logonForm scope=session validate=true input=/logon.jsp forward name=success path=test.try/ /action struts-config-private.xml- --- action-mappings action path=/secondfile type=org.apache.struts.webapp.example.LogonAction name=logonForm scope=session validate=true input=/logon.jsp forward name=success path=test.try/ /action /action-mappings - Do you Yahoo!? Free online calendar with sync to Outlook(TM). - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Multiple struts-config files - help
Bailey, Thanks for your reply. I am testing this concept to implement in my team. I am trying to access the actions in 2 struts-config files from the SAME MODULE (local web project). In other words i have separate struts-config file with actions like 1. /firstfile in struts-config-private.xml 2. /secondfile in struts-config-public.xml I am testing this by switching the action in my jsp. I could access actions in default parm in web.xml --- default - config /WEB-INF/struts-config-public.xml I read some where on the net i need some struts patches to make it work. Does any know something abt it or should i get the latest nightly build ? Thanks Raj. Bailey, Shane C. [EMAIL PROTECTED] wrote: That is because you are trying to submit to an action in one module from another. I bet that action=private/secondfile will work. This sounds bad to have to add the module name but it isn't. This is because most of the time you will always be submitting to the same module and struts will add the module prefix for you. To get from one module to the other (linking and not posting to) I use global forwards in my struts config. Like in my main module I have and in my main modules struts config I have a Any other time that you are not going between modules then you don't have to worry (do anything) for the modules to work (because struts knows by going through the controller first since you don't directly link to JSPs from JSPs which module you are in). Hope that helps. -Original Message- From: Raj Atchutuni [mailto:[EMAIL PROTECTED] Sent: Thursday, June 12, 2003 7:36 PM To: [EMAIL PROTECTED] Subject: Re: Multiple struts-config files - help The following is the error message i get when i am trying to configure multiple struts-config files. It could NOT retrieve mapping for the action path in the second config file(i.e struts-config-private.xml) Here are the entries in my web.xml and 1,2 struts-config files. in jsp file i have action=/secondfile in form element. if i switch action=/firstfile, it is working. Can any one help me please. - Raj [6/12/03 16:01:01:594 EDT] 34b56128 WebGroup X Servlet Error: Cannot retrieve mapping for action /secondfile: javax.servlet.jsp.JspException: Cannot retrieve mapping for action /secondfile at org.apache.struts.taglib.html.FormTag.lookup(FormTag.java:871) at org.apache.struts.taglib.html.FormTag.doStartTag(FormTag.java:543) web.xml--- -- config /WEB-INF/struts-config-public.xml config/private /WEB-INF/struts-config-private.xml struts-config-public.xml-- -- type=org.apache.struts.webapp.example.LogonAction name=logonForm scope=session validate=true input=/logon.jsp struts-config-private.xml- --- type=org.apache.struts.webapp.example.LogonAction name=logonForm scope=session validate=true input=/logon.jsp - Do you Yahoo!? Free online calendar with sync to Outlook(TM). - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - Do you Yahoo!? Free online calendar with sync to Outlook(TM).
Re: Multiple struts-config files without Modules
Tuesday, February 04, 2003 8:12 PM , Ted Husted [EMAIL PROTECTED] a écrit : Is it dumb ? Or may it be an advance of the feature promised in 1.2 that will allow inheritence of configs ? Just to be precise, no one is able to make any promises about any features for any possible future release. No need to be so defensive. My english (and myself) is not very accurate, so I correct : of the feature that some rumors whispered that will maybe allow a form of ineritence of configs in a forward version. At this point, 1.2 may just be the patches for minor enhancements that came in while 1.1 was in never-ending beta, along with the Commons Resources migration. I'd like to see the same type of element inheritance in all the configs that we have in the tiles-config, but someone will have to create and commit the patches for this before it gets slated for a release. I agree with the tiles-like solution. It's efficent and simple. There's no need to make a complete object-c++-like type of ineritence. Template, default values, and overloading is enought. But if I can give my opinion, one interest of inheritence in config files is not only the factorization of declarations (that multiple files yet allow) but also the ability for third party to deliver some ready-to-use applications that the final user will just need to customise (if he want to) by overloading some configuration such as data sources for exemple. (actualy maybe a final feature will be usefull to). Malik. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Multiple struts-config files without Modules
Monday, February 03, 2003 8:19 PM , Craig R. McClanahan [EMAIL PROTECTED] a écrit : On Mon, 3 Feb 2003, Susan Bradeen wrote: Date: Mon, 3 Feb 2003 13:24:10 -0500 From: Susan Bradeen [EMAIL PROTECTED] Reply-To: Struts Users Mailing List [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: Multiple struts-config files without Modules Without using Modules, and given the following configuration: !-- Standard Action Servlet Configuration (with debugging) -- servlet servlet-nameaction/servlet-name [snip] servlet-classorg.apache.struts.action.ActionServlet/servlet-class init-param param-nameconfig/param-name param-value /WEB-INF/struts-config.xml, /WEB-INF/struts-config-SectionOne.xml, /WEB-INF/struts-config-SectionTwo.xml /param-value /init-param ... load-on-startup1/load-on-startup /servlet Is there a proper order for the list of config files? Is there any advantage to having the struts-config.xml listed first or last? Preliminary tests show that I can put global forwards, exceptions, and actions in any of the config files, and Struts seems to find it. Even having a DynaActionForm in one config file, and action mappings that reference it in another config file, seems to work fine. Does Struts somehow actually consider the three files to be one? I started using this for organizational purposes mainly, but I am curious if there are any pitfalls that I should be aware of. Any comments are appreciated. If the contentes of your three files are constructed correctly (i.e. you don't try to declare the same action path more than once, for example), then order does not matter at all -- Struts simply processes all of the files at initialization time. The ability to split is simply for the convenience of the application developer (particularly when you might have different subteams responsible for different parts of a single large single-module app). And may we use a list of struts-config in combination with a multi-modules config ? Like that : servlet servlet-nameaction/servlet-name servlet-classorg.apache.struts.action.ActionServlet/servlet-class init-param param-nameconfig/param-name param-value/WEB-INF/struts-config-common.xml, /WEB-INF/struts-config-global.xml/param-value /init-param init-param param-nameconfig/market/param-name param-value/WEB-INF/struts-config-common.xml, /WEB-INF/struts-config-market.xml/param-value /init-param load-on-startup1/load-on-startup /servlet Is it dumb ? Or may it be an advance of the feature promised in 1.2 that will allow inheritence of configs ? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Multiple struts-config files without Modules
On Tue, 4 Feb 2003, Malik Recoing wrote: And may we use a list of struts-config in combination with a multi-modules config ? Like that : servlet servlet-nameaction/servlet-name servlet-classorg.apache.struts.action.ActionServlet/servlet-class init-param param-nameconfig/param-name param-value/WEB-INF/struts-config-common.xml, /WEB-INF/struts-config-global.xml/param-value /init-param init-param param-nameconfig/market/param-name param-value/WEB-INF/struts-config-common.xml, /WEB-INF/struts-config-market.xml/param-value /init-param load-on-startup1/load-on-startup /servlet Yes, you can do this, but what really happens is the set of files for each module is merged only within that module. Is it dumb ? Or may it be an advance of the feature promised in 1.2 that will allow inheritence of configs ? Multiple files per module is useful even without inheritance, and that's what you get in 1.1. Craig - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Multiple struts-config files without Modules
Is it dumb ? Or may it be an advance of the feature promised in 1.2 that will allow inheritence of configs ? Just to be precise, no one is able to make any promises about any features for any possible future release. At this point, 1.2 may just be the patches for minor enhancements that came in while 1.1 was in never-ending beta, along with the Commons Resources migration. I'd like to see the same type of element inheritance in all the configs that we have in the tiles-config, but someone will have to create and commit the patches for this before it gets slated for a release. AFAIK, inheritance between modules is still a whiteboard concept, and no one has even tried coding a design for that yet. Once we have tiles-like element inheritance, it may be unnecessary anyway. -Ted. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Multiple struts-config files without Modules
You can infer from this that it does consider them to be one file: http://jakarta.apache.org/struts/userGuide/configuration.html#dd_config_servlet David From: Susan Bradeen [EMAIL PROTECTED] Reply-To: Struts Users Mailing List [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: Multiple struts-config files without Modules Date: Mon, 3 Feb 2003 13:24:10 -0500 Without using Modules, and given the following configuration: !-- Standard Action Servlet Configuration (with debugging) -- servlet servlet-nameaction/servlet-name servlet-classorg.apache.struts.action.ActionServlet/servlet-class init-param param-nameconfig/param-name param-value /WEB-INF/struts-config.xml, /WEB-INF/struts-config-SectionOne.xml, /WEB-INF/struts-config-SectionTwo.xml /param-value /init-param ... load-on-startup1/load-on-startup /servlet Is there a proper order for the list of config files? Is there any advantage to having the struts-config.xml listed first or last? Preliminary tests show that I can put global forwards, exceptions, and actions in any of the config files, and Struts seems to find it. Even having a DynaActionForm in one config file, and action mappings that reference it in another config file, seems to work fine. Does Struts somehow actually consider the three files to be one? I started using this for organizational purposes mainly, but I am curious if there are any pitfalls that I should be aware of. Any comments are appreciated. Susan Bradeen SoftLanding Systems, Inc [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] _ Add photos to your e-mail with MSN 8. Get 2 months FREE*. http://join.msn.com/?page=features/featuredemail - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Multiple struts-config files without Modules
On Mon, 3 Feb 2003, Susan Bradeen wrote: Date: Mon, 3 Feb 2003 13:24:10 -0500 From: Susan Bradeen [EMAIL PROTECTED] Reply-To: Struts Users Mailing List [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: Multiple struts-config files without Modules Without using Modules, and given the following configuration: !-- Standard Action Servlet Configuration (with debugging) -- servlet servlet-nameaction/servlet-name servlet-classorg.apache.struts.action.ActionServlet/servlet-class init-param param-nameconfig/param-name param-value /WEB-INF/struts-config.xml, /WEB-INF/struts-config-SectionOne.xml, /WEB-INF/struts-config-SectionTwo.xml /param-value /init-param ... load-on-startup1/load-on-startup /servlet Is there a proper order for the list of config files? Is there any advantage to having the struts-config.xml listed first or last? Preliminary tests show that I can put global forwards, exceptions, and actions in any of the config files, and Struts seems to find it. Even having a DynaActionForm in one config file, and action mappings that reference it in another config file, seems to work fine. Does Struts somehow actually consider the three files to be one? I started using this for organizational purposes mainly, but I am curious if there are any pitfalls that I should be aware of. Any comments are appreciated. If the contentes of your three files are constructed correctly (i.e. you don't try to declare the same action path more than once, for example), then order does not matter at all -- Struts simply processes all of the files at initialization time. The ability to split is simply for the convenience of the application developer (particularly when you might have different subteams responsible for different parts of a single large single-module app). Susan Bradeen SoftLanding Systems, Inc [EMAIL PROTECTED] Craig - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Multiple struts
I think you must use different name files for struts-config.xml. In the configuration of the action servlet in web.xml, you can define the name of the struts-config file. Try it. -Mensaje original- De: Shay Cohen [mailto:[EMAIL PROTECTED]] Enviado el: miércoles, 09 de octubre de 2002 10:54 Para: '[EMAIL PROTECTED]' Asunto: Multiple struts Hi, Are there any limitations in deploying two or more struts application on the same web server ? I tried this with the following configuration: 1. added another servlet and servletmapping to the web.xml ( on respond to *.do files and the other to *.do2 ) 2. used the same struts-config.xml for both 3. used the same contrainer for both ( WAR file ). 4. using struts 1.1 beta 1. And as you can guest , without any luck, all redirection went to the first servlet/servletmapping regardless to the differentiations in The url's extensions. Thanks in advance Shay -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Multiple struts
Shay , You can deploy more than two applications on webserver. You will have to replicate the structure of directory for the application. For instance you have an applicationX applicationY. The typical directory structure on Tomcat would be C:/tomcat-root-directory/webapps/applicationX. C:/tomcat-root-directory/webapps/applicationY. applicationX will have web-inf folder ( This is where you place your web.xml struts-config.xml) under web-inf folder you will have classes folder. You will have to replicate the same structure for applicationY also i,e create a folder applicationY under webapps, web-inf under applicatioY folder.set ur configuration file accordingly. You can access the second application by http://localhost/applicationY/YOURFILENAME HTH, Divakar -Original Message- From: Shay Cohen [SMTP:[EMAIL PROTECTED]] Sent: Wednesday, October 09, 2002 2:24 PM To: '[EMAIL PROTECTED]' Subject: Multiple struts Hi, Are there any limitations in deploying two or more struts application on the same web server ? I tried this with the following configuration: 1. added another servlet and servletmapping to the web.xml ( on respond to *.do files and the other to *.do2 ) 2. used the same struts-config.xml for both 3. used the same contrainer for both ( WAR file ). 4. using struts 1.1 beta 1. And as you can guest , without any luck, all redirection went to the first servlet/servletmapping regardless to the differentiations in The url's extensions. Thanks in advance Shay DISCLAIMER: Information contained and transmitted by this E-MAIL is proprietary to Mascot Systems Limited and is intended for use only by the individual or entity to which it is addressed, and may contain information that is privileged, confidential or exempt from disclosure under applicable law. If this is a forwarded message, the content of this E-MAIL may not have been sent with the authority of the Company. If you are not the intended recipient, an agent of the intended recipient or a person responsible for delivering the information to the named recipient, you are notified that any use, distribution, transmission, printing, copying or dissemination of this information in any way or in any manner is strictly prohibited. If you have received this communication in error, please delete this mail notify us immediately at [EMAIL PROTECTED] Before opening attachments, please scan for viruses. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Multiple struts applications - dang?
Okay, I ran across a write-up on jGuru that tells me I cannot do the second one... Does anyone have a good idea for handling this? I was thinking maybe an ant build that would copy all of the central templates to all of the web-apps that used them... That would provide a central place to maintain them... Thoughts? forget the first one, I forgot about Tomcats built in realms and form-based-logins... Thanks! Bill -Original Message- From: William B. Chmura Sent: Wednesday, May 29, 2002 2:27 PM To: struts-user Subject: Multiple struts applications What would be the best way to: * Have a user bean shared across the entire app-server? Log-in and it knows you no matter which web-app you access on the server (it will not need to be handled across multiple servers). * Provide consistant look and feel across all the applications easily (I am looking at tiles, so can I make one application read in header.jsp from another web-app container (or just some common area)? This is all going to be on an Intranet with a limited number of employees. In the big picture I am trying to decide if I should make it all in one web-app and just define different packages for each application, or in different web-app containers and make it span like I mentioned above... Any help would be greatly appreciated! Bill -- 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]
Re: Multiple struts-config.xml for Struts 1.1
I have some code on my website for having multiple config files under Struts 1.0x, however, I never got around to porting the code to 1.1x. You should be able to look at the 1.0x code and somewhat easily port it to 1.1x. -james [EMAIL PROTECTED] http://www.jamesholmes.com/struts/ --- Chen, Dean (Zhun) [EMAIL PROTECTED] wrote: There were description about implementing multiple struts-config.xml in Struts 1.0x, see http://www.mail-archive.com/struts-user@jakarta.apache.org/msg28739.html Are there any similar solutions for Struts 1.1? Thanks Dean Chen -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] __ Do You Yahoo!? LAUNCH - Your Yahoo! Music Experience http://launch.yahoo.com -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: multiple struts-config files
So the 1.1 patch on your site does not work ? Are there any plans to implement this for 1.1 then ? Regards, Cornelius -Original Message- From: James Holmes [mailto:[EMAIL PROTECTED]] Sent: Wednesday, April 17, 2002 7:00 PM To: Struts Users Mailing List Subject: RE: multiple struts-config files Actually the code on my website only works with struts 1.0. This code came about before all of the changes were made to Struts to form the 1.1 code. Basically the code just reads multiple files and concatenates them together in memory. Since Struts internally stores all of the values in hashmaps you essentially have one big config repository melded together from all of the individual files. -james [EMAIL PROTECTED] http://www.jamesholmes.com/struts/ --- Bill Page [EMAIL PROTECTED] wrote: I didn't see any docs on this. Looks interesting. Does it essentially concatenate the files into one big one. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Wednesday, April 17, 2002 5:27 PM To: Struts Users Mailing List Subject: Re: multiple struts-config files I believe this is the link http://www.jamesholmes.com/struts/ -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] __ Do You Yahoo!? Yahoo! Tax Center - online filing with TurboTax http://taxes.yahoo.com/ -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: multiple struts-config files
I believe this is the link http://www.jamesholmes.com/struts/ Corneliu Rachieru [EMAIL PROTECTED] on 04/17/2002 02:14:20 PM Please respond to Struts Users Mailing List [EMAIL PROTECTED] To: 'Struts Users Mailing List' [EMAIL PROTECTED] cc: Subject: multiple struts-config files Hello, I seem to recall that struts 1.1b supports multiple struts config files, and i also recall a discussion on the mailing list about it, but i can't seem to find it anymore. Does anyone has any bookmarks to such discussions or to any relevant documentation/examples that might shed some light on how multiple struts-config files are implemented ? Thank you, Corneliu these are my opinions... and i could be wrong... : Corneliu Rachieru : Java/J2ee UI designer : Espial Inc. espial.com : (613)230-4770 x1234 : [EMAIL PROTECTED] ** Please Note: The information in this E-mail message, and any files transmitted with it, is confidential and may be legally privileged. It is intended only for the use of the individual(s) named above. If you are the intended recipient, be aware that your use of any confidential or personal information may be restricted by state and federal privacy laws. If you, the reader of this message, are not the intended recipient, you are hereby notified that you should not further disseminate, distribute, or forward this E-mail message. If you have received this E-mail in error, please notify the sender and delete the material from any computer. Thank you. ** -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: multiple struts-config files
I didn't see any docs on this. Looks interesting. Does it essentially concatenate the files into one big one. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Wednesday, April 17, 2002 5:27 PM To: Struts Users Mailing List Subject: Re: multiple struts-config files I believe this is the link http://www.jamesholmes.com/struts/ -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: multiple struts-config files
Actually the code on my website only works with struts 1.0. This code came about before all of the changes were made to Struts to form the 1.1 code. Basically the code just reads multiple files and concatenates them together in memory. Since Struts internally stores all of the values in hashmaps you essentially have one big config repository melded together from all of the individual files. -james [EMAIL PROTECTED] http://www.jamesholmes.com/struts/ --- Bill Page [EMAIL PROTECTED] wrote: I didn't see any docs on this. Looks interesting. Does it essentially concatenate the files into one big one. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Wednesday, April 17, 2002 5:27 PM To: Struts Users Mailing List Subject: Re: multiple struts-config files I believe this is the link http://www.jamesholmes.com/struts/ -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] __ Do You Yahoo!? Yahoo! Tax Center - online filing with TurboTax http://taxes.yahoo.com/ -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Multiple struts-config.xml files?
I asked a similar question re potential problems with multiple action servlet instances(no reply). I think the issues may have something to do with the actionservlet resources but I'm not sure and would be **very** interested in finding out as I'm using this approach using struts 1.0. Jin - Original Message - From: Struts Newsgroup @[EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Thursday, February 14, 2002 8:55 AM Subject: Re: Multiple struts-config.xml files? Subject: Re: Multiple struts-config.xml files? From: Jens Mander [EMAIL PROTECTED] === Which are the alterations required to allow struts 1.0 to permit multiple Action Servlets? Doesn't a container (e.g. Tomcat) generate separate instances for each action servlet which reads its own struts-config file and if so what kind of threading problems could occur? In my case I've been using an approach similar to what Michael describes without the RoleDispatcherServlet and I am worried about these threading problems you mention. Thanks, Ronaldo Ted Husted [EMAIL PROTECTED] schrieb im Newsbeitrag news:[EMAIL PROTECTED]... Struts 1.0 isn't designed to permit multiple ActionServlets. Unless you've made some alterations, there may be threading problems. --cut -- Ted Husted, Husted dot Com, Fairport NY USA. -- Java Web Development with Struts. -- Tel +1 585 737-3463. -- Web http://www.husted.com/struts/ -- 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]
Re: Multiple struts-config.xml files?
The Struts 1.0 ActionServlet stores a number of elements in Application scope. // Publish our internal collections as necessary getServletContext().setAttribute(Action.FORM_BEANS_KEY, formBeans); getServletContext().setAttribute(Action.FORWARDS_KEY, forwards); getServletContext().setAttribute(Action.MAPPINGS_KEY, mappings); So, it's really not really threading issues (mispoke), but the last ActionServlet would win when it came to the Application scope elements. The custom tag extensions look to these to retrieving the ActionForwards and what not. Check for these statics in utils.RequestUtils, and you will see what I mean. Of course, if you are not using the custom tags, then it may not matter. -- Ted Husted, Husted dot Com, Fairport NY USA. -- Java Web Development with Struts. -- Tel +1 585 737-3463. -- Web http://www.husted.com/struts/ Struts Newsgroup (@Basebeans.com) wrote: Subject: Re: Multiple struts-config.xml files? From: Jens Mander [EMAIL PROTECTED] === Which are the alterations required to allow struts 1.0 to permit multiple Action Servlets? Doesn't a container (e.g. Tomcat) generate separate instances for each action servlet which reads its own struts-config file and if so what kind of threading problems could occur? In my case I've been using an approach similar to what Michael describes without the RoleDispatcherServlet and I am worried about these threading problems you mention. Thanks, Ronaldo Ted Husted [EMAIL PROTECTED] schrieb im Newsbeitrag news:[EMAIL PROTECTED]... Struts 1.0 isn't designed to permit multiple ActionServlets. Unless you've made some alterations, there may be threading problems. --cut -- Ted Husted, Husted dot Com, Fairport NY USA. -- Java Web Development with Struts. -- Tel +1 585 737-3463. -- Web http://www.husted.com/struts/ -- 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]
RE: Multiple struts-config.xml files?
For the record, to create multiple ActionServlets, I just extended ActionServlet with an empty class body - basically creating an identical servlet with a different name, for each role. This is working fine with each ActionServlet reading a different struts-config file. Could there be some other problem with resources? -Original Message- From: Struts Newsgroup [mailto:[EMAIL PROTECTED]] Sent: Thursday, February 14, 2002 3:55 AM To: [EMAIL PROTECTED] Subject: Re: Multiple struts-config.xml files? Subject: Re: Multiple struts-config.xml files? From: Jens Mander [EMAIL PROTECTED] === Which are the alterations required to allow struts 1.0 to permit multiple Action Servlets? Doesn't a container (e.g. Tomcat) generate separate instances for each action servlet which reads its own struts-config file and if so what kind of threading problems could occur? In my case I've been using an approach similar to what Michael describes without the RoleDispatcherServlet and I am worried about these threading problems you mention. Thanks, Ronaldo Ted Husted [EMAIL PROTECTED] schrieb im Newsbeitrag news:[EMAIL PROTECTED]... Struts 1.0 isn't designed to permit multiple ActionServlets. Unless you've made some alterations, there may be threading problems. --cut -- Ted Husted, Husted dot Com, Fairport NY USA. -- Java Web Development with Struts. -- Tel +1 585 737-3463. -- Web http://www.husted.com/struts/ -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Multiple struts-config.xml files?
I just had one ActionServlet, and for each action defined in it's struts-config.xml, there is a separate forward defined per role (prefixed by role name). role1_success role2_success etc. All forward name strings (e.g. success) get intercepted essentially by a super class Action and then the user's role is added to the forward name. The actual ActionForward is then looked up in the action mapping and returned to the Struts ActionServlet. Regards, Nick - Original Message - From: Press, Michael [EMAIL PROTECTED] To: 'Struts User List' [EMAIL PROTECTED] Sent: Thursday, February 14, 2002 8:28 AM Subject: Multiple struts-config.xml files? I want to have multiple workflows, with users mapped to a particular workflow based on their role. I know that Struts doesn't support this now. Is there an intent to support this in the future? In the meantime, I'm interested in suggestions on the best way to implement this. Right now, I've done this: 1) I've created multiple ActionServlets, each of which reads it's own struts-config file. Each pair is the workflow for one role. 2) I've got a RoleDispatcherServlet that intercepts all Struts URLs, converts the URL to call the appropriate ActionServlet for the user's role, and forwards to that URL. Any additional suggestions or alternative methods are appreciated. Michael -- 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]
Re: Multiple struts-config.xml files?
Struts 1.0 isn't designed to permit multiple ActionServlets. Unless you've made some alterations, there may be threading problems. Struts 1.1 does speak to the issues you raise, but we are all still getting our heads around it, and trying to put some documentation together. I was also just thinking about trying something like what Nick describes, but in the context of localization or browserization, but it could work the same as roles. But I'm thinking along the lines of getting the ActionMapping and ActionForwards do the work. What I'm thinking about is using an ActionMapping subclass as an ActionForward factory. When calling findMapping, you could also pass the request. It would then return a new ActionForward, that would know how to amend the path according to something in the request or session. Like the locale, or maybe a role object. It would then work like Nick described. Instead of just going to /pages/some.jsp, it could go to /pages/fr/some.jsp or pages/zh/some.jsp. Or in your case /pages/manager/some.jsp or /pages/clerk/some.jsp. If some paths could be changed, and others couldn't, there might be a marker in the path, like /pages/{0}some.jsp, for the ones that could be merged. Still at the thinking stage though. -- Ted Husted, Husted dot Com, Fairport NY USA. -- Java Web Development with Struts. -- Tel +1 585 737-3463. -- Web http://www.husted.com/struts/ Press, Michael wrote: I want to have multiple workflows, with users mapped to a particular workflow based on their role. I know that Struts doesn't support this now. Is there an intent to support this in the future? In the meantime, I'm interested in suggestions on the best way to implement this. Right now, I've done this: 1) I've created multiple ActionServlets, each of which reads it's own struts-config file. Each pair is the workflow for one role. 2) I've got a RoleDispatcherServlet that intercepts all Struts URLs, converts the URL to call the appropriate ActionServlet for the user's role, and forwards to that URL. Any additional suggestions or alternative methods are appreciated. Michael -- 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]
Re: multiple struts-config.xml
See the mail archive: http://www.mail-archive.com/struts-user@jakarta.apache.org/msg13197.html it's in the middle of the message. Original Message Follows From: Mike Dewhirst [EMAIL PROTECTED] Reply-To: [EMAIL PROTECTED] To: '[EMAIL PROTECTED]' [EMAIL PROTECTED] Subject: multiple struts-config.xml Date: Thu, 16 Aug 2001 13:27:45 +0100 is it possible to have struts-config split over several files? and use some xml include directive? =** If you are not the intended recipient, employee or agent responsible for delivering the message to the intended recipient, you are hereby notified that any dissemination or copying of this communication and its attachments is strictly prohibited. If you have received this communication and its attachments in error, please return the original message and attachments to the sender using the reply facility on e-mail. Internet communications are not secure and therefore the UCLES Group does not accept legal responsibility for the contents of this message. Any views or opinions presented are solely those of the author and do not necessarily represent those of the UCLES Group unless otherwise specifically stated. This footnote also confirms that this email message has been swept by MIMEsweeper for the presence of computer viruses although this does not guarantee that this email is virus free. **= _ Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp
RE: Multiple Struts-config files
Thanks D -Original Message- From: Ted Husted [mailto:[EMAIL PROTECTED]] Sent: Monday, July 02, 2001 12:11 PM To: [EMAIL PROTECTED] Subject: Re: Multiple Struts-config files People are working on that, but it hasn't made it into a build let. For more see, http://www.mail-archive.com/struts-user@jakarta.apache.org/msg10052.html -- Ted Husted, Husted dot Com, Fairport NY USA. -- Custom Software ~ Technical Services. -- Tel 716 737-3463. -- http://www.husted.com/about/struts/ DHarty wrote: My struts-config file is beginning to get a bit unwieldy. Is it possible to call multiple *-config files from web.xml? ex: init-param param-nameconfig/param-name param-value/WEB-INF/meaningfulName1-config.xml/param-value /init-param init-param param-nameconfig/param-name param-value/WEB-INF/meaningfulName2-config.xml/param-value /init-param or will config be overwritten each time? D