Re: question about modules
Thanks a lot Matt! That where a lot of impulses to work on. Have a nice day, Reinhard - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: question about modules
I am having difficulty with multiple modules also, but I do have answers to some of your questions. - Is it possible, to do a transparent fallback for messages, tiles and/or images, common to all modules ? For images I actually wrote my own custom tag, which is ugly but I didn't want images to grind my app to a hault. For tiles, you can just define your tiles once in the default module's struts-config file and the definitions will carry everywhere since they are loaded when the ActionServlet first starts up. I think you could probably subclass PropertyMessageResources and do some type of inheritance of resource bundles using the set-property element in XML, but this is rather complicated if you're just getting started with Struts. I might implement this sometime in the future, but for now I have more pressing concerns. If I do implement this, struts-config would look something like below. It might be the factory attribute rather than the className attribute that needs to be overwritten, but I'm not sure. message-resources null=false parameter=Module1Resources className=some.package.here.InheritedPropertyMessageResources set-property property=parentResources value=ApplicationResources/ /message-resources - how about global forwards? Do they get merged (and for so each entry has to be unique respect to the application), or are they local information to that module? They are local to each module. Matt - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Question About Modules
We used FOP to generate dynamic pdf through the action. The action itself returned null. Vikram - Original Message - From: Madel,Kurt [EMAIL PROTECTED] To: 'Struts Users Mailing List' [EMAIL PROTECTED] Sent: Thursday, November 21, 2002 5:46 AM Subject: RE: Question About Modules Anyone using modules and going through an action to generate dynamic database driven pdf's??? Anyone . Kurt Madel Programmer, CSMi (703) 823-4300 ext. 170 -Original Message- From: Madel,Kurt [mailto:[EMAIL PROTECTED]] Sent: Wednesday, November 20, 2002 11:27 AM To: 'Struts Users Mailing List' Subject: Question About Modules My understanding is that you have to use an extension mapping in order to use the Module functionality, i.e. '*.do' What are people doing if they need to serve say a '.pdf' from an action? That is, my pdf is dynamic and requires the use of the same DAO's that I use for my jsp pages. Sure you can set the mime type, but Internet Explorer ignores these most of the time and counts on the extension. If you map *.pdf and *.do then you won't be able to server static pdf's??? Kurt Madel Programmer, CSMi (703) 823-4300 ext. 170 -- 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] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Question About Modules
You generate the PDF using FOP and attach to the request or session the forward to a JSP or Servlet that will serve the contect with the correct type etc. -Original Message- From: Vikram Goyal [mailto:[EMAIL PROTECTED]] Sent: 21 November, 2002 14:01 To: Struts Users Mailing List Subject: Re: Question About Modules We used FOP to generate dynamic pdf through the action. The action itself returned null. Vikram - Original Message - From: Madel,Kurt [EMAIL PROTECTED] To: 'Struts Users Mailing List' [EMAIL PROTECTED] Sent: Thursday, November 21, 2002 5:46 AM Subject: RE: Question About Modules Anyone using modules and going through an action to generate dynamic database driven pdf's??? Anyone . Kurt Madel Programmer, CSMi (703) 823-4300 ext. 170 -Original Message- From: Madel,Kurt [mailto:[EMAIL PROTECTED]] Sent: Wednesday, November 20, 2002 11:27 AM To: 'Struts Users Mailing List' Subject: Question About Modules My understanding is that you have to use an extension mapping in order to use the Module functionality, i.e. '*.do' What are people doing if they need to serve say a '.pdf' from an action? That is, my pdf is dynamic and requires the use of the same DAO's that I use for my jsp pages. Sure you can set the mime type, but Internet Explorer ignores these most of the time and counts on the extension. If you map *.pdf and *.do then you won't be able to server static pdf's??? Kurt Madel Programmer, CSMi (703) 823-4300 ext. 170 -- 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] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] __ Disclaimer and confidentiality note Everything in this e-mail and any attachments relating to the official business of Standard Bank Group Limited is proprietary to the company. It is confidential, legally privileged and protected by law. Standard Bank does not own and endorse any other content. Views and opinions are those of the sender unless clearly stated as being that of Standard Bank. The person addressed in the e-mail is the sole authorised recipient. Please notify the sender immediately if it has unintentionally reached you and do not read, disclose or use the content in any way. Standard Bank can not assure that the integrity of this communication has been maintained nor that it is free of errors, virus, interception or interference. __ -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Question About Modules
Anyone using modules and going through an action to generate dynamic database driven pdf's??? Anyone . Kurt Madel Programmer, CSMi (703) 823-4300 ext. 170 -Original Message- From: Madel,Kurt [mailto:[EMAIL PROTECTED]] Sent: Wednesday, November 20, 2002 11:27 AM To: 'Struts Users Mailing List' Subject: Question About Modules My understanding is that you have to use an extension mapping in order to use the Module functionality, i.e. '*.do' What are people doing if they need to serve say a '.pdf' from an action? That is, my pdf is dynamic and requires the use of the same DAO's that I use for my jsp pages. Sure you can set the mime type, but Internet Explorer ignores these most of the time and counts on the extension. If you map *.pdf and *.do then you won't be able to server static pdf's??? Kurt Madel Programmer, CSMi (703) 823-4300 ext. 170 -- 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: Question About Modules
The issue is not related to modules. There have been several solutions for this posted at various times in the past. Each of them should still work. Modules really don't play a part - you've simply got to inform the browser of what it's going to receive in such a way that it understands the proper file-name and content-type. I haven't had need to do this, so I can't rattle off a solution for you - sorry. Try to see if you can get any good information by doing a google search. Then, try hitting the archive on the off-chance you can glean something from there directly. If you have no luck, try back here with a more appropriate subject - something like Dynamically serve PDF to client or some such. I'd wager that if you searched for different variations on that theme using google, you'd have your answer - but I have been wrong before! If you don't initially get struts-related results, throw Struts into your query - you should. Madel,Kurt wrote: Anyone using modules and going through an action to generate dynamic database driven pdf's??? Anyone . Kurt Madel Programmer, CSMi (703) 823-4300 ext. 170 -Original Message- From: Madel,Kurt [mailto:[EMAIL PROTECTED]] Sent: Wednesday, November 20, 2002 11:27 AM To: 'Struts Users Mailing List' Subject: Question About Modules My understanding is that you have to use an extension mapping in order to use the Module functionality, i.e. '*.do' What are people doing if they need to serve say a '.pdf' from an action? That is, my pdf is dynamic and requires the use of the same DAO's that I use for my jsp pages. Sure you can set the mime type, but Internet Explorer ignores these most of the time and counts on the extension. If you map *.pdf and *.do then you won't be able to server static pdf's??? Kurt Madel Programmer, CSMi (703) 823-4300 ext. 170 -- Eddie Bush -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Question About Modules
Hi, A Dimecres 20 Novembre 2002 17:26, Madel,Kurt va escriure: My understanding is that you have to use an extension mapping in order to use the Module functionality, i.e. '*.do' What are people doing if they need to serve say a '.pdf' from an action? That is, my pdf is dynamic and requires the use of the same DAO's that I use for my jsp pages. Sure you can set the mime type, but Internet Explorer ignores these most of the time and counts on the extension. If you map *.pdf and *.do then you won't be able to server static pdf's??? Kurt Madel Programmer, CSMi (703) 823-4300 ext. 170 You can suggest a file name to the browser setting the Content-Disposition header (RFC 2183) String fileName = theFile.pdf response.setContentType(application/pdf); response.setHeader(Content-Dispostion, inline; filename= + fileName); Salut! -- Antoni Reus -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Question About Modules
Yes, I am in the middle of an extensive PDF output project. I have started to create dynamic names and forwarding to them and put them on a delete list in order to give them pdf names so IE would know how to handle them. I hadn't got to the file handling part yet so your post is timely. I hadn't thought of mapping pdf's as actions and I love the idea. On your question regarding static PDF's I believe the answer to your question is that they would have to be mapped through struts-config as forwards and you would need a single action class to forward to the actual pdf. My first thought is action path=/static type=actions.PDFForward !-- you would have to write this simple action -- name=PDFDynaForm !-- you would need some simple Form as a ref -- validate=false forward name=pdf path=/PDF/static.pdf / /action Since I have no static pdf's I am going to steal your idea. Thanks Edgar -Original Message- From: Madel,Kurt [mailto:[EMAIL PROTECTED]] Sent: Wednesday, November 20, 2002 2:46 PM To: 'Struts Users Mailing List' Subject: RE: Question About Modules Anyone using modules and going through an action to generate dynamic database driven pdf's??? Anyone . Kurt Madel Programmer, CSMi (703) 823-4300 ext. 170 -Original Message- From: Madel,Kurt [mailto:[EMAIL PROTECTED]] Sent: Wednesday, November 20, 2002 11:27 AM To: 'Struts Users Mailing List' Subject: Question About Modules My understanding is that you have to use an extension mapping in order to use the Module functionality, i.e. '*.do' What are people doing if they need to serve say a '.pdf' from an action? That is, my pdf is dynamic and requires the use of the same DAO's that I use for my jsp pages. Sure you can set the mime type, but Internet Explorer ignores these most of the time and counts on the extension. If you map *.pdf and *.do then you won't be able to server static pdf's??? Kurt Madel Programmer, CSMi (703) 823-4300 ext. 170 -- 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] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Question About Modules
I suppose for static pdf you could use Struts 1.1 action forward class and just set the parameter to be the actual pdf: action path=/action.pdf parameter=/pdfs/static_pdf.pdf type=org.apache.struts.actions.ForwardAction scope=request validate=false /action I haven't tried it yet, but it should work ... Thanks for the idea ;-) Kurt Madel Programmer, CSMi (703) 823-4300 ext. 170 -Original Message- From: edgar [mailto:[EMAIL PROTECTED]] Sent: Wednesday, November 20, 2002 3:27 PM To: 'Struts Users Mailing List' Subject: RE: Question About Modules Yes, I am in the middle of an extensive PDF output project. I have started to create dynamic names and forwarding to them and put them on a delete list in order to give them pdf names so IE would know how to handle them. I hadn't got to the file handling part yet so your post is timely. I hadn't thought of mapping pdf's as actions and I love the idea. On your question regarding static PDF's I believe the answer to your question is that they would have to be mapped through struts-config as forwards and you would need a single action class to forward to the actual pdf. My first thought is action path=/static type=actions.PDFForward !-- you would have to write this simple action -- name=PDFDynaForm !-- you would need some simple Form as a ref -- validate=false forward name=pdf path=/PDF/static.pdf / /action Since I have no static pdf's I am going to steal your idea. Thanks Edgar -Original Message- From: Madel,Kurt [mailto:[EMAIL PROTECTED]] Sent: Wednesday, November 20, 2002 2:46 PM To: 'Struts Users Mailing List' Subject: RE: Question About Modules Anyone using modules and going through an action to generate dynamic database driven pdf's??? Anyone . Kurt Madel Programmer, CSMi (703) 823-4300 ext. 170 -Original Message- From: Madel,Kurt [mailto:[EMAIL PROTECTED]] Sent: Wednesday, November 20, 2002 11:27 AM To: 'Struts Users Mailing List' Subject: Question About Modules My understanding is that you have to use an extension mapping in order to use the Module functionality, i.e. '*.do' What are people doing if they need to serve say a '.pdf' from an action? That is, my pdf is dynamic and requires the use of the same DAO's that I use for my jsp pages. Sure you can set the mime type, but Internet Explorer ignores these most of the time and counts on the extension. If you map *.pdf and *.do then you won't be able to server static pdf's??? Kurt Madel Programmer, CSMi (703) 823-4300 ext. 170 -- 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] -- 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: Question about modules
Emmanuel Boudrant wrote: Hi, Does the Struts modules work on Struts 1.1b2 ? The problem is I've got a form : There were a few issues with the way modules worked in the beta 2 release. Grab a nightly and see if your problems persist. html:form action=/verifyUser ... /html:form The /verifyUser action and the verifyUser formbean are defined in a module named admin (struts-config-admin.xml). The JSP Form is in the folder /admin/form/verifyUser.jsp And I've got the message Cannot retrieve mapping for action /verifyUser. I try with html:form action=/admin/verifyUser ... /html:form and same message. So how does Struts locate the good module to lookup the requested mapping ? It looks at the URI. You can examine RequestProcessor.selectApplication for source. Basically, it tries to match the first piece of the URI with one of the known prefixes. At some point past beta 2, this was done using a startsWith criteria (path startsWith( prefix[i] )) and was causing unintended module-changing - and other problems. Now it looks for an exact match and should work a bit better. -emmanuel -- Eddie Bush -- To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org