Re: Problems with modules
Hi, Make the following changes in ur web.xml to ur specific configuration file servlet servlet-nameaction/servlet-name servlet-classorg.apache.struts.action.ActionServlet/servlet-class init-param param-nameapplication/param-name param-valuefr.improve.struts.webapp.layout.example.ApplicationResources/param-value /init-param init-param param-nameconfig/param-name param-value/WEB-INF/struts-config.xml/param-value /init-param Thanks Regards, Aman Sheriff --- MoTech Software Pvt. Ltd. 56, Mogra Village Lane, Andheri East Mumbai - 400 069 ph : 91 -22 - 821 4541 x 1412 fax : 91 -22 - 820 8757 --- - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Problems with modules
Aman, Thanks for your reply, However I cant see what you are suggesting here? Can you describe what you are meaning? - btw I dont use the application param because as far as im aware it is deprecated in favour of the message-resources element. The crux of my problem is that my index.jsp (Welcome file) cant seem to resolve any of my module's global-forwards. However if I type a direct url to http://host/app/module/logon.do the module works fine. Regards Lawrence -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: 05 December 2003 10:51 To: Struts Users Mailing List Subject: Re: Problems with modules Hi, Make the following changes in ur web.xml to ur specific configuration file servlet servlet-nameaction/servlet-name servlet-classorg.apache.struts.action.ActionServlet/servlet-class init-param param-nameapplication/param-name param-valuefr.improve.struts.webapp.layout.example.ApplicationResources/param-value /init-param init-param param-nameconfig/param-name param-value/WEB-INF/struts-config.xml/param-value /init-param Thanks Regards, Aman Sheriff --- MoTech Software Pvt. Ltd. 56, Mogra Village Lane, Andheri East Mumbai - 400 069 ph : 91 -22 - 821 4541 x 1412 fax : 91 -22 - 820 8757 --- - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --- Incoming mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.547 / Virus Database: 340 - Release Date: 02/12/2003 --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.547 / Virus Database: 340 - Release Date: 02/12/2003 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Problems with modules
On Fri, 5 Dec 2003, Lawrence Williams wrote: Aman, Thanks for your reply, However I cant see what you are suggesting here? Can you describe what you are meaning? - btw I dont use the application param because as far as im aware it is deprecated in favour of the message-resources element. The crux of my problem is that my index.jsp (Welcome file) cant seem to resolve any of my module's global-forwards. However if I type a direct url to http://host/app/module/logon.do the module works fine. That's correct. The container is serving up your index.jsp based on the uri from the web.xml (*.do), so anything under /yourapp (or whatever your context is) will be used by the container. Bascially what that means is that Struts hasn't come into the picture yet. Unless you specifically swith to a different module (which requires a GET or POST to something that goes through the ActionServlet (*.do in your case), then the default configuration is used. There is a simple module-switching example that I put together and is available here: http://sourceforge.net/projects/struts - go down to simple, and look for Module Switching Examples Regards Lawrence -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: 05 December 2003 10:51 To: Struts Users Mailing List Subject: Re: Problems with modules Hi, Make the following changes in ur web.xml to ur specific configuration file servlet servlet-nameaction/servlet-name servlet-classorg.apache.struts.action.ActionServlet/servlet-class init-param param-nameapplication/param-name param-valuefr.improve.struts.webapp.layout.example.ApplicationResources/param-value /init-param init-param param-nameconfig/param-name param-value/WEB-INF/struts-config.xml/param-value /init-param Thanks Regards, Aman Sheriff --- MoTech Software Pvt. Ltd. 56, Mogra Village Lane, Andheri East Mumbai - 400 069 ph : 91 -22 - 821 4541 x 1412 fax : 91 -22 - 820 8757 --- - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --- Incoming mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.547 / Virus Database: 340 - Release Date: 02/12/2003 --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.547 / Virus Database: 340 - Release Date: 02/12/2003 - 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: Problems with modules
Hi, I have the same situation, and it only changes the default configuration to module specific one if the request is to an action wich is declared inside the struts-module-config.xml. So, i think you must have an index.jsp page in the default module that calls some action in the admin module (/admin/*.do). /index.jsp shall be: jsp:forward page=/admin/logon.do / and 'logon' shall be declared in struts-admin-config.xml as follows: action path=/logon type=your.package.LogonAction forward name=success path=logon.jsp / /action no changes in your web.xml I hope it helps and works!! Henrique Viecili - Original Message - From: Lawrence Williams [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Friday, December 05, 2003 7:38 AM Subject: Problems with modules Hi, In my web.xml I have defined a default and named module as follows: init-param param-nameconfig/param-name param-value/WEB-INF/struts-config.xml/param-value /init-param init-param param-nameconfig/admin/param-name param-value/WEB-INF/struts-config-admin.xml/param-value /init-param And welcome-file-list welcome-fileindex.jsp/welcome-file /welcome-file-list Where index.jsp is simply: %@ taglib uri=/tags/struts-logic prefix=logic % logic:forward name=logon/ However, it seems that when I request the absolute URL: http://localhost/myApp/admin/ (i.e. index.jsp) Struts seems to look in my default struts-config.xml rather than in the module specific struts-config-admin.xml i.e. I get javax.servlet.jsp.JspException: Cannot find global ActionForward for name logon The global-forward global-forwards forward name=logon path=/Logon.do/ Is defined in struts-config-admin.xml I can tell struts is looking in the wrong place because if a make a forward in thew default config struts resolves the forward Any suggestions? TIA Lawrence --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.547 / Virus Database: 340 - Release Date: 02/12/2003 - 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]