Re: how to find struts version
hi thanks. it uses 1.1 version sincerely - Original Message - From: klute [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Wednesday, June 16, 2004 5:15 PM Subject: Re: how to find struts version if you have access to the struts.jar being migrated, find manifest.mf file there and open it. Look for Specification-Version and Implementation-Version values. Hope this helps, James ___ http://www.devbistro.com - web dev jobs --- Eyup TEKIN [EMAIL PROTECTED] wrote: hi there is a project developed with jbuilderX and struts i tried to migrate it from tomcat4.1.x to oracle9ias10g but i cant find struts version in the project. i downloaded struts1.1 and there are errors while tried to install tiles-documentation.war to oc4j.i used jdeveloper10G sincerely - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] __ Do you Yahoo!? Take Yahoo! Mail with you! Get it on your mobile phone. http://mobile.yahoo.com/maildemo - 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: [OT]Help needed in wring regular expression
try this [1-9]|[0-9]{1}[0-9]{1,3} add rest of your many, few etc HTH navjot [EMAIL PROTECTED] wrote: Chris: thank you for your help. yes, I need to accept any leading zeros but it should be followed by any non-zero integer in that case. ([1-9][0-9]{0,3})|([Ff][Ee][Ww])|([Mm][Aa][Nn][Yy]) is working fine but could not enter any leading zeros. thank you. -Ram -Original Message- From: Christopher Schultz [mailto:[EMAIL PROTECTED] Sent: Wednesday, June 16, 2004 7:25 AM To: Struts Users Mailing List Subject: Re: [OT]Help needed in wring regular expression Ram, Initially we had to use (\d{1,4})|(FEW)|(few)|(MANY)|(many) and eventually we found that it is accepting 0(zero) when we enter a integer value as 0(zero) or which is invalid. anybody have any idea about how to achieve the above using regular expression. I tried finding any document to refer but I could not find one for the above scenario. So, do you allow any leading zeros? Ever? How about this: ([1-9][0-9]{0,3})|([Ff][Ee][Ww])|([Mm][Aa][Nn][Yy]) -chris - 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: Struts alternative to using request.getParameterValues in an actionform?
:) -Original Message- From: Asif Rahman [mailto:[EMAIL PROTECTED] Sent: Wednesday, June 16, 2004 10:44 PM To: Struts Users Mailing List; Asif Rahman Subject: Re: Struts alternative to using request.getParameterValues in an actionform? Importance: High Satish, it does not seem to work in the actionform. The properties are not getting set for the individual site objects using the nested tags. I have a setSitesList(arraylistOfSiteTransferObjects). What am I missing? Thanks. -Asif - Original Message - From: Asif Rahman [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED]; Asif Rahman [EMAIL PROTECTED] Sent: Wednesday, June 16, 2004 10:21 AM Subject: Re: Struts alternative to using request.getParameterValues in an actionform? *blush* sorry, forgot the taglib directive. -Asif - Original Message - From: Asif Rahman [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Wednesday, June 16, 2004 9:50 AM Subject: Re: Struts alternative to using request.getParameterValues in an actionform? I tried this, it should work theoretically, but my form is empty now, none of the textfields are showing up. I do have a property called sitesList in the OpporutnitySitesForm and it is already populated when I arrive at this page. Please advise. Thanks. -Asif - Original Message - From: Satish Kataria [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED]; Asif Rahman [EMAIL PROTECTED] Sent: Wednesday, June 16, 2004 8:35 AM Subject: RE: Struts alternative to using request.getParameterValues in an actionform? You can use nested tags to automatically retrive and populate information. A snippet of code is as follows nested:root name=OpportunitySitesForm nested:nest property=sitesList logic:iterate id=myCollectionElement name=OpportunitySitesForm property=sitesList nested:text name=myCollectionElement property=siteName/ /logic:iterate /nested:nest property=sitesList /nested:root name=OpportunitySitesForm It assumes you have a attribute named sitesList in ur action form This way you can access any type of attribute from ur action form -Original Message- From: Asif Rahman [mailto:[EMAIL PROTECTED] Sent: Wednesday, June 16, 2004 2:31 AM To: [EMAIL PROTECTED] Subject: Struts alternative to using request.getParameterValues in an actionform? Importance: High Hi Im using logic:iterate shown below to iterate through an arraylist (sitesList) in my actionform (OpportunitySitesForm). This arraylist contains a number of Site objects which have the properties siteName, address1, and city. This is getting displayed correctly. Now when processing the form, I am wondering whether in struts there is a way to retrieve these as objects and automatically populate setSitesList(ArrayList) method, rather than manually use request.getParameterValues for siteName, address1, city, create individual Site objects, add the site objects to an arraylist with Site objects and finally pass the list into setSitesList(arraylist). logic:iterate id=myCollectionElement name=OpportunitySitesForm property=sitesList tr td colspan=2input type=text name=siteName value='bean:write name=myCollectionElement property=siteName /'/td td colspan=2input type=text name=address1 value='bean:write name=myCollectionElement property=address1 /'/td td colspan=2input type=text name=city value='bean:write name=myCollectionElement property=city /'/td tr /logic:iterate Any help would be most appreciated. Thanks! -Asif - 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] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
:)
Disclaimer: This message and any attachment(s) contained here are information that is confidential, proprietary to HCL Technologies and its customers. Contents may be privileged or otherwise protected by law. The information is solely intended for the individual or the entity it is addressed to. If you are not the intended recipient of this message, you are not authorized to read, forward, print, retain, copy or disseminate this message or any part of it. If you have received this e-mail in error, please notify the sender immediately by return e-mail and delete it from your computer. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: :)
What is this Biswajit Basak Tata Consultancy Services Plot B-1, Block EP GP Sector - V, Salt Lake Electronics Complex Kolkata - 700 091,West Bengal India Mailto: [EMAIL PROTECTED] Website: http://www.tcs.com Kchitij Kumar, Gurgaon [EMAIL PROTECTED] 06/17/2004 12:55 PM Please respond to Struts Users Mailing List [EMAIL PROTECTED] To [EMAIL PROTECTED] cc Subject :) Disclaimer: This message and any attachment(s) contained here are information that is confidential, proprietary to HCL Technologies and its customers. Contents may be privileged or otherwise protected by law. The information is solely intended for the individual or the entity it is addressed to. If you are not the intended recipient of this message, you are not authorized to read, forward, print, retain, copy or disseminate this message or any part of it. If you have received this e-mail in error, please notify the sender immediately by return e-mail and delete it from your computer. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] ForwardSourceID:NT9CCA DISCLAIMER: The information contained in this message is intended only and solely for the addressed individual or entity indicated in this message and for the exclusive use of the said addressed individual or entity indicated in this message (or responsible for delivery of the message to such person) and may contain legally privileged and confidential information belonging to Tata Consultancy Services. It must not be printed, read, copied, disclosed, forwarded, distributed or used (in whatsoever manner) by any person other than the addressee. Unauthorized use, disclosure or copying is strictly prohibited and may constitute unlawful act and can possibly attract legal action, civil and/or criminal. The contents of this message need not necessarily reflect or endorse the views of Tata Consultancy Services on any subject matter. Any action taken or omitted to be taken based on this message is entirely at your risk and neither the originator of this message nor Tata Consultancy Services takes any responsibility or liability towards the same. Opinions, conclusions and any other information contained in this message that do not relate to the official business of Tata Consultancy Services shall be understood as neither given nor endorsed by Tata Consultancy Services or any affiliate of Tata Consultancy Services. If you have received this message in error, you should destroy this message and may please notify the sender by e-mail. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Diff. b/w html:image and html:img
hello guys, can any one tell me what is the diff. b/w html:image and html:img Asim - ALL-NEW Yahoo! Messenger - so many all-new ways to express yourself
RE: Setting locale for the webapp
You could override processLocale() in the RequestProcessor to set the locale to whatever you configured -Original Message- From: Tim Penhey [mailto:[EMAIL PROTECTED] Sent: Thursday, 17 June 2004 15:51 To: Struts-User Subject: Setting locale for the webapp I have a web application where I want to have the locale defined in the deployment descriptor somewhere. The web application acts as the GUI for a system that will be sold to clients. The clients will then have their own tomcat / DB instance running. I am using the struts I18N to allow multiple language versions of the software, but I would like to define the locale for the installation rather than by the users browser languages. Any clues on how to do this? Thanks, Tim - 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: :)
Very Important Files Under Sieze(VIRUS). Brati Sankar Ghosh Tata Consultancy Services Mailto: [EMAIL PROTECTED] Website: http://www.tcs.com [EMAIL PROTECTED] 06/17/2004 12:58 PM Please respond to Struts Users Mailing List [EMAIL PROTECTED] To Struts Users Mailing List [EMAIL PROTECTED] cc Subject Re: :) What is this Biswajit Basak Tata Consultancy Services Plot B-1, Block EP GP Sector - V, Salt Lake Electronics Complex Kolkata - 700 091,West Bengal India Mailto: [EMAIL PROTECTED] Website: http://www.tcs.com Kchitij Kumar, Gurgaon [EMAIL PROTECTED] 06/17/2004 12:55 PM Please respond to Struts Users Mailing List [EMAIL PROTECTED] To [EMAIL PROTECTED] cc Subject :) Disclaimer: This message and any attachment(s) contained here are information that is confidential, proprietary to HCL Technologies and its customers. Contents may be privileged or otherwise protected by law. The information is solely intended for the individual or the entity it is addressed to. If you are not the intended recipient of this message, you are not authorized to read, forward, print, retain, copy or disseminate this message or any part of it. If you have received this e-mail in error, please notify the sender immediately by return e-mail and delete it from your computer. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] ForwardSourceID:NT9CCA - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] ForwardSourceID:NTC4FE DISCLAIMER: The information contained in this message is intended only and solely for the addressed individual or entity indicated in this message and for the exclusive use of the said addressed individual or entity indicated in this message (or responsible for delivery of the message to such person) and may contain legally privileged and confidential information belonging to Tata Consultancy Services. It must not be printed, read, copied, disclosed, forwarded, distributed or used (in whatsoever manner) by any person other than the addressee. Unauthorized use, disclosure or copying is strictly prohibited and may constitute unlawful act and can possibly attract legal action, civil and/or criminal. The contents of this message need not necessarily reflect or endorse the views of Tata Consultancy Services on any subject matter. Any action taken or omitted to be taken based on this message is entirely at your risk and neither the originator of this message nor Tata Consultancy Services takes any responsibility or liability towards the same. Opinions, conclusions and any other information contained in this message that do not relate to the official business of Tata Consultancy Services shall be understood as neither given nor endorsed by Tata Consultancy Services or any affiliate of Tata Consultancy Services. If you have received this message in error, you should destroy this message and may please notify the sender by e-mail. Thank you. DISCLAIMER: The information contained in this message is intended only and solely for the addressed individual or entity indicated in this message and for the exclusive use of the said addressed individual or entity indicated in this message (or responsible for delivery of the message to such person) and may contain legally privileged and confidential information belonging to Tata Consultancy Services. It must not be printed, read, copied, disclosed, forwarded, distributed or used (in whatsoever manner) by any person other than the addressee. Unauthorized use, disclosure or copying is strictly prohibited and may constitute unlawful act and can possibly attract legal action, civil and/or criminal. The contents of this message need not necessarily reflect or endorse the views of Tata Consultancy Services on any subject matter. Any action taken or omitted to be taken based on this message is entirely at your risk and neither the originator of this message nor Tata Consultancy Services takes any responsibility or liability towards the same. Opinions, conclusions and any other information contained in this message that do not relate to the official business of Tata Consultancy Services shall be understood as neither given nor endorsed by Tata Consultancy Services or any affiliate of Tata Consultancy Services. If you have received this message in error, you should destroy this message and may please notify the sender by e-mail. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Diff. b/w html:image and html:img
The difference is that html:image renders an INPUT tag of type image, whereas html:img renders an img tag. -Original Message- From: Asim Ghosh [mailto:[EMAIL PROTECTED] Sent: 17 June 2004 08:57 To: [EMAIL PROTECTED] Subject: Diff. b/w html:image and html:img hello guys, can any one tell me what is the diff. b/w html:image and html:img Asim - ALL-NEW Yahoo! Messenger - so many all-new ways to express yourself For more information about Barclays Capital, please visit our web site at http://www.barcap.com. Internet communications are not secure and therefore the Barclays Group does not accept legal responsibility for the contents of this message. Although the Barclays Group operates anti-virus programmes, it does not accept responsibility for any damage whatsoever that is caused by viruses being passed. Any views or opinions presented are solely those of the author and do not necessarily represent those of the Barclays Group. Replies to this email may be monitored by the Barclays Group for operational or business reasons. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
PLEASE IGNORE
I am sorry about this mail. I was intending to send it to some one else. Sorry Again. Brati Sankar Ghosh Tata Consultancy Services Mailto: [EMAIL PROTECTED] Website: http://www.tcs.com [EMAIL PROTECTED] 06/17/2004 01:35 PM Please respond to Struts Users Mailing List [EMAIL PROTECTED] To Struts Users Mailing List [EMAIL PROTECTED] cc Subject Re: :) Very Important Files Under Sieze(VIRUS). Brati Sankar Ghosh Tata Consultancy Services Mailto: [EMAIL PROTECTED] Website: http://www.tcs.com [EMAIL PROTECTED] 06/17/2004 12:58 PM Please respond to Struts Users Mailing List [EMAIL PROTECTED] To Struts Users Mailing List [EMAIL PROTECTED] cc Subject Re: :) What is this Biswajit Basak Tata Consultancy Services Plot B-1, Block EP GP Sector - V, Salt Lake Electronics Complex Kolkata - 700 091,West Bengal India Mailto: [EMAIL PROTECTED] Website: http://www.tcs.com Kchitij Kumar, Gurgaon [EMAIL PROTECTED] 06/17/2004 12:55 PM Please respond to Struts Users Mailing List [EMAIL PROTECTED] To [EMAIL PROTECTED] cc Subject :) Disclaimer: This message and any attachment(s) contained here are information that is confidential, proprietary to HCL Technologies and its customers. Contents may be privileged or otherwise protected by law. The information is solely intended for the individual or the entity it is addressed to. If you are not the intended recipient of this message, you are not authorized to read, forward, print, retain, copy or disseminate this message or any part of it. If you have received this e-mail in error, please notify the sender immediately by return e-mail and delete it from your computer. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] ForwardSourceID:NT9CCA - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] ForwardSourceID:NTC4FE - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] ForwardSourceID:NTC52E DISCLAIMER: The information contained in this message is intended only and solely for the addressed individual or entity indicated in this message and for the exclusive use of the said addressed individual or entity indicated in this message (or responsible for delivery of the message to such person) and may contain legally privileged and confidential information belonging to Tata Consultancy Services. It must not be printed, read, copied, disclosed, forwarded, distributed or used (in whatsoever manner) by any person other than the addressee. Unauthorized use, disclosure or copying is strictly prohibited and may constitute unlawful act and can possibly attract legal action, civil and/or criminal. The contents of this message need not necessarily reflect or endorse the views of Tata Consultancy Services on any subject matter. Any action taken or omitted to be taken based on this message is entirely at your risk and neither the originator of this message nor Tata Consultancy Services takes any responsibility or liability towards the same. Opinions, conclusions and any other information contained in this message that do not relate to the official business of Tata Consultancy Services shall be understood as neither given nor endorsed by Tata Consultancy Services or any affiliate of Tata Consultancy Services. If you have received this message in error, you should destroy this message and may please notify the sender by e-mail. Thank you. DISCLAIMER: The information contained in this message is intended only and solely for the addressed individual or entity indicated in this message and for the exclusive use of the said addressed individual or entity indicated in this message (or responsible for delivery of the message to such person) and may contain legally privileged and confidential information belonging to Tata Consultancy Services. It must not be printed, read, copied, disclosed, forwarded, distributed or used (in whatsoever manner) by any person other than the addressee. Unauthorized use, disclosure or copying is strictly prohibited and may constitute unlawful act and can possibly attract legal action, civil and/or criminal. The contents of this message need not necessarily reflect or endorse the views of Tata Consultancy Services on any subject matter. Any action taken or omitted to be taken based on this message is entirely at your risk and neither the originator of this message nor Tata Consultancy Services takes any responsibility or liability towards the same. Opinions, conclusions and any other
RE: Diff. b/w html:image and html:img
html:img produces img src=.../ type tags whereas html:image produces input type=image src=.../ type tags. -Original Message- From: Asim Ghosh [mailto:[EMAIL PROTECTED] Sent: 17 June 2004 08:57 To: [EMAIL PROTECTED] Subject: Diff. b/w html:image and html:img hello guys, can any one tell me what is the diff. b/w html:image and html:img Asim - ALL-NEW Yahoo! Messenger - so many all-new ways to express yourself - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Using a servlet code within Struts
Although this is possible, as other posters have said, I'd ask what you are going to achieve by doing this? The servlet you already have will quite happily work alongside the Struts servlet without any problems. If you've got existing servlets you want to migrate to Struts model 2 then I'd do roughly the following: 1) In your servlet identify the objects/properties that are used inside your out.write() statements. 2) Create a struts action based on your servlet code, replacing the out.writes()s with setting request scope attributes with the relevant objects and properties 3) Create a jsp (based on the html output from the original servlet) which used the request scope attributes for the dynamic content. Paul -Original Message- From: Ricardo Andres Quintero [mailto:[EMAIL PROTECTED] Sent: 16 June 2004 17:28 To: [EMAIL PROTECTED] Subject: Using a servlet code within Struts Hello everyone I want to make some servlet code to work in Struts. i dont want to make the servlet to work. i want to rewrite the code into Struts. The servlet uses out = response.getOutputStream() and then out.write(); I know Struts uses the model 2, so that the view is a jsp. Im thinking of using and action, where i use the response object, and i would do it like i do in the servlet. However, i dont know how to use the ActionForward, because i would render the output, based in the servlet. i mean no JSP. How would u solve this problem? -- Ricardo Andrés Quintero R. Ubiquando Ltda. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] ** Axios Email Confidentiality Footer Privileged/Confidential Information may be contained in this message. If you are not the addressee indicated in this message (or responsible for delivery of the message to such person), you may not copy or deliver this message to anyone. In such case, you should destroy this message, and notify us immediately. If you or your employer does not consent to Internet email messages of this kind, please advise us immediately. Opinions, conclusions and other information expressed in this message are not given or endorsed by my Company or employer unless otherwise indicated by an authorised representative independent of this message. WARNING: While Axios Systems Ltd takes steps to prevent computer viruses from being transmitted via electronic mail attachments we cannot guarantee that attachments do not contain computer virus code. You are therefore strongly advised to undertake anti virus checks prior to accessing the attachment to this electronic mail. Axios Systems Ltd grants no warranties regarding performance use or quality of any attachment and undertakes no liability for loss or damage howsoever caused. ** - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Integrating displaytag with struts
Hi all. i want to use displaytag for replace logis:iterate tag is it name in display:table tag have same function with property in logic:iterate ? if not, how can i set data that i want to display in my jsp ?
RE: Setting locale for the webapp
-Original Message- From: Tim Penhey [mailto:[EMAIL PROTECTED] Sent: 17 June 2004 08:51 To: Struts-User Subject: Setting locale for the webapp I have a web application where I want to have the locale defined in the deployment descriptor somewhere. The web application acts as the GUI for a system that will be sold to clients. The clients will then have their own tomcat / DB instance running. I am using the struts I18N to allow multiple language versions of the software, but I would like to define the locale for the installation rather than by the users browser languages. Any clues on how to do this? Thanks, Tim You may need to set the default locale explicitly. I got a feeling it will be in the web.xml as a ActionServlet init parameter. If not you can change the Struts Locale dynamically for a HttpSession. Therefore you could program a ServletFilter. http://www.anassina.com/struts/i18n/i18n.html -- Peter Pilgrim Operations/IT - Credit Suisse First Boston, 10 South Colonnade, London E14 4QJ, United Kingdom Tel: +44 (0)207 883 4447 == This message is for the sole use of the intended recipient. If you received this message in error please delete it and notify us. If this message was misdirected, CSFB does not waive any confidentiality or privilege. CSFB retains and monitors electronic communications sent through its network. Instructions transmitted over this system are not binding on CSFB until they are confirmed by us. Message transmission is not guaranteed to be secure. == - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Problems with 'properties' of html: tags.
Hi all, In a html:form i can't have any html: .. associated with any property named like X_ cause i get the error Error 500: No getter method for property X_ of bean org.apache.struts.taglib.html. . I have noticed that the names can be like _XXX or XX_XXX, this is, i can not have a name that begins with a single character followed by a low script. Then, my question : Are that names reserved or is it a bug?. I work with Websphere Studio Site Developer 5.1 and Struts 1.1 running on a Websphere Application Server Express 5.0. Thanks everyone. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Setting locale for the webapp
-Original Message- From: Pilgrim, Peter [mailto:[EMAIL PROTECTED] Sent: 17 June 2004 09:53 To: 'Struts Users Mailing List' Subject: RE: Setting locale for the webapp -Original Message- From: Tim Penhey [mailto:[EMAIL PROTECTED] Sent: 17 June 2004 08:51 To: Struts-User Subject: Setting locale for the webapp I have a web application where I want to have the locale defined in the deployment descriptor somewhere. The web application acts as the GUI for a system that will be sold to clients. The clients will then have their own tomcat / DB instance running. I am using the struts I18N to allow multiple language versions of the software, but I would like to define the locale for the installation rather than by the users browser languages. Any clues on how to do this? Thanks, Tim You may need to set the default locale explicitly. I got a feeling it will be in the web.xml as a ActionServlet init parameter. If not you can change the Struts Locale dynamically for a HttpSession. Therefore you could program a ServletFilter. http://www.anassina.com/struts/i18n/i18n.html Thanks Peter. That page looks quite interesting. I have been having some challenges with UTF-8 vs ISO 8859-1 and JDOM SAXBuilder recently, and I am most likely going to change all pages to UTF-8 to handle it. Tim - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: j2EE question
Hello, Yeah I suppose so J2EE is not only EJB/CMP.. Regards marco -Original Message- From: Richard Raquepo [mailto:[EMAIL PROTECTED] Sent: 17 June 2004 04:08 To: Struts Users Mailing List Subject: j2EE question Hi everyone, does using struts means your a j2ee programmer/developer? we have built our own OR library, used javamail, some threads, XML configurations,etc... what i know that is part of j2ee but we never actually used is EJB/CMP. and we only deploy our apps on Tomcat and/or Causho Resin... telling you all what i use/created... can i be considered a j2ee programmer? im quite lost... thanks. cheers, Richard - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[OT] Soccer portal released goal.com
Hello All, I know this is a lot off-topic, but I'm so proud of the portal I designed and developed that I'd like you all know that it has just been released a worldwide soccer portal named Goal.com (www.goal.com) and that now it's having a lot of news and live results and live netcasting on the european championship 2004. I aplogize for the invasion also becuase it's not developed in Struts, but with ASP.NET but as I said, it took me the last 6 month of work to develop the engine that drives that portal (and all its netwok: all main italian soccer teams). I use Struts in my spare time but in my real work I develop with .NET and C# (not my decision, of course)... but I prefer Struts. Simone - Simone Chiaretta http://www.piyosailing.com/S www.piyosailing.com/S Any sufficiently advanced technology is indistinguishable from magic Life is short, play hard
RE: Rendering Images
I was thinking that perhaps the problem of rendering an alternative image when the image is not found could be resolved with Xkins. You could create a ImageTemplateProcessor. This processor can receive the image name, verify if exists in the web server disk and if true, return the html image tag with the image, otherwise, return an alternative image: In the Xkins definition file, do as follows: xkins skin name=imageNotFound defaultSkin=true template name=image processor type=com.yourCompany.ImageTemplateProcessor/ content![CDATA[ img src=$bodyContent/ border='0' ]]/content /template /skin /xkins The ImageTemplateProcessor can be like this: package com.yourCompany; public class ImageTemplateProcessor extends VelocityTemplateProcessor { public static final String IMG_NOT_FOUND = /images/imgNotFound.gif; public void process(Template input, Context context, OutputStream os) throws XkinsException { //receives the bodyContent parameter with the image name String image = (String)context.getParameters().get(XkinProcessor.JSP_BODY); //check if the file exists (you should preppend the real path... It's not the purpouse of this snippet) String imageRealPath = this.getRealPath(image); //you should implement getRealPath method... if(!(new File(imageRealPath)).exists()) { //the file is not found in the server... //replaces the file name for the imageNotFound context.getParameters().put(XkinProcessor.JSP_BODY, IMG_NOT_FOUND); } //lets VelocityTemplateProcessor process the template, with the original image or //with the IMG_NOT_FOUND image if original does not exists. super.process(input, context, os); } } And finally, in the JSP, you should do as follows: %@ taglib uri=/WEB-INF/tld/xkins.tld prefix=xkins % xkins:template name=image/images/myImage.gif/xkins:template Using xkins:template name=image instead of img tag will use Xkins template to render the image. If /images/myImage.gif is not found, xkins:template tag will render with /images/imgNotFound.gif. Besides, you could orgaanize your images paths with Xkins Paths or add more parameters to the template (like sizes, etc). Cheers. Guillermo. -Original Message- From: Niall Pemberton [mailto:[EMAIL PROTECTED] Sent: Miércoles, 16 de Junio de 2004 11:34 p.m. To: Struts Users Mailing List Subject: Re: Rendering Images No! :-( This wouldn't be as simple as just adding an imageNotFound property and for it to work it wouldn't be desirable in this tag. The html:image.. tag doesn't know whether the image exists or not, all it does is render the input type=image src=. / markup with the src attribute pointing to the location of the image - its then the browser which actually downloads the image, based on the src specified. The good thing about this is that it can do caching, making pages load faster on subsequent visits. In order for the tag to know that the image didn't exist it would have to retrieve it from the location specified - that would happen every time the jsp was executed to create the page and the browser would still do the download as well. It would be better all round to use the solution proposed in this thread (using an Action to render an image) as with the right headers set in that action, caching could still occur. Niall - Original Message - From: CRANFORD, CHRIS [EMAIL PROTECTED] To: 'Struts Users Mailing List' [EMAIL PROTECTED] Sent: Wednesday, June 16, 2004 5:15 PM Subject: RE: Rendering Images YES! ;-) -Original Message- From: Linck, Ken [mailto:[EMAIL PROTECTED] Sent: Wednesday, June 16, 2004 11:57 AM To: Struts Users Mailing List Subject: RE: Rendering Images On a sidenote, it would be kind of nice to add some kind of imageNotFound property to the html:image.. tag where you could specify an alternate image instead. It seems like a common challenge in many places. -Original Message- From: mike [mailto:[EMAIL PROTECTED] Sent: Wednesday, June 16, 2004 11:48 AM To: Struts Users Mailing List; 'Struts Users Mailing List' Subject: RE: Rendering Images I should say also, Jacob, that if you think the simple URL or protocol is important and you wanted to complicate the code you could easily change the request in the response to: /resource.do?hello.gif. I use /resourcedo?file_type=giffile_name=hello.gif because in fact there are other uses for things like /resource.do?hello.gif which are more important to me. That is another story, however. At 08:34 AM 6/16/2004, Hookom, Jacob wrote: Why would you use something like that? I'm maybe not following the code? Is this so instead of writing: /images/hello.gif you can write: /resource.do?file_type=giffile_name=hello.gif ?? -Original Message- From: mike
Re: Problems with 'properties' of html: tags.
Well, I have not tested your case explicitly; however, the Struts/JSP/JSTL tags are all based on the JavaBeans spec for getters and setters --- property: fooBar accessor: getFooBar() {...} mutator: setFooBar(FooBar aFooBar) {...} So, it's best to use that standard for your property names if possible. [EMAIL PROTECTED] wrote: Hi all, In a html:form i can't have any html: .. associated with any property named like X_ cause i get the error Error 500: No getter method for property X_ of bean org.apache.struts.taglib.html. . I have noticed that the names can be like _XXX or XX_XXX, this is, i can not have a name that begins with a single character followed by a low script. Then, my question : Are that names reserved or is it a bug?. I work with Websphere Studio Site Developer 5.1 and Struts 1.1 running on a Websphere Application Server Express 5.0. Thanks everyone. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Specifying JAAS permission on a per-action basis
Folks, I am using JAAS with the Tagish libraries to authenticate users via a JDBC lookup. This works. What I need to do now is to specify permissions on an action-by-action basis, but I am unclear about how this is achieved... Dan Moore's excellent tutorial at http://www.mooreds.com/jaas.html shows an example of setting permissions via a policy configuration file (Example 8. Sample JAAS policy file). I have also read that its possible to specify permission via a roles attribute on the action mapping definition in the struts-config.xml file. Does anyone know if these approaches to permission setting are complimentary or mutually exclusive? Does anyone know which is the best? I would prefer to set the perms in struts-config if possible, if only to keep all the config in the same file. An example of setting perms this way would be great. TIA - Adam - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: [OT] Soccer portal released goal.com
Wow! Cool site. Good job. Did you do all page authoring(javascript, css, dhtml, graphics, etc...) or just server side development (architecture, site design/structure, functionality, etc...)? How long did it take to design and implement? robert -Original Message- From: Simone - Dev [mailto:[EMAIL PROTECTED] Sent: Thursday, June 17, 2004 8:25 AM To: 'Struts Users Mailing List' Subject: [OT] Soccer portal released goal.com Hello All, I know this is a lot off-topic, but I'm so proud of the portal I designed and developed that I'd like you all know that it has just been released a worldwide soccer portal named Goal.com (www.goal.com) and that now it's having a lot of news and live results and live netcasting on the european championship 2004. I aplogize for the invasion also becuase it's not developed in Struts, but with ASP.NET but as I said, it took me the last 6 month of work to develop the engine that drives that portal (and all its netwok: all main italian soccer teams). I use Struts in my spare time but in my real work I develop with .NET and C# (not my decision, of course)... but I prefer Struts. Simone - Simone Chiaretta http://www.piyosailing.com/S www.piyosailing.com/S Any sufficiently advanced technology is indistinguishable from magic Life is short, play hard - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: [OT] Soccer portal released goal.com
I personally object to this crass commercialism injected into a wholly inappropriate environment. I especially dislike people who apologize while doing something they know is wrong. I would encourage members of this list not to look at this site because of this. I know I won't. Michael At 06:11 AM 6/17/2004, Robert Taylor wrote: Wow! Cool site. Good job. Did you do all page authoring(javascript, css, dhtml, graphics, etc...) or just server side development (architecture, site design/structure, functionality, etc...)? How long did it take to design and implement? robert -Original Message- From: Simone - Dev [mailto:[EMAIL PROTECTED] Sent: Thursday, June 17, 2004 8:25 AM To: 'Struts Users Mailing List' Subject: [OT] Soccer portal released goal.com Hello All, I know this is a lot off-topic, but I'm so proud of the portal I designed and developed that I'd like you all know that it has just been released a worldwide soccer portal named Goal.com (www.goal.com) and that now it's having a lot of news and live results and live netcasting on the european championship 2004. I aplogize for the invasion also becuase it's not developed in Struts, but with ASP.NET but as I said, it took me the last 6 month of work to develop the engine that drives that portal (and all its netwok: all main italian soccer teams). I use Struts in my spare time but in my real work I develop with .NET and C# (not my decision, of course)... but I prefer Struts. Simone - Simone Chiaretta http://www.piyosailing.com/S www.piyosailing.com/S Any sufficiently advanced technology is indistinguishable from magic Life is short, play hard - 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: [OT] Soccer portal released goal.com
-Original Message- From: Simone - Dev [mailto:[EMAIL PROTECTED] Sent: 17 June 2004 13:25 To: 'Struts Users Mailing List' Subject: [OT] Soccer portal released goal.com Hello All, I know this is a lot off-topic, but I'm so proud of the portal I designed and developed that I'd like you all know that it has just been released a worldwide soccer portal named Goal.com (www.goal.com) and that now it's having a lot of news and live results and live netcasting on the european championship 2004. I aplogize for the invasion also becuase it's not developed in Struts, but with ASP.NET but as I said, it took me the last 6 month of work to develop the engine that drives that portal (and all its netwok: all main italian soccer teams). I use Struts in my spare time but in my real work I develop with .NET and C# (not my decision, of course)... but I prefer Struts. Simone - Simone Chiaretta Hi Simone Congratulations on the portal. I really do like the look and feel of the pages. In terms of the web design it has a consistent. You know where you are. You instantly know what you can click on. The colours are consistent. The menus work. The only sore point is the search facility. Every web site including a portal needs a search and advanced search. `Now To My Real Point' Having using C# and .Net and also used Struts, obviously you must be a good Server side Java developer, could you relate to the list what are pros and cons (advangtages and disadvantages) between C# / ASP and Java / J2EE / ASP? Could you also highlight any architectural differences or pitfalls in both? From yours web site portal, I pressume your ASP.Net skills are good. You are in a unique position, because you have real experience of using both technologies and can see the `No Man's Land' from both sides of the divide. TIA -- Peter Pilgrim Operations/IT - Credit Suisse First Boston, 10 South Colonnade, London E14 4QJ, United Kingdom Tel: +44 (0)207 883 4447 == This message is for the sole use of the intended recipient. If you received this message in error please delete it and notify us. If this message was misdirected, CSFB does not waive any confidentiality or privilege. CSFB retains and monitors electronic communications sent through its network. Instructions transmitted over this system are not binding on CSFB until they are confirmed by us. Message transmission is not guaranteed to be secure. == - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Specifying JAAS permission on a per-action basis
Pow2ACL http://pow2acl.sourceforge.net/index.html might fit your JAAS high-end needs. It also integrates with Struts. Regards, David -Original Message- From: Adam Lipscombe [mailto:[EMAIL PROTECTED] Sent: Thursday, June 17, 2004 9:02 AM To: 'Struts Users Mailing List' Subject: Specifying JAAS permission on a per-action basis Folks, I am using JAAS with the Tagish libraries to authenticate users via a JDBC lookup. This works. What I need to do now is to specify permissions on an action-by-action basis, but I am unclear about how this is achieved... Dan Moore's excellent tutorial at http://www.mooreds.com/jaas.html shows an example of setting permissions via a policy configuration file (Example 8. Sample JAAS policy file). I have also read that its possible to specify permission via a roles attribute on the action mapping definition in the struts-config.xml file. Does anyone know if these approaches to permission setting are complimentary or mutually exclusive? Does anyone know which is the best? I would prefer to set the perms in struts-config if possible, if only to keep all the config in the same file. An example of setting perms this way would be great. TIA - Adam - 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: [OT] Soccer portal released goal.com
-Original Message- From: mike [mailto:[EMAIL PROTECTED] Sent: 17 June 2004 14:10 To: Struts Users Mailing List; Struts Users Mailing List Subject: RE: [OT] Soccer portal released goal.com I personally object to this crass commercialism injected into a wholly inappropriate environment. I especially dislike people who apologize while doing something they know is wrong. I would encourage members of this list not to look at this site because of this. I know I won't. Michael Which is why I exacted from Simone, a __cost__. . Tell us what are the good and bad points between ASP/.Net and Struts/J2EE in his experience. We can judge him then by the answer we receive, if we get it. Our individual mindshares are not free? -- Peter Pilgrim Operations/IT - Credit Suisse First Boston, 10 South Colonnade, London E14 4QJ, United Kingdom Tel: +44 (0)207 883 4447 == This message is for the sole use of the intended recipient. If you received this message in error please delete it and notify us. If this message was misdirected, CSFB does not waive any confidentiality or privilege. CSFB retains and monitors electronic communications sent through its network. Instructions transmitted over this system are not binding on CSFB until they are confirmed by us. Message transmission is not guaranteed to be secure. == - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [OT] Soccer portal released goal.com
This is not a bare commercial mail.. I was just happy of my creature... it's not a pay site, not it has advertising in it.. so if u go or not I'll not earn (or better the costumer who bought the site) a cent. Anyway probably other people in the list understood the real intent of the email, which was both a mail to say I'm happy and to discuss stuts vs C#/.NET Simone mike wrote: I personally object to this crass commercialism injected into a wholly inappropriate environment. I especially dislike people who apologize while doing something they know is wrong. I would encourage members of this list not to look at this site because of this. I know I won't. Michael At 06:11 AM 6/17/2004, Robert Taylor wrote: Wow! Cool site. Good job. Did you do all page authoring(javascript, css, dhtml, graphics, etc...) or just server side development (architecture, site design/structure, functionality, etc...)? How long did it take to design and implement? robert -Original Message- From: Simone - Dev [mailto:[EMAIL PROTECTED] Sent: Thursday, June 17, 2004 8:25 AM To: 'Struts Users Mailing List' Subject: [OT] Soccer portal released goal.com Hello All, I know this is a lot off-topic, but I'm so proud of the portal I designed and developed that I'd like you all know that it has just been released a worldwide soccer portal named Goal.com (www.goal.com) and that now it's having a lot of news and live results and live netcasting on the european championship 2004. I aplogize for the invasion also becuase it's not developed in Struts, but with ASP.NET but as I said, it took me the last 6 month of work to develop the engine that drives that portal (and all its netwok: all main italian soccer teams). I use Struts in my spare time but in my real work I develop with .NET and C# (not my decision, of course)... but I prefer Struts. Simone - Simone Chiaretta http://www.piyosailing.com/S www.piyosailing.com/S Any sufficiently advanced technology is indistinguishable from magic Life is short, play hard - 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: [OT] Soccer portal released goal.com
I'm just a developer... :-) I did the serverside development and the javascript + dhtml (menu) The rest, desing, css, layout design and so on was developed by a webdesigner I'm working on this engine since november Simone Robert Taylor wrote: Wow! Cool site. Good job. Did you do all page authoring(javascript, css, dhtml, graphics, etc...) or just server side development (architecture, site design/structure, functionality, etc...)? How long did it take to design and implement? robert -Original Message- From: Simone - Dev [mailto:[EMAIL PROTECTED] Sent: Thursday, June 17, 2004 8:25 AM To: 'Struts Users Mailing List' Subject: [OT] Soccer portal released goal.com Hello All, I know this is a lot off-topic, but I'm so proud of the portal I designed and developed that I'd like you all know that it has just been released a worldwide soccer portal named Goal.com (www.goal.com) and that now it's having a lot of news and live results and live netcasting on the european championship 2004. I aplogize for the invasion also becuase it's not developed in Struts, but with ASP.NET but as I said, it took me the last 6 month of work to develop the engine that drives that portal (and all its netwok: all main italian soccer teams). I use Struts in my spare time but in my real work I develop with .NET and C# (not my decision, of course)... but I prefer Struts. Simone - Simone Chiaretta http://www.piyosailing.com/S www.piyosailing.com/S Any sufficiently advanced technology is indistinguishable from magic Life is short, play hard - 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: [OT] Soccer portal released goal.com
I for one appreciate the post Simone. Its a good looking site and its nice to see work that developers have spent time on and are proud of. Good job ! Chris McCormack -Original Message- From: Simone-dev [mailto:[EMAIL PROTECTED] Sent: 17 June 2004 15:02 To: Struts Users Mailing List Subject: Re: [OT] Soccer portal released goal.com I'm just a developer... :-) I did the serverside development and the javascript + dhtml (menu) The rest, desing, css, layout design and so on was developed by a webdesigner I'm working on this engine since november Simone Robert Taylor wrote: Wow! Cool site. Good job. Did you do all page authoring(javascript, css, dhtml, graphics, etc...) or just server side development (architecture, site design/structure, functionality, etc...)? How long did it take to design and implement? robert -Original Message- From: Simone - Dev [mailto:[EMAIL PROTECTED] Sent: Thursday, June 17, 2004 8:25 AM To: 'Struts Users Mailing List' Subject: [OT] Soccer portal released goal.com Hello All, I know this is a lot off-topic, but I'm so proud of the portal I designed and developed that I'd like you all know that it has just been released a worldwide soccer portal named Goal.com (www.goal.com) and that now it's having a lot of news and live results and live netcasting on the european championship 2004. I aplogize for the invasion also becuase it's not developed in Struts, but with ASP.NET but as I said, it took me the last 6 month of work to develop the engine that drives that portal (and all its netwok: all main italian soccer teams). I use Struts in my spare time but in my real work I develop with .NET and C# (not my decision, of course)... but I prefer Struts. Simone - Simone Chiaretta http://www.piyosailing.com/S www.piyosailing.com/S Any sufficiently advanced technology is indistinguishable from magic Life is short, play hard - 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] *** This e-mail and its attachments are confidential and are intended for the above named recipient only. If this has come to you in error, please notify the sender immediately and delete this e-mail from your system. You must take no action based on this, nor must you copy or disclose it or any part of its contents to any person or organisation. Statements and opinions contained in this email may not necessarily represent those of Littlewoods. Please note that e-mail communications may be monitored. The registered office of Littlewoods Limited and its subsidiaries is 100 Old Hall Street, Liverpool, L70 1AB. Registered number of Littlewoods Limited is 262152. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: [OT] Soccer portal released goal.com
+1 -Original Message- From: McCormack, Chris [mailto:[EMAIL PROTECTED] Sent: Thursday, 17 June 2004 22:13 To: Struts Users Mailing List Subject: RE: [OT] Soccer portal released goal.com I for one appreciate the post Simone. Its a good looking site and its nice to see work that developers have spent time on and are proud of. Good job ! Chris McCormack -Original Message- From: Simone-dev [mailto:[EMAIL PROTECTED] Sent: 17 June 2004 15:02 To: Struts Users Mailing List Subject: Re: [OT] Soccer portal released goal.com I'm just a developer... :-) I did the serverside development and the javascript + dhtml (menu) The rest, desing, css, layout design and so on was developed by a webdesigner I'm working on this engine since november Simone Robert Taylor wrote: Wow! Cool site. Good job. Did you do all page authoring(javascript, css, dhtml, graphics, etc...) or just server side development (architecture, site design/structure, functionality, etc...)? How long did it take to design and implement? robert -Original Message- From: Simone - Dev [mailto:[EMAIL PROTECTED] Sent: Thursday, June 17, 2004 8:25 AM To: 'Struts Users Mailing List' Subject: [OT] Soccer portal released goal.com Hello All, I know this is a lot off-topic, but I'm so proud of the portal I designed and developed that I'd like you all know that it has just been released a worldwide soccer portal named Goal.com (www.goal.com) and that now it's having a lot of news and live results and live netcasting on the european championship 2004. I aplogize for the invasion also becuase it's not developed in Struts, but with ASP.NET but as I said, it took me the last 6 month of work to develop the engine that drives that portal (and all its netwok: all main italian soccer teams). I use Struts in my spare time but in my real work I develop with .NET and C# (not my decision, of course)... but I prefer Struts. Simone - Simone Chiaretta http://www.piyosailing.com/S www.piyosailing.com/S Any sufficiently advanced technology is indistinguishable from magic Life is short, play hard - 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] *** This e-mail and its attachments are confidential and are intended for the above named recipient only. If this has come to you in error, please notify the sender immediately and delete this e-mail from your system. You must take no action based on this, nor must you copy or disclose it or any part of its contents to any person or organisation. Statements and opinions contained in this email may not necessarily represent those of Littlewoods. Please note that e-mail communications may be monitored. The registered office of Littlewoods Limited and its subsidiaries is 100 Old Hall Street, Liverpool, L70 1AB. Registered number of Littlewoods Limited is 262152. - 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: [OT] Soccer portal released goal.com
You'd be surprised how many people are closet .Net developers ;) -- James Mitchell Software Engineer / Open Source Evangelist EdgeTech, Inc. 678.910.8017 AIM: jmitchtx - Original Message - From: Simone-dev [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Thursday, June 17, 2004 9:56 AM Subject: Re: [OT] Soccer portal released goal.com This is not a bare commercial mail.. I was just happy of my creature... it's not a pay site, not it has advertising in it.. so if u go or not I'll not earn (or better the costumer who bought the site) a cent. Anyway probably other people in the list understood the real intent of the email, which was both a mail to say I'm happy and to discuss stuts vs C#/.NET Simone mike wrote: I personally object to this crass commercialism injected into a wholly inappropriate environment. I especially dislike people who apologize while doing something they know is wrong. I would encourage members of this list not to look at this site because of this. I know I won't. Michael At 06:11 AM 6/17/2004, Robert Taylor wrote: Wow! Cool site. Good job. Did you do all page authoring(javascript, css, dhtml, graphics, etc...) or just server side development (architecture, site design/structure, functionality, etc...)? How long did it take to design and implement? robert -Original Message- From: Simone - Dev [mailto:[EMAIL PROTECTED] Sent: Thursday, June 17, 2004 8:25 AM To: 'Struts Users Mailing List' Subject: [OT] Soccer portal released goal.com Hello All, I know this is a lot off-topic, but I'm so proud of the portal I designed and developed that I'd like you all know that it has just been released a worldwide soccer portal named Goal.com (www.goal.com) and that now it's having a lot of news and live results and live netcasting on the european championship 2004. I aplogize for the invasion also becuase it's not developed in Struts, but with ASP.NET but as I said, it took me the last 6 month of work to develop the engine that drives that portal (and all its netwok: all main italian soccer teams). I use Struts in my spare time but in my real work I develop with .NET and C# (not my decision, of course)... but I prefer Struts. Simone - Simone Chiaretta http://www.piyosailing.com/S www.piyosailing.com/S Any sufficiently advanced technology is indistinguishable from magic Life is short, play hard - 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: Specifying JAAS permission on a per-action basis
I just did this, and found it extremely simple. I eventually went away from the tagish / http://www.mooreds.com/jaas.html solution. Three steps is all it takes: -1- add this to your struts-config controller processorClass=com.ourcompany.portal.site.struts.action.CustomRequestProces sor/ -2- Code // The Struts Tiles plugin implements its own RequestProcessor, so if you want // to use your RequestProcessor alongside the Tiles' RequestProcessor, make // sure your processor extends TilesRequestProcessor instead of RequestProcessor public class CustomRequestProcessor extends TilesRequestProcessor { protected boolean processRoles(HttpServletRequest request, HttpServletResponse response, ActionMapping mapping) throws IOException, ServletException { // Is this action protected by role requirements? String roles[] = mapping.getRoleNames(); if ((roles == null) || (roles.length 1)) { return (true); } // Check the current user against the list of required roles HttpSession session = request.getSession(); User user = (User) session.getAttribute(user); if (user == null) { response.sendRedirect(noSessionAvailable.do); return false; } for (int i = 0; i roles.length; i++) { if (user.hasRole(roles[i])) { return (true); } } response.sendRedirect(errorNotAuthorized.do); return (false); } } -3- add roles attributes to your action elements in struts-config action path=/billingInformationEdit type=org.apache.struts.actions.ForwardAction parameter=/pages/billingInformationEdit.jsp roles=registeredUser set-property property=secure value=true/ /action HTH - Eric -Original Message- From: David Friedman [mailto:[EMAIL PROTECTED] Sent: Thursday, June 17, 2004 9:15 AM To: Struts Users Mailing List Subject: RE: Specifying JAAS permission on a per-action basis Pow2ACL http://pow2acl.sourceforge.net/index.html might fit your JAAS high-end needs. It also integrates with Struts. Regards, David -Original Message- From: Adam Lipscombe [mailto:[EMAIL PROTECTED] Sent: Thursday, June 17, 2004 9:02 AM To: 'Struts Users Mailing List' Subject: Specifying JAAS permission on a per-action basis Folks, I am using JAAS with the Tagish libraries to authenticate users via a JDBC lookup. This works. What I need to do now is to specify permissions on an action-by-action basis, but I am unclear about how this is achieved... Dan Moore's excellent tutorial at http://www.mooreds.com/jaas.html shows an example of setting permissions via a policy configuration file (Example 8. Sample JAAS policy file). I have also read that its possible to specify permission via a roles attribute on the action mapping definition in the struts-config.xml file. Does anyone know if these approaches to permission setting are complimentary or mutually exclusive? Does anyone know which is the best? I would prefer to set the perms in struts-config if possible, if only to keep all the config in the same file. An example of setting perms this way would be great. TIA - Adam - 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: [OT] Soccer portal released goal.com
+1 McCormack, Chris [EMAIL PROTECTED] wrote on 06/17/2004 10:13:16 AM: I for one appreciate the post Simone. Its a good looking site and its nice to see work that developers have spent time on and are proud of. Good job ! Chris McCormack -Original Message- From: Simone-dev [mailto:[EMAIL PROTECTED] Sent: 17 June 2004 15:02 To: Struts Users Mailing List Subject: Re: [OT] Soccer portal released goal.com I'm just a developer... :-) I did the serverside development and the javascript + dhtml (menu) The rest, desing, css, layout design and so on was developed by a webdesigner I'm working on this engine since november Simone Robert Taylor wrote: Wow! Cool site. Good job. Did you do all page authoring(javascript, css, dhtml, graphics, etc...) or just server side development (architecture, site design/structure, functionality, etc...)? How long did it take to design and implement? robert -Original Message- From: Simone - Dev [mailto:[EMAIL PROTECTED] Sent: Thursday, June 17, 2004 8:25 AM To: 'Struts Users Mailing List' Subject: [OT] Soccer portal released goal.com Hello All, I know this is a lot off-topic, but I'm so proud of the portal I designed and developed that I'd like you all know that it has just been released a worldwide soccer portal named Goal.com (www.goal.com) and that now it's having a lot of news and live results and live netcasting on the european championship 2004. I aplogize for the invasion also becuase it's not developed in Struts, but with ASP.NET but as I said, it took me the last 6 month of work to develop the engine that drives that portal (and all its netwok: all main italian soccer teams). I use Struts in my spare time but in my real work I develop with .NET and C# (not my decision, of course)... but I prefer Struts. Simone - Simone Chiaretta http://www.piyosailing.com/S www.piyosailing.com/S Any sufficiently advanced technology is indistinguishable from magic Life is short, play hard - 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] *** This e-mail and its attachments are confidential and are intended for the above named recipient only. If this has come to you in error, please notify the sender immediately and delete this e-mail from your system. You must take no action based on this, nor must you copy or disclose it or any part of its contents to any person or organisation. Statements and opinions contained in this email may not necessarily represent those of Littlewoods. Please note that e-mail communications may be monitored. The registered office of Littlewoods Limited and its subsidiaries is 100 Old Hall Street, Liverpool, L70 1AB. Registered number of Littlewoods Limited is 262152. - 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]
R: [OT] Soccer portal released goal.com
-1 for the site... On my machine (IE on windows XP ) is not usable! The problem is with the blue background. +1 for Roby Baggio!! :-) BR Amleto -Messaggio originale- Da: Marco Mistroni [mailto:[EMAIL PROTECTED] Inviato: giovedì 17 giugno 2004 16.09 A: 'Struts Users Mailing List' Oggetto: RE: [OT] Soccer portal released goal.com Hey, Cool site!! Congratulations... and one little request: More space for Roberto Baggio! Regards marco -Original Message- From: Simone - Dev [mailto:[EMAIL PROTECTED] Sent: 17 June 2004 13:25 To: 'Struts Users Mailing List' Subject: [OT] Soccer portal released goal.com Hello All, I know this is a lot off-topic, but I'm so proud of the portal I designed and developed that I'd like you all know that it has just been released a worldwide soccer portal named Goal.com (www.goal.com) and that now it's having a lot of news and live results and live netcasting on the european championship 2004. I aplogize for the invasion also becuase it's not developed in Struts, but with ASP.NET but as I said, it took me the last 6 month of work to develop the engine that drives that portal (and all its netwok: all main italian soccer teams). I use Struts in my spare time but in my real work I develop with .NET and C# (not my decision, of course)... but I prefer Struts. Simone - Simone Chiaretta http://www.piyosailing.com/S www.piyosailing.com/S Any sufficiently advanced technology is indistinguishable from magic Life is short, play hard - 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: [OT] Soccer portal released goal.com
Thank you for your congratulations... Search and advanced search will come in a future release... as will arrive other 10 different language edition Now, the real point of my email: Differences between C#/.NET and Struts/JSP *First let's speak about C# and Java:* Before the arrive of C# I hated my job... we programmed in VB, and VB really sucks... so I spent my night develpin with java... When C# arrived, well... I started loving it again... C# is just the same as Java... I cannot tell you the pros and cons of both languages... becuase they are almost the same... they do the same thing, with more or less the same syntax C# is a bit more easy when it comes to define getter and setter and with constructor for derived classes In java getter/setter are just a method with the getXXX and setXXX name... but then you have to call it like methods C# defines properties in a different way: for example public String name { get { return _name; } set { _name=value; } } and in the user code u just as if u are using a field: obj.name=mike; Then another thing is the foreach statement (but if I'm not wrong java 1.5 has this statement, too...) *ASP.NET and Struts* One real big advantage in the asp.net framework is that you can manipulate server side controls (I mean html elements that are declared as runat=server) directly from the code while with Struts you have to set a page attribute and then get it in jsp (unless u are using a formBean) Another great feature is the asp:repeater which automatically binds to any IEnumerable object and reapeat it on a page (ok, there is with jstl too..., but with the repeater you have an event that is triggered each time a new row (or better, before each row) is written on the page, so u can process it after binding instead of doing it before. An advantage of ASP.NET is that u don't have to define actionmappings but there is one-to-one mapping between aspx and cs... but this way u cannot define the same action for different pages... I think that the most of the pros of Struts comes from its companion packages: Validator and TilesFramework In ASP.NET there is a validator too... , but the one supplied with Struts is more powerfull, let you define validation also for query string, and works with all browser (while the asp.net one works on the client just for IE, while with Mozilla it does a roundtrip to the server) A completely missing thin with ASP.NET is something similar to TilesFramework... In my portal all the pages except the homepage have the same layout (header, pagebody, right column, footer) In ASP.NET there is an equivalent to single tiles: webuser controls, that contain all processing and layout for a particular type of contents, like the news list, or the thumbnail list But if I've 20 pages with the same layout I've to build 20 different pages, identical with just the page content that is different. The engine is used to create at almost no develper cost completely diffrent sites with different layouts... but if I've to change the layout I've change all pages, while with Tiles I'd have changed just the layout page, and everthing would have gone in the right place. For the rest are almost similar... I think the big usabilty and easyness of develpment differences comes with the IDE used to develop... Simone Pilgrim, Peter wrote: Hi Simone Congratulations on the portal. I really do like the look and feel of the pages. In terms of the web design it has a consistent. You know where you are. You instantly know what you can click on. The colours are consistent. The menus work. The only sore point is the search facility. Every web site including a portal needs a search and advanced search. `Now To My Real Point' Having using C# and .Net and also used Struts, obviously you must be a good Server side Java developer, could you relate to the list what are pros and cons (advangtages and disadvantages) between C# / ASP and Java / J2EE / ASP? Could you also highlight any architectural differences or pitfalls in both? From yours web site portal, I pressume your ASP.Net skills are good. You are in a unique position, because you have real experience of using both technologies and can see the `No Man's Land' from both sides of the divide. TIA -- Peter Pilgrim Operations/IT - Credit Suisse First Boston, 10 South Colonnade, London E14 4QJ, United Kingdom Tel: +44 (0)207 883 4447 == This message is for the sole use of the intended recipient. If you received this message in error please delete it and notify us. If this message was misdirected, CSFB does not waive any confidentiality or privilege. CSFB retains and monitors electronic communications sent through its network. Instructions transmitted over this system are not binding on CSFB until they are confirmed by us. Message transmission is not guaranteed to be secure.
RE: getMessageResources in webLogic?
Without more information, it's unlikely anyone could see what is going wrong here. Show us the structure of your WAR, and that might help. -Original Message- From: news [mailto:[EMAIL PROTECTED] On Behalf Of Jacob Weber In my Struts app, I need to get data from a resource bundle. So I make a call to: MessageResources.getMessageResources(myFile) The file name is actually myFile_en_US.properties, and when I run this code on Tomcat, it's able to find the right file. But when I run the same code on WebLogic, it doesn't find it. It only finds the file if it's called myFile.properties, without the locale extension. Does anyone know why? Many thanks, Jacob - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Specifying JAAS permission on a per-action basis
Many thanks Eric - its easy when you know how :-) I am interested to know why you chose this approach over the tagish / http://www.mooreds.com/jaas.html solution? Did you hit problems ? TIA - Adam -Original Message- From: Eric Dahnke [mailto:[EMAIL PROTECTED] Sent: 17 June 2004 15:33 To: 'Struts Users Mailing List' Subject: RE: Specifying JAAS permission on a per-action basis I just did this, and found it extremely simple. I eventually went away from the tagish / http://www.mooreds.com/jaas.html solution. Three steps is all it takes: -1- add this to your struts-config controller processorClass=com.ourcompany.portal.site.struts.action.CustomRequestProces sor/ -2- Code // The Struts Tiles plugin implements its own RequestProcessor, so if you want // to use your RequestProcessor alongside the Tiles' RequestProcessor, make // sure your processor extends TilesRequestProcessor instead of RequestProcessor public class CustomRequestProcessor extends TilesRequestProcessor { protected boolean processRoles(HttpServletRequest request, HttpServletResponse response, ActionMapping mapping) throws IOException, ServletException { // Is this action protected by role requirements? String roles[] = mapping.getRoleNames(); if ((roles == null) || (roles.length 1)) { return (true); } // Check the current user against the list of required roles HttpSession session = request.getSession(); User user = (User) session.getAttribute(user); if (user == null) { response.sendRedirect(noSessionAvailable.do); return false; } for (int i = 0; i roles.length; i++) { if (user.hasRole(roles[i])) { return (true); } } response.sendRedirect(errorNotAuthorized.do); return (false); } } -3- add roles attributes to your action elements in struts-config action path=/billingInformationEdit type=org.apache.struts.actions.ForwardAction parameter=/pages/billingInformationEdit.jsp roles=registeredUser set-property property=secure value=true/ /action HTH - Eric -Original Message- From: David Friedman [mailto:[EMAIL PROTECTED] Sent: Thursday, June 17, 2004 9:15 AM To: Struts Users Mailing List Subject: RE: Specifying JAAS permission on a per-action basis Pow2ACL http://pow2acl.sourceforge.net/index.html might fit your JAAS high-end needs. It also integrates with Struts. Regards, David -Original Message- From: Adam Lipscombe [mailto:[EMAIL PROTECTED] Sent: Thursday, June 17, 2004 9:02 AM To: 'Struts Users Mailing List' Subject: Specifying JAAS permission on a per-action basis Folks, I am using JAAS with the Tagish libraries to authenticate users via a JDBC lookup. This works. What I need to do now is to specify permissions on an action-by-action basis, but I am unclear about how this is achieved... Dan Moore's excellent tutorial at http://www.mooreds.com/jaas.html shows an example of setting permissions via a policy configuration file (Example 8. Sample JAAS policy file). I have also read that its possible to specify permission via a roles attribute on the action mapping definition in the struts-config.xml file. Does anyone know if these approaches to permission setting are complimentary or mutually exclusive? Does anyone know which is the best? I would prefer to set the perms in struts-config if possible, if only to keep all the config in the same file. An example of setting perms this way would be great. TIA - Adam - 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]
FW: Specifying JAAS permission on a per-action basis
Sorry, I forgot to ask - Are you still using JAAS/Tagish authentication to log a User in and set up a Principal etc? If not how do you do this? TIA -Adam -Original Message- From: Adam Lipscombe [mailto:[EMAIL PROTECTED] Sent: 17 June 2004 16:02 To: 'Struts Users Mailing List' Subject: RE: Specifying JAAS permission on a per-action basis Many thanks Eric - its easy when you know how :-) I am interested to know why you chose this approach over the tagish / http://www.mooreds.com/jaas.html solution? Did you hit problems ? TIA - Adam -Original Message- From: Eric Dahnke [mailto:[EMAIL PROTECTED] Sent: 17 June 2004 15:33 To: 'Struts Users Mailing List' Subject: RE: Specifying JAAS permission on a per-action basis I just did this, and found it extremely simple. I eventually went away from the tagish / http://www.mooreds.com/jaas.html solution. Three steps is all it takes: -1- add this to your struts-config controller processorClass=com.ourcompany.portal.site.struts.action.CustomRequestProces sor/ -2- Code // The Struts Tiles plugin implements its own RequestProcessor, so if you want // to use your RequestProcessor alongside the Tiles' RequestProcessor, make // sure your processor extends TilesRequestProcessor instead of RequestProcessor public class CustomRequestProcessor extends TilesRequestProcessor { protected boolean processRoles(HttpServletRequest request, HttpServletResponse response, ActionMapping mapping) throws IOException, ServletException { // Is this action protected by role requirements? String roles[] = mapping.getRoleNames(); if ((roles == null) || (roles.length 1)) { return (true); } // Check the current user against the list of required roles HttpSession session = request.getSession(); User user = (User) session.getAttribute(user); if (user == null) { response.sendRedirect(noSessionAvailable.do); return false; } for (int i = 0; i roles.length; i++) { if (user.hasRole(roles[i])) { return (true); } } response.sendRedirect(errorNotAuthorized.do); return (false); } } -3- add roles attributes to your action elements in struts-config action path=/billingInformationEdit type=org.apache.struts.actions.ForwardAction parameter=/pages/billingInformationEdit.jsp roles=registeredUser set-property property=secure value=true/ /action HTH - Eric -Original Message- From: David Friedman [mailto:[EMAIL PROTECTED] Sent: Thursday, June 17, 2004 9:15 AM To: Struts Users Mailing List Subject: RE: Specifying JAAS permission on a per-action basis Pow2ACL http://pow2acl.sourceforge.net/index.html might fit your JAAS high-end needs. It also integrates with Struts. Regards, David -Original Message- From: Adam Lipscombe [mailto:[EMAIL PROTECTED] Sent: Thursday, June 17, 2004 9:02 AM To: 'Struts Users Mailing List' Subject: Specifying JAAS permission on a per-action basis Folks, I am using JAAS with the Tagish libraries to authenticate users via a JDBC lookup. This works. What I need to do now is to specify permissions on an action-by-action basis, but I am unclear about how this is achieved... Dan Moore's excellent tutorial at http://www.mooreds.com/jaas.html shows an example of setting permissions via a policy configuration file (Example 8. Sample JAAS policy file). I have also read that its possible to specify permission via a roles attribute on the action mapping definition in the struts-config.xml file. Does anyone know if these approaches to permission setting are complimentary or mutually exclusive? Does anyone know which is the best? I would prefer to set the perms in struts-config if possible, if only to keep all the config in the same file. An example of setting perms this way would be great. TIA - Adam - 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: [OT] Soccer portal released goal.com
Way back in April I was quite impressed by a demonstration Visual .Net / Managed C++ / C# talking directly to a J2EE 1.4 web service. The guy demonstrated the whole thing in under five minutes. So I have been wondering what is the state of the art of tools under J2EE, but I guess I will find in two weeks at J1. I wish i shared that experience. My complaints about .NET all stem back to one thing - it's a closed source MS product. They are about as good at fixing bugs as complying with standards! I find open source java solutions far better - you find a bug you ask for a fix, or fix it yourself. You find the software doesnt do what you want, you hack the code to do it! With .NET this is impossible. I have recently written web services for our software to interoperate with an MS .NET system. It was an absolute nightmare. Bugs in MS's soap implementation stopped it from accessing our service. This was eventually overcome, but accessing the .NET service was even more painful. I cannot use Apache AXIS (directly) to access the service because AXIS generates a request with slightly different namespace declaration (but an equally valid one) than MS expects: ns1:GetData soapenv:encodingStyle=http://schemas.xmlsoap.org/soap/encoding/; xmlns:ns1=http://tempuri.org; The example SOAP XML which MS gives you as an example (which works): GetData xmlns=http://tempuri.org/; The only solution to this i found was to generate my own SoapEnvelope object and use axis to send it, which makes for an ugly solution. Generally i find the state of J2EE tools to be better than .NET, however they are harder to find and sometimes get started with. MS's one benefit here is everything comes in the one box! There are some things i quite like about .NET but i just dont like microsofts implementation. Hopefully MONO are going to do better :) Daniel. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [OT] Soccer portal released goal.com
U got the point I just sent my answer to your previus mail and here it comes your other one :-) I use Visual Studio .NET for C# and ASP.NET... from the designer point of view, the wysiwyg designer generates non standard, non cross-browser html pages.. so I alway design the page with the HTML view. In my spare time I didn't have time to learn to use an IDE, because I prefer improving my java and struts knowledge... I use a simple text editor to develop java, struts and whatever else I do. for java But I was planning to learn using Eclipse because when it comes to debugging, I use the old System.out.println method but since now I'm getting used to stepping into server code and moving the mouse over a variable name to see a tooltip with the value, I'd like to do the same for Struts :-) And speaking about webservices... with asp.net it really takes 5 minutes to bind to a remote webservice and use it in your own application. U just say you want to call that service, you point the VS.NET to the url, it retrive the ws defintion with wsdl, it creates the proxy and let you use the ws like it was a local function call if u were not the developer that this the initial binding, u will never know this to be a ws call. Simone Pilgrim, Peter wrote: -Original Message- From: Marco Mistroni [mailto:[EMAIL PROTECTED] Sent: 17 June 2004 15:09 To: 'Struts Users Mailing List' Subject: RE: [OT] Soccer portal released goal.com Hey, Cool site!! Congratulations... and one little request: More space for Roberto Baggio! I second that emotion! What a truly fantastic player he was in 1994 and at Juventus. Anyway moving back into Struts/J2EE orbit, did you develop this site with Visual C# and tools? How did you find the tools IDE? If you are using Struts in your spare time. Do you use Eclipse or MyEclipse or the Struts Console? Basically my question is who is doing it better (Java/Sun or C#/Microsoft) from the view point of tools (ease of development and deployment) for web application? Way back in April I was quite impressed by a demonstration Visual .Net / Managed C++ / C# talking directly to a J2EE 1.4 web service. The guy demonstrated the whole thing in under five minutes. So I have been wondering what is the state of the art of tools under J2EE, but I guess I will find in two weeks at J1. -- Peter Pilgrim Operations/IT - Credit Suisse First Boston, 10 South Colonnade, London E14 4QJ, United Kingdom Tel: +44 (0)207 883 4447 == This message is for the sole use of the intended recipient. If you received this message in error please delete it and notify us. If this message was misdirected, CSFB does not waive any confidentiality or privilege. CSFB retains and monitors electronic communications sent through its network. Instructions transmitted over this system are not binding on CSFB until they are confirmed by us. Message transmission is not guaranteed to be secure. == - 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: [OT] Soccer portal released goal.com
-Original Message- From: Daniel Perry [mailto:[EMAIL PROTECTED] Sent: 17 June 2004 16:03 To: Struts Users Mailing List Subject: RE: [OT] Soccer portal released goal.com Way back in April I was quite impressed by a demonstration Visual .Net / Managed C++ / C# talking directly to a J2EE 1.4 web service. The guy demonstrated the whole thing in under five minutes. So I have been wondering what is the state of the art of tools under J2EE, but I guess I will find in two weeks at J1. I wish i shared that experience. My complaints about .NET all stem back to one thing - it's a closed source MS product. They are about as good at fixing bugs as complying with standards! I find open source java solutions far better - you find a bug you ask for a fix, or fix it yourself. You find the software doesnt do what you want, you hack the code to do it! With .NET this is impossible. I have recently written web services for our software to interoperate with an MS .NET system. It was an absolute nightmare. Bugs in MS's soap implementation stopped it from accessing our service. This was eventually overcome, but accessing the .NET service was even more painful. I cannot use Apache AXIS (directly) to access the service because AXIS generates a request with slightly different namespace declaration (but an equally valid one) than MS expects: ns1:GetData soapenv:encodingStyle=http://schemas.xmlsoap.org/soap/encoding/; xmlns:ns1=http://tempuri.org; The example SOAP XML which MS gives you as an example (which works): GetData xmlns=http://tempuri.org/; The only solution to this i found was to generate my own SoapEnvelope object and use axis to send it, which makes for an ugly solution. Generally i find the state of J2EE tools to be better than .NET, however they are harder to find and sometimes get started with. MS's one benefit here is everything comes in the one box! There are some things i quite like about .NET but i just dont like microsofts implementation. Hopefully MONO are going to do better :) Daniel. Thnaks for that. Sounds like another open source project needs to be written Wrapper Around Mycrosoft .Net in ernest. Your experience is exactly my experience with Visual C++ back in 1999. Confused I'ill alway be once you get beyond the tutorial examples! I am a Linux phile so I would like to get into C# and stuff using MONO. It does look like an interesting language to learn too. At CSFB in Operations/IT it is all J2EE at the moment, but you just never know, The world could turn on its head any day. -- Peter Pilgrim Operations/IT - Credit Suisse First Boston, 10 South Colonnade, London E14 4QJ, United Kingdom Tel: +44 (0)207 883 4447 == This message is for the sole use of the intended recipient. If you received this message in error please delete it and notify us. If this message was misdirected, CSFB does not waive any confidentiality or privilege. CSFB retains and monitors electronic communications sent through its network. Instructions transmitted over this system are not binding on CSFB until they are confirmed by us. Message transmission is not guaranteed to be secure. == - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [OT] Soccer portal released goal.com
I don't like MS for the same motivation as you: OpenSource is better... fortuantely the MONO framework is opensource and hopefully application written for the MS.NET framework will run on the Mono too I had the same problem with MS SOAP and the old apache SOAP Simone Pilgrim, Peter wrote: -Original Message- From: Daniel Perry [mailto:[EMAIL PROTECTED] Sent: 17 June 2004 16:03 To: Struts Users Mailing List Subject: RE: [OT] Soccer portal released goal.com Way back in April I was quite impressed by a demonstration Visual .Net / Managed C++ / C# talking directly to a J2EE 1.4 web service. The guy demonstrated the whole thing in under five minutes. So I have been wondering what is the state of the art of tools under J2EE, but I guess I will find in two weeks at J1. I wish i shared that experience. My complaints about .NET all stem back to one thing - it's a closed source MS product. They are about as good at fixing bugs as complying with standards! I find open source java solutions far better - you find a bug you ask for a fix, or fix it yourself. You find the software doesnt do what you want, you hack the code to do it! With .NET this is impossible. I have recently written web services for our software to interoperate with an MS .NET system. It was an absolute nightmare. Bugs in MS's soap implementation stopped it from accessing our service. This was eventually overcome, but accessing the .NET service was even more painful. I cannot use Apache AXIS (directly) to access the service because AXIS generates a request with slightly different namespace declaration (but an equally valid one) than MS expects: ns1:GetData soapenv:encodingStyle=http://schemas.xmlsoap.org/soap/encoding/; xmlns:ns1=http://tempuri.org; The example SOAP XML which MS gives you as an example (which works): GetData xmlns=http://tempuri.org/; The only solution to this i found was to generate my own SoapEnvelope object and use axis to send it, which makes for an ugly solution. Generally i find the state of J2EE tools to be better than .NET, however they are harder to find and sometimes get started with. MS's one benefit here is everything comes in the one box! There are some things i quite like about .NET but i just dont like microsofts implementation. Hopefully MONO are going to do better :) Daniel. Thnaks for that. Sounds like another open source project needs to be written Wrapper Around Mycrosoft .Net in ernest. Your experience is exactly my experience with Visual C++ back in 1999. Confused I'ill alway be once you get beyond the tutorial examples! I am a Linux phile so I would like to get into C# and stuff using MONO. It does look like an interesting language to learn too. At CSFB in Operations/IT it is all J2EE at the moment, but you just never know, The world could turn on its head any day. -- Peter Pilgrim Operations/IT - Credit Suisse First Boston, 10 South Colonnade, London E14 4QJ, United Kingdom Tel: +44 (0)207 883 4447 == This message is for the sole use of the intended recipient. If you received this message in error please delete it and notify us. If this message was misdirected, CSFB does not waive any confidentiality or privilege. CSFB retains and monitors electronic communications sent through its network. Instructions transmitted over this system are not binding on CSFB until they are confirmed by us. Message transmission is not guaranteed to be secure. == - 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]
problems using requiredif
Hi, I have some problem using requiredif, the problem is the following: I have 1 Dynamic form and two JSPs that send information (these JSPs differs in any fields) two one action, I'm trying to get that depends on the value of one field (tipPersona = 0/1)require and mask any fields. this works with one field(txtRazonSocial) but with other(codActividadEconomica) always get a mask error. here's the code: field property=tipPersona depends=required,mask arg0 key=${var:campo} resource=false name=required / arg0 key=${var:campo} resource=false name=mask / var var-namecampo/var-name var-valueTipo de Persona/var-value /var var var-namemask/var-name var-value^[01]{1}$/var-value /var /field field property=txtRazonSocial depends=requiredif,mask arg0 key=${var:campo} resource=false name=mask / msg name=requiredif key=errors.required/ arg0 key=${var:campo} resource=false name=requiredif / var var-namecampo/var-name var-valueRazón Social/var-value /var var var-namemask/var-name var-value^[a-zA-Z09 \-]{2,70}$/var-value /var var var-namefield[0]/var-name var-valuetipPersona/var-value /var var var-namefieldTest[0]/var-name var-valueEQUAL/var-value /var var var-namefieldValue[0]/var-name var-value0/var-value /var /field field property=codActividadEconomica depends=requiredif,mask arg0 key=${var:campo} resource=false name=mask / msg name=requiredif key=errors.required/ arg0 key=${var:campo} resource=false name=requiredif / var var-namefield[0]/var-name var-valuetipPersona/var-value /var var var-namefieldTest[0]/var-name var-valueEQUAL/var-value /var var var-namefieldValue[0]/var-name var-value0/var-value /var var var-namemask/var-name var-value^[0-9]{2}$/var-value /var var var-namecampo/var-name var-valueActividad Económica/var-value /var /field field property=txtApellidoMaterno depends=requiredif,mask arg0 key=${var:campo} resource=false name=mask / msg name=requiredif key=errors.required/ arg0 key=${var:campo} resource=false name=requiredif / var var-namecampo/var-name var-valueApellido Materno/var-value /var var var-namemask/var-name var-value^[a-zA-Z \-]{2,30}$/var-value /var var var-namefield[0]/var-name var-valuetipPersona/var-value /var var var-namefieldTest[0]/var-name var-valueEQUAL/var-value /var var var-namefieldValue[0]/var-name var-value1/var-value /var /field Inside JSP I only have the properties that are validated when the value of tipPersona=1, I didn't the other page because i want to be sure that it works. __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [SOLVED] Re: Struts alternative to using request.getParameterValues in an actionform?
You're welcome, Asif! Now you why didn't I copy-pasted some code for you ;) ATTA - Original Message - From: Asif Rahman [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Thursday, June 17, 2004 8:17 AM Subject: [SOLVED] Re: Struts alternative to using request.getParameterValues in an actionform? Thanks a million Atta-ur!! Indexed properties worked! I tried using the struts nested tagblibs first, but couldnt get it to work with that, it seemed good only for display, but not retrieving objects into the actionform from the jsp page when submitting. Indexed properties definitely did the trick. I found the following links helpful: http://www.mail-archive.com/[EMAIL PROTECTED]/msg96800.html and http://www.sudsy.net/technology/struts-advanced.html All I did with my code was JSP snippet: .. logic:iterate id=site name=OpportunitySitesForm property=sitesList tr td colspan=2html:text name=site property=siteName indexed=true //td ... ActionForm snippet: public SitesDTO getSite(int index) { return (SitesDTO) sitesList.get(index); } public void setSite(int index, SitesDTO site) { this.sitesList.add(index,site); } where site in the logic:iterate has a matching site SiteDTO object in the actionform. -Asif - Original Message - From: atta-ur rehman [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED]; Asif Rahman [EMAIL PROTECTED] Sent: Tuesday, June 15, 2004 5:14 PM Subject: Re: Struts alternative to using request.getParameterValues in an actionform? Hellow Asif, Indexed Properties is exactly what you need here. For more info, please search thru the mail archive at: http://www.mail-archive.com/[EMAIL PROTECTED]/ or at: - Original Message - From: Asif Rahman [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, June 15, 2004 2:00 PM Subject: Struts alternative to using request.getParameterValues in an actionform? Hi Im using logic:iterate shown below to iterate through an arraylist (sitesList) in my actionform (OpportunitySitesForm). This arraylist contains a number of Site objects which have the properties siteName, address1, and city. This is getting displayed correctly. Now when processing the form, I am wondering whether in struts there is a way to retrieve these as objects and automatically populate setSitesList(ArrayList) method, rather than manually use request.getParameterValues for siteName, address1, city, create individual Site objects, add the site objects to an arraylist with Site objects and finally pass the list into setSitesList(arraylist). logic:iterate id=myCollectionElement name=OpportunitySitesForm property=sitesList tr td colspan=2input type=text name=siteName value='bean:write name=myCollectionElement property=siteName /'/td td colspan=2input type=text name=address1 value='bean:write name=myCollectionElement property=address1 /'/td td colspan=2input type=text name=city value='bean:write name=myCollectionElement property=city /'/td tr /logic:iterate Any help would be most appreciated. Thanks! -Asif - 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: Specifying JAAS permission on a per-action basis
-Original Message- From: Adam Lipscombe [mailto:[EMAIL PROTECTED] Sent: Thursday, June 17, 2004 11:02 AM To: 'Struts Users Mailing List' Subject: RE: Specifying JAAS permission on a per-action basis Many thanks Eric - its easy when you know how :-) I am interested to know why you chose this approach over the tagish / http://www.mooreds.com/jaas.html solution? Did you hit problems ? I found the struts-config roles/controller a cleaner solution not requiring all the configuration in the JAVA_HOME\jre\lib\security\*. And you also have to keep a separate list of resources to protect a la: grant Principal com.tagish.auth.TypedPrincipal user { permission com.xor.auth.perm.URLPermission \ /struts-example/editRegistration.do; ... ... ... }; The above isn't bad, but we didn't need that much horsepower, nor do we do authentication based on jaas, just the authorization part. I hate container managed (user/jdbc realm based) authentication. IMO that should be used as a replacement for Apache style htaccess authentication (which is what it is intended for I believe) and develop application level authentication within your own code / db. TIA - Adam -Original Message- From: Eric Dahnke [mailto:[EMAIL PROTECTED] Sent: 17 June 2004 15:33 To: 'Struts Users Mailing List' Subject: RE: Specifying JAAS permission on a per-action basis I just did this, and found it extremely simple. I eventually went away from the tagish / http://www.mooreds.com/jaas.html solution. Three steps is all it takes: -1- add this to your struts-config controller processorClass=com.ourcompany.portal.site.struts.action.Custo mRequestProces sor/ -2- Code // The Struts Tiles plugin implements its own RequestProcessor, so if you want // to use your RequestProcessor alongside the Tiles' RequestProcessor, make // sure your processor extends TilesRequestProcessor instead of RequestProcessor public class CustomRequestProcessor extends TilesRequestProcessor { protected boolean processRoles(HttpServletRequest request, HttpServletResponse response, ActionMapping mapping) throws IOException, ServletException { // Is this action protected by role requirements? String roles[] = mapping.getRoleNames(); if ((roles == null) || (roles.length 1)) { return (true); } // Check the current user against the list of required roles HttpSession session = request.getSession(); User user = (User) session.getAttribute(user); if (user == null) { response.sendRedirect(noSessionAvailable.do); return false; } for (int i = 0; i roles.length; i++) { if (user.hasRole(roles[i])) { return (true); } } response.sendRedirect(errorNotAuthorized.do); return (false); } } -3- add roles attributes to your action elements in struts-config action path=/billingInformationEdit type=org.apache.struts.actions.ForwardAction parameter=/pages/billingInformationEdit.jsp roles=registeredUser set-property property=secure value=true/ /action HTH - Eric -Original Message- From: David Friedman [mailto:[EMAIL PROTECTED] Sent: Thursday, June 17, 2004 9:15 AM To: Struts Users Mailing List Subject: RE: Specifying JAAS permission on a per-action basis Pow2ACL http://pow2acl.sourceforge.net/index.html might fit your JAAS high-end needs. It also integrates with Struts. Regards, David -Original Message- From: Adam Lipscombe [mailto:[EMAIL PROTECTED] Sent: Thursday, June 17, 2004 9:02 AM To: 'Struts Users Mailing List' Subject: Specifying JAAS permission on a per-action basis Folks, I am using JAAS with the Tagish libraries to authenticate users via a JDBC lookup. This works. What I need to do now is to specify permissions on an action-by-action basis, but I am unclear about how this is achieved... Dan Moore's excellent tutorial at http://www.mooreds.com/jaas.html shows an example of setting permissions via a policy configuration file (Example 8. Sample JAAS policy file). I have also read that its possible to specify permission via a roles attribute on the action mapping definition in the struts-config.xml file. Does anyone know if these approaches to permission setting are complimentary or mutually exclusive? Does anyone know which is the best? I would prefer to set the perms in struts-config if possible, if only to keep all the config in the same file. An example of setting perms this way would be great. TIA - Adam
RE: Specifying JAAS permission on a per-action basis
Just authenticate() and hasRole() methods on our user object and utilizing the session. I think the java community added too much functionality to the container level authentication earlier on, and people have become increasingly tempted to use that (the whole Realms thing) for application level authentication. That issue snowballed, and now there is a lot of container level authentication functionality but it is like using a sledge hammer to drive a nail IMO. Realms is good for protecting an entire site (for example before launch or adding extra protection to a backoffice section or something - htaccess style). Of course if you need single signon or to authenticate against ldap or something the jaas style authentication is great, but how often does that come up in web apps. All just my opinion of course. -- Eric -Original Message- From: Adam Lipscombe [mailto:[EMAIL PROTECTED] Sent: Thursday, June 17, 2004 11:04 AM To: 'Struts Users Mailing List' Subject: FW: Specifying JAAS permission on a per-action basis Sorry, I forgot to ask - Are you still using JAAS/Tagish authentication to log a User in and set up a Principal etc? If not how do you do this? TIA -Adam -Original Message- From: Adam Lipscombe [mailto:[EMAIL PROTECTED] Sent: 17 June 2004 16:02 To: 'Struts Users Mailing List' Subject: RE: Specifying JAAS permission on a per-action basis Many thanks Eric - its easy when you know how :-) I am interested to know why you chose this approach over the tagish / http://www.mooreds.com/jaas.html solution? Did you hit problems ? TIA - Adam -Original Message- From: Eric Dahnke [mailto:[EMAIL PROTECTED] Sent: 17 June 2004 15:33 To: 'Struts Users Mailing List' Subject: RE: Specifying JAAS permission on a per-action basis I just did this, and found it extremely simple. I eventually went away from the tagish / http://www.mooreds.com/jaas.html solution. Three steps is all it takes: -1- add this to your struts-config controller processorClass=com.ourcompany.portal.site.struts.action.Custo mRequestProces sor/ -2- Code // The Struts Tiles plugin implements its own RequestProcessor, so if you want // to use your RequestProcessor alongside the Tiles' RequestProcessor, make // sure your processor extends TilesRequestProcessor instead of RequestProcessor public class CustomRequestProcessor extends TilesRequestProcessor { protected boolean processRoles(HttpServletRequest request, HttpServletResponse response, ActionMapping mapping) throws IOException, ServletException { // Is this action protected by role requirements? String roles[] = mapping.getRoleNames(); if ((roles == null) || (roles.length 1)) { return (true); } // Check the current user against the list of required roles HttpSession session = request.getSession(); User user = (User) session.getAttribute(user); if (user == null) { response.sendRedirect(noSessionAvailable.do); return false; } for (int i = 0; i roles.length; i++) { if (user.hasRole(roles[i])) { return (true); } } response.sendRedirect(errorNotAuthorized.do); return (false); } } -3- add roles attributes to your action elements in struts-config action path=/billingInformationEdit type=org.apache.struts.actions.ForwardAction parameter=/pages/billingInformationEdit.jsp roles=registeredUser set-property property=secure value=true/ /action HTH - Eric -Original Message- From: David Friedman [mailto:[EMAIL PROTECTED] Sent: Thursday, June 17, 2004 9:15 AM To: Struts Users Mailing List Subject: RE: Specifying JAAS permission on a per-action basis Pow2ACL http://pow2acl.sourceforge.net/index.html might fit your JAAS high-end needs. It also integrates with Struts. Regards, David -Original Message- From: Adam Lipscombe [mailto:[EMAIL PROTECTED] Sent: Thursday, June 17, 2004 9:02 AM To: 'Struts Users Mailing List' Subject: Specifying JAAS permission on a per-action basis Folks, I am using JAAS with the Tagish libraries to authenticate users via a JDBC lookup. This works. What I need to do now is to specify permissions on an action-by-action basis, but I am unclear about how this is achieved... Dan Moore's excellent tutorial at http://www.mooreds.com/jaas.html shows an example of setting permissions via a policy configuration file (Example 8. Sample JAAS policy file). I have also read that its possible to specify permission via a roles attribute on the action mapping
Problems with tiles...
Hi ppl, Why this isn't rendering? in master.jsp tiles:insert attribute=content-layout tiles:put name=content tiles:getAsString name=item/ /tiles:put /tiles:insert in item.content.jsp (defined for content-layout) tiles:insert attribute=content / The definition used tiles-definitions definition name=master.page template=/tiles/common/master.jsp put name=content-layout value= / /definition definition name=item.page extends=master.page put name=content-layout value=/tiles/common/item.content.jsp / put name=item value= / /definition definition name=start.page extends=item.page put name=item value=/tiles/blank.jsp / /definition /tiles-definitions The /tiles/blank.jsp isn't rendering! Nothing! Neither an error! Any clue anyone? Thanks in advance... Thiago Souza
RE: Problems with tiles...
I'll bet you haven't included the Tiles tag library at the top of your JSP: %@ taglib uri=/WEB-INF/struts-tiles.tld prefix=tiles % -Original Message- From: Thiago Souza [mailto:[EMAIL PROTECTED] Sent: Thursday, June 17, 2004 1:40 PM To: [EMAIL PROTECTED] Subject: Problems with tiles... Hi ppl, Why this isn't rendering? in master.jsp tiles:insert attribute=content-layout tiles:put name=content tiles:getAsString name=item/ /tiles:put /tiles:insert in item.content.jsp (defined for content-layout) tiles:insert attribute=content / The definition used tiles-definitions definition name=master.page template=/tiles/common/master.jsp put name=content-layout value= / /definition definition name=item.page extends=master.page put name=content-layout value=/tiles/common/item.content.jsp / put name=item value= / /definition definition name=start.page extends=item.page put name=item value=/tiles/blank.jsp / /definition /tiles-definitions The /tiles/blank.jsp isn't rendering! Nothing! Neither an error! Any clue anyone? Thanks in advance... Thiago Souza - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Problems with tiles...
It's there! =) The tag is processed... When I see the source in the browser, it shows me an empty page (and yes, there is something written in blank.jsp) ... -Original Message- From: Ricardo Cortes [mailto:[EMAIL PROTECTED] Sent: quinta-feira, 17 de junho de 2004 15:01 To: Struts Users Mailing List Subject: RE: Problems with tiles... I'll bet you haven't included the Tiles tag library at the top of your JSP: %@ taglib uri=/WEB-INF/struts-tiles.tld prefix=tiles % -Original Message- From: Thiago Souza [mailto:[EMAIL PROTECTED] Sent: Thursday, June 17, 2004 1:40 PM To: [EMAIL PROTECTED] Subject: Problems with tiles... Hi ppl, Why this isn't rendering? in master.jsp tiles:insert attribute=content-layout tiles:put name=content tiles:getAsString name=item/ /tiles:put /tiles:insert in item.content.jsp (defined for content-layout) tiles:insert attribute=content / The definition used tiles-definitions definition name=master.page template=/tiles/common/master.jsp put name=content-layout value= / /definition definition name=item.page extends=master.page put name=content-layout value=/tiles/common/item.content.jsp / put name=item value= / /definition definition name=start.page extends=item.page put name=item value=/tiles/blank.jsp / /definition /tiles-definitions The /tiles/blank.jsp isn't rendering! Nothing! Neither an error! Any clue anyone? Thanks in advance... Thiago Souza - 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: Problems with tiles...
It's there! =) The tag is processed... When I see the source in the browser, it shows me an empty page (and yes, there is something written in blank.jsp) ... -Original Message- From: Ricardo Cortes [mailto:[EMAIL PROTECTED] Sent: quinta-feira, 17 de junho de 2004 15:01 To: Struts Users Mailing List Subject: RE: Problems with tiles... I'll bet you haven't included the Tiles tag library at the top of your JSP: %@ taglib uri=/WEB-INF/struts-tiles.tld prefix=tiles % -Original Message- From: Thiago Souza [mailto:[EMAIL PROTECTED] Sent: Thursday, June 17, 2004 1:40 PM To: [EMAIL PROTECTED] Subject: Problems with tiles... Hi ppl, Why this isn't rendering? in master.jsp tiles:insert attribute=content-layout tiles:put name=content tiles:getAsString name=item/ /tiles:put /tiles:insert in item.content.jsp (defined for content-layout) tiles:insert attribute=content / The definition used tiles-definitions definition name=master.page template=/tiles/common/master.jsp put name=content-layout value= / /definition definition name=item.page extends=master.page put name=content-layout value=/tiles/common/item.content.jsp / put name=item value= / /definition definition name=start.page extends=item.page put name=item value=/tiles/blank.jsp / /definition /tiles-definitions The /tiles/blank.jsp isn't rendering! Nothing! Neither an error! Any clue anyone? Thanks in advance... Thiago Souza - 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: Forms/JSP
Any thoughts anybody? - Original Message - From: Chris Cranford [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Thursday, June 17, 2004 12:17 PM Subject: Forms/JSP I have created a form hierarchy as follows: public class CheckboxPagedForm extends ActionForm public class MaintenanceForm extends CheckboxPagedForm I did this because there are form-specific attributes for the maintenance form, but we have multiple forms which are going to need to leverage the paged checkbox form stuff. In the maintenance.jsp I need to open a new window and work with only the data in the base class CheckboxPagedForm. What I'd like to do is have this JSP common so that no matter what extended form calls it, it gets the data, permits the user to make changes to the data and then when the window is closed, the data gets sent back to the maintenanceform with a parameter that tells it to update itself,etc. Right now I had to write my JSP so that I checks like: logic:present name=maintenanceForm .. do maintenance form logic /logic:present logic:present name=searchForm .. do search form logic /logic:present Is there not a way that no matter what the extended form is, since both are checkboxpageform, I can just reference that? Thanks Chris - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Action Mapping in the struts-config.xml When There Is No Form
I often have to call a servlet which extends Action; but, I do not have a form submitted. The action mapping in the struts-config.xml gives me problem when I leave out the 'name' attribute; for example: action roles=administrator,contributor path=/article/Edit parameter=org.MyOrg.MyProj.article.FindByArticle name=articleForm // if this is left out scope=request forward name=success path=.article.Form/ /action I really do not have a form for this action. What should I do? __ Do you Yahoo!? Yahoo! Mail - Helps protect you from nasty viruses. http://promotions.yahoo.com/new_mail - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Theoretical debate
Last night I was Googling for something and I stumbled across the Crysalis framework. I was actualyl intrigued by the underlying premise of it and I wanted to see what others thought about it. In a nutshell and in my own words, Crysalis (http://chrysalis.sourceforge.net/) has the underlying idea that when you develop in most MVC frameworks, Struts chief among them, you are actually doing something unnatural and in a way at odds with basic OOP design. Think about a shopping cart example... If you were going to write that in straight Java, not for the web or anything, how would you model it? Most likely you would have a ShoppingCart class with a number of methods in it, things like addItem(), removeItem(), totalPrice(), etc. In Struts, although you aren't FORCED to, what you GENERALLY do is create three different Action classes like addItemAction, removeItemAction and totalPriceAction, and each is called in response to a form submission. But isn't it kind of odd that your object model isn't following what you probably think in your head is the right way, i.e., one class with multiple related methods? Proper encapsulation and all that jazz, right? Well, Crysalis does just that. It's controller elements are regular Java classes with multiple methods. What you wind up with is something that resembles Remote Procedure Calls instead of numerous servlets as controllers. In other words, you would create the ShoppingCart object just as I described above, with all three methods. Then, when you submit a form, the action is something along the lines of ShoppingCart.addItem.cmd. ShoppingCart is the class to execute, addItem the method and cmd is a suffix to direct the request, just like extensions in your Struts apps map requests to ActionServlet. The elements of the submitted form are treated as the parameters of the method being called, making it rather elegant. I haven't gotten into any real detail on Crysalis, but I was interested in getting other peoples' thoughts on the underlying principal (which I *THINK* I've stated properly!). It was rather interesting to me because I'd never reall considered looking at it that way, and certainly it's not the way you typically approach a Struts-based application. It was also interesting to me because I've for about four years now been preaching here at work that we should write our applications as a collection of services that are executed to form a coherent larger application, which is very much along the lines of this (so I guess I actually HAVE looked at it this way in a sense, but not exactly). Any thoughts? Frank _ Watch the online reality show Mixed Messages with a friend and enter to win a trip to NY http://www.msnmessenger-download.click-url.com/go/onm00200497ave/direct/01/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Theoretical debate
I completely agree with what Crysalis is trying to push, also a framework called VRaptor (vraptor.org) also pushes the same idea of moving away from the procedural weight that Struts promotes. Look at JSF, do you have actions? No, JSF just updates your POJO beans and calls methods on them. Why have an ActionForm or have to create all of these Actions that are simply getter/setter adapters? Please don't be too quick to retort to my supposed anti-struts mindset, but there are other frameworks out there that allow direct interaction with my business objects and don't require a heck of a lot of framework specific coding. --- Example: To have a multi-page form with JSF, I just create a bean that sits in Session scope that has a series of getters and setters. JSF will also allow me to pre-set relationships to other objects at creation time. Then, when I'm ready to submit the multi-page form, I just put in the jsp #{myFormBean.submit}. No action mappings, only a managed bean entry. With Struts, I have to create an ActionForm objects (can't just use a business object I already have), and then create separate Action objects to manipulate that ActionForm. --- -Jacob Hookom -Original Message- From: Frank Zammetti [mailto:[EMAIL PROTECTED] Sent: Thursday, June 17, 2004 2:29 PM To: [EMAIL PROTECTED] Subject: Theoretical debate Last night I was Googling for something and I stumbled across the Crysalis framework. I was actualyl intrigued by the underlying premise of it and I wanted to see what others thought about it. In a nutshell and in my own words, Crysalis (http://chrysalis.sourceforge.net/) has the underlying idea that when you develop in most MVC frameworks, Struts chief among them, you are actually doing something unnatural and in a way at odds with basic OOP design. Think about a shopping cart example... If you were going to write that in straight Java, not for the web or anything, how would you model it? Most likely you would have a ShoppingCart class with a number of methods in it, things like addItem(), removeItem(), totalPrice(), etc. In Struts, although you aren't FORCED to, what you GENERALLY do is create three different Action classes like addItemAction, removeItemAction and totalPriceAction, and each is called in response to a form submission. But isn't it kind of odd that your object model isn't following what you probably think in your head is the right way, i.e., one class with multiple related methods? Proper encapsulation and all that jazz, right? Well, Crysalis does just that. It's controller elements are regular Java classes with multiple methods. What you wind up with is something that resembles Remote Procedure Calls instead of numerous servlets as controllers. In other words, you would create the ShoppingCart object just as I described above, with all three methods. Then, when you submit a form, the action is something along the lines of ShoppingCart.addItem.cmd. ShoppingCart is the class to execute, addItem the method and cmd is a suffix to direct the request, just like extensions in your Struts apps map requests to ActionServlet. The elements of the submitted form are treated as the parameters of the method being called, making it rather elegant. I haven't gotten into any real detail on Crysalis, but I was interested in getting other peoples' thoughts on the underlying principal (which I *THINK* I've stated properly!). It was rather interesting to me because I'd never reall considered looking at it that way, and certainly it's not the way you typically approach a Struts-based application. It was also interesting to me because I've for about four years now been preaching here at work that we should write our applications as a collection of services that are executed to form a coherent larger application, which is very much along the lines of this (so I guess I actually HAVE looked at it this way in a sense, but not exactly). Any thoughts? Frank _ Watch the online reality show Mixed Messages with a friend and enter to win a trip to NY http://www.msnmessenger-download.click-url.com/go/onm00200497ave/direct/01/ - 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: [OT] Soccer portal released goal.com
Brazil? What is Brasil? I think Argentina must be in this site. Simone, I think that the portal should have at least a section of Diego Armando Maradona, who was, is and will be the greatest soccer player of the history! Cheers! Guillermo -Original Message- From: Daniel H. F. e Silva [mailto:[EMAIL PROTECTED] Sent: Jueves, 17 de Junio de 2004 04:49 p.m. To: Struts Users Mailing List Subject: Re: [OT] Soccer portal released goal.com Hi Simone, Good job. Looks a very interesting soccer portal, but i agree with my brazilian mate. Where is all the content deserved by the 5 times world champions? A soccer website is not a real soccer website without content about the best soccer players in the Earth: brazilian players. By the way, i had some problems to navigate at your website using Mozilla 1.6. You told you used M$ stuff at server side. But please, don't forget that client site is diverse. I love Mozilla, and use it all the time. I do wish you didn't design goal.com just for IE users. Regards, Daniel Silva. --- Marcelo Epstein [EMAIL PROTECTED] wrote: I can´t believe, Goal.com don´t talk about the best soccer around the World. I sugest u to write about BRAZILIAN SOCCER. Maybe u will find how many Ronaldo´s we have here! 8-) GOOD JOB, Marcelo - Original Message - From: Andrew Hill [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Thursday, June 17, 2004 11:10 AM Subject: RE: [OT] Soccer portal released goal.com +1 -Original Message- From: McCormack, Chris [mailto:[EMAIL PROTECTED] Sent: Thursday, 17 June 2004 22:13 To: Struts Users Mailing List Subject: RE: [OT] Soccer portal released goal.com I for one appreciate the post Simone. Its a good looking site and its nice to see work that developers have spent time on and are proud of. Good job ! Chris McCormack -Original Message- From: Simone-dev [mailto:[EMAIL PROTECTED] Sent: 17 June 2004 15:02 To: Struts Users Mailing List Subject: Re: [OT] Soccer portal released goal.com I'm just a developer... :-) I did the serverside development and the javascript + dhtml (menu) The rest, desing, css, layout design and so on was developed by a webdesigner I'm working on this engine since november Simone Robert Taylor wrote: Wow! Cool site. Good job. Did you do all page authoring(javascript, css, dhtml, graphics, etc...) or just server side development (architecture, site design/structure, functionality, etc...)? How long did it take to design and implement? robert -Original Message- From: Simone - Dev [mailto:[EMAIL PROTECTED] Sent: Thursday, June 17, 2004 8:25 AM To: 'Struts Users Mailing List' Subject: [OT] Soccer portal released goal.com Hello All, I know this is a lot off-topic, but I'm so proud of the portal I designed and developed that I'd like you all know that it has just been released a worldwide soccer portal named Goal.com (www.goal.com) and that now it's having a lot of news and live results and live netcasting on the european championship 2004. I aplogize for the invasion also becuase it's not developed in Struts, but with ASP.NET but as I said, it took me the last 6 month of work to develop the engine that drives that portal (and all its netwok: all main italian soccer teams). I use Struts in my spare time but in my real work I develop with .NET and C# (not my decision, of course)... but I prefer Struts. Simone - Simone Chiaretta http://www.piyosailing.com/S www.piyosailing.com/S Any sufficiently advanced technology is indistinguishable from magic Life is short, play hard --- -- 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] *** This e-mail and its attachments are confidential and are intended for the above named recipient only. If this has come to you in error, please notify the sender immediately and delete this e-mail from your system. You must take no action based on this, nor must you copy or disclose it or any part of its contents to any person or organisation. Statements and opinions contained in this email may not necessarily represent those of Littlewoods. Please note that e-mail communications may be monitored. The registered office of Littlewoods Limited and its subsidiaries is 100 Old Hall Street, Liverpool, L70 1AB. Registered number of Littlewoods Limited is 262152.
Re: Theoretical debate
In Struts, although you aren't FORCED to, what you GENERALLY do is create three different Action classes like addItemAction, removeItemAction and totalPriceAction, and each is called in response to a form submission. Most (if not all) the Actions in my current application extend LookupDispatchAction in order to help group common methods together. If I was doing a ShoppingCart, I would have a single ShoppingCartAction that contained add(), update(), delete(), as well as any private helper methods. I agree with you that most people do generally split that up into three seperate classes. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Theoretical debate
From: Frank Zammetti [mailto:[EMAIL PROTECTED] Most likely you would have a ShoppingCart class with a number of methods in it, things like addItem(), removeItem(), totalPrice(), etc. I follow this design on my applications, on the *business logic* tier. On that tier (whether I implement it as EJBs or POJOs), I would have an actual business object that would have these methods. I tend to look at Struts as a necessary add-on to the application to give it a web front end. To me, my web application isn't a collection of services that are executed to form a coherent larger application, rather it's just an interface to the actual application that runs on the server. --- Hookom, Jacob [EMAIL PROTECTED] wrote: With Struts, I have to create an ActionForm objects (can't just use a business object I already have), and then create separate Action objects to Because of the way I view my app, I have no problem separating my view of the objects in my interface and my app's business objects. I fully understand the need for separate ActionForm objects (users work with untyped string values, my business tier works with typed values, the Action object goes in between). Still, I don't like having to create string-ified counterparts of my business objects. That's how the FormDef project began ( http://www.rabago.net/struts/formdef and http://formdef.dev.java.net/ ). I haven't tried JSF yet, but I don't think I want my business tier objects contaminated with presentation-tier specifics, such as the callback methods JSF needs on their managed beans. Any thoughts? Frank Hubert __ Do you Yahoo!? Yahoo! Mail is new and improved - Check it out! http://promotions.yahoo.com/new_mail - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: getMessageResources in webLogic?
Sure. This is some code that's executed at startup, in a ServletContextListener: import org.apache.struts.util.MessageResources; MessageResources testResources = MessageResources.getMessageResources(com.mycompany.www.config.TestResources ); String message = testResources.getMessage(testMessage); On both WebLogic and Tomcat, testResources evaluates to a valid PropertyMessageResources object. But on Tomcat, message will have a value, and on WebLogic it will be null. Inside the WAR, there is a file: WEB-INF/src/com/mycompany/www/config/TestResources_en_US.properties which contains the line: testMessage=yes Thanks, Jacob - Original Message - From: Karr, David [EMAIL PROTECTED] Newsgroups: gmane.comp.jakarta.struts.user Sent: Thursday, June 17, 2004 10:54 AM Subject: RE: getMessageResources in webLogic? Without more information, it's unlikely anyone could see what is going wrong here. Show us the structure of your WAR, and that might help. -Original Message- From: news [mailto:[EMAIL PROTECTED] On Behalf Of Jacob Weber In my Struts app, I need to get data from a resource bundle. So I make a call to: MessageResources.getMessageResources(myFile) The file name is actually myFile_en_US.properties, and when I run this code on Tomcat, it's able to find the right file. But when I run the same code on WebLogic, it doesn't find it. It only finds the file if it's called myFile.properties, without the locale extension. Does anyone know why? Many thanks, Jacob - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Theoretical debate
+1 I personally do not find what you have to or can do with Struts much of a problem at all. I like the freedom the separation gives me. It is rather like the defensive idea of Aaron Nitzovitch in chess. If you just defend a square or piece as much as required, all the defensive pieces are tied down. However, if you add an additional defender, then all your pieces incorporated into the defense are free to abandon that task and a very interesting and deep interchange of offense and defense results. The separation of functions in Struts does this for me. I think I prefer the Struts approach to the JSF approach as well, although like everyone else, I would like and try to achieve a hybrid for my purposes. Michael At 01:29 PM 6/17/2004, Hubert Rabago wrote: From: Frank Zammetti [mailto:[EMAIL PROTECTED] Most likely you would have a ShoppingCart class with a number of methods in it, things like addItem(), removeItem(), totalPrice(), etc. I follow this design on my applications, on the *business logic* tier. On that tier (whether I implement it as EJBs or POJOs), I would have an actual business object that would have these methods. I tend to look at Struts as a necessary add-on to the application to give it a web front end. To me, my web application isn't a collection of services that are executed to form a coherent larger application, rather it's just an interface to the actual application that runs on the server. --- Hookom, Jacob [EMAIL PROTECTED] wrote: With Struts, I have to create an ActionForm objects (can't just use a business object I already have), and then create separate Action objects to Because of the way I view my app, I have no problem separating my view of the objects in my interface and my app's business objects. I fully understand the need for separate ActionForm objects (users work with untyped string values, my business tier works with typed values, the Action object goes in between). Still, I don't like having to create string-ified counterparts of my business objects. That's how the FormDef project began ( http://www.rabago.net/struts/formdef and http://formdef.dev.java.net/ ). I haven't tried JSF yet, but I don't think I want my business tier objects contaminated with presentation-tier specifics, such as the callback methods JSF needs on their managed beans. Any thoughts? Frank Hubert __ Do you Yahoo!? Yahoo! Mail is new and improved - Check it out! http://promotions.yahoo.com/new_mail - 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: Theoretical debate
I think struts' concept of separating your actions from your data is admirable and should be followed. The concept of your value/transfer objects (basically the form) also having business logic sounds acceptable at first but rapidly becomes a nightmare when you try to use the same value/transfer objects in multiple processes. I think it's a generally accepted practice that separating data from logic is a Good Thing(tm). BAL From: Hookom, Jacob [EMAIL PROTECTED] To: 'Struts Users Mailing List' [EMAIL PROTECTED] Subject: RE: Theoretical debate Date: Thu, 17 Jun 2004 14:57:31 -0500 I completely agree with what Crysalis is trying to push, also a framework called VRaptor (vraptor.org) also pushes the same idea of moving away from the procedural weight that Struts promotes. Look at JSF, do you have actions? No, JSF just updates your POJO beans and calls methods on them. Why have an ActionForm or have to create all of these Actions that are simply getter/setter adapters? Please don't be too quick to retort to my supposed anti-struts mindset, but there are other frameworks out there that allow direct interaction with my business objects and don't require a heck of a lot of framework specific coding. --- Example: To have a multi-page form with JSF, I just create a bean that sits in Session scope that has a series of getters and setters. JSF will also allow me to pre-set relationships to other objects at creation time. Then, when I'm ready to submit the multi-page form, I just put in the jsp #{myFormBean.submit}. No action mappings, only a managed bean entry. With Struts, I have to create an ActionForm objects (can't just use a business object I already have), and then create separate Action objects to manipulate that ActionForm. --- -Jacob Hookom -Original Message- From: Frank Zammetti [mailto:[EMAIL PROTECTED] Sent: Thursday, June 17, 2004 2:29 PM To: [EMAIL PROTECTED] Subject: Theoretical debate Last night I was Googling for something and I stumbled across the Crysalis framework. I was actualyl intrigued by the underlying premise of it and I wanted to see what others thought about it. In a nutshell and in my own words, Crysalis (http://chrysalis.sourceforge.net/) has the underlying idea that when you develop in most MVC frameworks, Struts chief among them, you are actually doing something unnatural and in a way at odds with basic OOP design. Think about a shopping cart example... If you were going to write that in straight Java, not for the web or anything, how would you model it? Most likely you would have a ShoppingCart class with a number of methods in it, things like addItem(), removeItem(), totalPrice(), etc. In Struts, although you aren't FORCED to, what you GENERALLY do is create three different Action classes like addItemAction, removeItemAction and totalPriceAction, and each is called in response to a form submission. But isn't it kind of odd that your object model isn't following what you probably think in your head is the right way, i.e., one class with multiple related methods? Proper encapsulation and all that jazz, right? Well, Crysalis does just that. It's controller elements are regular Java classes with multiple methods. What you wind up with is something that resembles Remote Procedure Calls instead of numerous servlets as controllers. In other words, you would create the ShoppingCart object just as I described above, with all three methods. Then, when you submit a form, the action is something along the lines of ShoppingCart.addItem.cmd. ShoppingCart is the class to execute, addItem the method and cmd is a suffix to direct the request, just like extensions in your Struts apps map requests to ActionServlet. The elements of the submitted form are treated as the parameters of the method being called, making it rather elegant. I haven't gotten into any real detail on Crysalis, but I was interested in getting other peoples' thoughts on the underlying principal (which I *THINK* I've stated properly!). It was rather interesting to me because I'd never reall considered looking at it that way, and certainly it's not the way you typically approach a Struts-based application. It was also interesting to me because I've for about four years now been preaching here at work that we should write our applications as a collection of services that are executed to form a coherent larger application, which is very much along the lines of this (so I guess I actually HAVE looked at it this way in a sense, but not exactly). Any thoughts? Frank _ Watch the online reality show Mixed Messages with a friend and enter to win a trip to NY http://www.msnmessenger-download.click-url.com/go/onm00200497ave/direct/01/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Bug in c:choose when embedding another c:choose?
c:choose tags are not allowed to be nested per the JSTL spec. Instead, use the logic capabilities of EL in the test. c:choose can only contain one or more when tags and, optionally, an otherwise tag. Bill Siggelkow Konrad wrote: Hello. I'm using standard-1.0.4.jar taglib and was wondering if there's a bug when trying to use a c:choose tag inside of another c:choose tag? The following is causing an error in my Struts application: c:choose c:when test={!empty resultsList} Some content... c:choose c:when test=${hasMultipleLocations} (Multiple locations) /c:when c:otherwise c:out value=${primaryLocation}/ /c:otherwise /c:choose More content... /c:when c:otherwise No results. /c:otherwise /c:choose The strange thing is that I'm not getting any detailed JSP error information and the StrutsAction is immediately throwing an Exception (i.e. the first line of code in the Action is not even executed, which leads me to suspect it is a JSP/Taglib issue). When I remove internal c:choose logic and replace it with two c:if tags, it works fine. Has anyone else experienced this? Also, is there a page that lists what was fixed in standard-1.0.5? Thank you very much. __ Do you Yahoo!? Yahoo! Mail is new and improved - Check it out! http://promotions.yahoo.com/new_mail - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Theoretical debate
In Struts, although you aren't FORCED to, what you GENERALLY do is create three different Action classes like addItemAction, removeItemAction and totalPriceAction, and each is called in response to a form submission. But isn't it kind of odd that your object model isn't following what you probably think in your head is the right way, i.e., one class with multiple related methods? Proper encapsulation and all that jazz, right? Frank, you could view web application development as event programming just like any other application. There are several layers that have various responsibilities. The call eventually gets to your model where you can use the appropriate OO principles and design strategies. I wouldn't consider the Struts portion the object model, but more of an web presentation layer which utilizes the MVC design pattern in order to communicate with the model and populate and display the appropriate view. I think of an Action as a web event, which can then delegate to a business event which does the actual work (or more appropriately delegates to others...typical management stuff :) ). The business event eventually reports back to the web event which can then report back to the web controller. IMHO, Struts follows solid and proven design patterns. In fact, one could argue that it is very OO, in that it promotes loose coupling with each component being very cohesive. I will admit, it gives you plenty of rope to hang yourself My 2 cents. robert -Original Message- From: Frank Zammetti [mailto:[EMAIL PROTECTED] Sent: Thursday, June 17, 2004 3:29 PM To: [EMAIL PROTECTED] Subject: Theoretical debate Last night I was Googling for something and I stumbled across the Crysalis framework. I was actualyl intrigued by the underlying premise of it and I wanted to see what others thought about it. In a nutshell and in my own words, Crysalis (http://chrysalis.sourceforge.net/) has the underlying idea that when you develop in most MVC frameworks, Struts chief among them, you are actually doing something unnatural and in a way at odds with basic OOP design. Think about a shopping cart example... If you were going to write that in straight Java, not for the web or anything, how would you model it? Most likely you would have a ShoppingCart class with a number of methods in it, things like addItem(), removeItem(), totalPrice(), etc. In Struts, although you aren't FORCED to, what you GENERALLY do is create three different Action classes like addItemAction, removeItemAction and totalPriceAction, and each is called in response to a form submission. But isn't it kind of odd that your object model isn't following what you probably think in your head is the right way, i.e., one class with multiple related methods? Proper encapsulation and all that jazz, right? Well, Crysalis does just that. It's controller elements are regular Java classes with multiple methods. What you wind up with is something that resembles Remote Procedure Calls instead of numerous servlets as controllers. In other words, you would create the ShoppingCart object just as I described above, with all three methods. Then, when you submit a form, the action is something along the lines of ShoppingCart.addItem.cmd. ShoppingCart is the class to execute, addItem the method and cmd is a suffix to direct the request, just like extensions in your Struts apps map requests to ActionServlet. The elements of the submitted form are treated as the parameters of the method being called, making it rather elegant. I haven't gotten into any real detail on Crysalis, but I was interested in getting other peoples' thoughts on the underlying principal (which I *THINK* I've stated properly!). It was rather interesting to me because I'd never reall considered looking at it that way, and certainly it's not the way you typically approach a Struts-based application. It was also interesting to me because I've for about four years now been preaching here at work that we should write our applications as a collection of services that are executed to form a coherent larger application, which is very much along the lines of this (so I guess I actually HAVE looked at it this way in a sense, but not exactly). Any thoughts? Frank _ Watch the online reality show Mixed Messages with a friend and enter to win a trip to NY http://www.msnmessenger-download.click-url.com/go/onm00200497ave/direct/01/ - 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]
bean:message and null or empty keys
I have this problem with bean:message. I would like it to output nothing if the key is null or empty. I tried these 2 forms: bean:message bundle=myBundle name=MyForm property=myProp/ bean-el:message bundle=myBundle key=${MyForm.myProp}/ But I get ???en_US.null??? or ???en_US.??? for these. If I set null=true in my message resources they throw exceptions instead. Also if myProp is an Integer the first form doesn't work because apparently there is no automatic type conversion (why?!?!). Any good workarounds for these problems? I guess I can wrap everything in logic tags, but that makes the page big and clunky (and sometimes I run into the 64k limit). Thanks, Dan - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
tomcat 5 breaks my tiles
Hey all. I'm attempting to upgrade my application to tomcat 5 from tomcat 4.1. Most stuff is working fine, but we have a few places where the tile is defined in tiles-defs.xml as blank, meaning: put name=inHead value =/ This worked fine in tomcat 4, but in the tomcat 5 version, when the jsp page tries to use that part of the tile (tiles:get name=inHead /) it crashes on me. A partial stack trace is below - if anybody really wants the whole thing let me know. The basic error is a string index out of range error, from java.lang.String.substring. Since this worked I always assumed it was somethign that is valid to do in tiles. It makes the tiles-defs file a lot nicer to look at anyways. Is it really something that shouldn't be done? Or is tomcat 5 broken somehow? Thanks in advance, Matt Bathje partial stack trace: 2004-06-17 17:06:21 ApplicationDispatcher[] Servlet.service() for servlet action threw exception java.lang.StringIndexOutOfBoundsException: String index out of range: -1 at java.lang.String.substring(String.java:1438) at java.lang.String.substring(String.java:1411) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:193) at javax.servlet.http.HttpServlet.service(HttpServlet.java:810) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application FilterChain.java:237) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh ain.java:157) at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher. java:703) at org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatch er.java:589) at org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher .java:499) at org.apache.jasper.runtime.JspRuntimeLibrary.include(JspRuntimeLibrary.java:9 66) at org.apache.jasper.runtime.PageContextImpl.include(PageContextImpl.java:581) at org.apache.struts.tiles.TilesUtilImpl.doInclude(TilesUtilImpl.java:142) at org.apache.struts.tiles.TilesUtil.doInclude(TilesUtil.java:178) at org.apache.struts.taglib.tiles.InsertTag.doInclude(InsertTag.java:799) at org.apache.struts.taglib.tiles.InsertTag$InsertHandler.doEndTag(InsertTag.ja va:931) at org.apache.struts.taglib.tiles.InsertTag.doEndTag(InsertTag.java:501) at org.apache.jsp.WEB_002dINF.tiles.public_.layouts.base_jsp._jspx_meth_tiles_g et_0(base_jsp.java:511) at org.apache.jsp.WEB_002dINF.tiles.public_.layouts.base_jsp._jspService(base_j sp.java:162) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: tomcat 5 breaks my tiles
I've been using tiles quite happily with tc5. But i never use get. I always use useAttribute and then just el to display stuff. %@ page isELIgnored=false % %@ taglib uri=/WEB-INF/tlds/struts-tiles.tld prefix=tiles % tiles:useAttribute id=foo name=inHead scope=page / ${foo} could be a solution for you. On 18 Jun 2004, at 00:28, Matt Bathje wrote: Hey all. I'm attempting to upgrade my application to tomcat 5 from tomcat 4.1. Most stuff is working fine, but we have a few places where the tile is defined in tiles-defs.xml as blank, meaning: put name=inHead value =/ This worked fine in tomcat 4, but in the tomcat 5 version, when the jsp page tries to use that part of the tile (tiles:get name=inHead /) it crashes on me. A partial stack trace is below - if anybody really wants the whole thing let me know. The basic error is a string index out of range error, from java.lang.String.substring. Since this worked I always assumed it was somethign that is valid to do in tiles. It makes the tiles-defs file a lot nicer to look at anyways. Is it really something that shouldn't be done? Or is tomcat 5 broken somehow? Thanks in advance, Matt Bathje partial stack trace: 2004-06-17 17:06:21 ApplicationDispatcher[] Servlet.service() for servlet action threw exception java.lang.StringIndexOutOfBoundsException: String index out of range: -1 at java.lang.String.substring(String.java:1438) at java.lang.String.substring(String.java:1411) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:193) at javax.servlet.http.HttpServlet.service(HttpServlet.java:810) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applic ation FilterChain.java:237) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFil terCh ain.java:157) at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispat cher. java:703) at org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDis patch er.java:589) at org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispa tcher .java:499) at org.apache.jasper.runtime.JspRuntimeLibrary.include(JspRuntimeLibrary.j ava:9 66) at org.apache.jasper.runtime.PageContextImpl.include(PageContextImpl.java: 581) at org.apache.struts.tiles.TilesUtilImpl.doInclude(TilesUtilImpl.java: 142) at org.apache.struts.tiles.TilesUtil.doInclude(TilesUtil.java:178) at org.apache.struts.taglib.tiles.InsertTag.doInclude(InsertTag.java:799) at org.apache.struts.taglib.tiles.InsertTag$InsertHandler.doEndTag(InsertT ag.ja va:931) at org.apache.struts.taglib.tiles.InsertTag.doEndTag(InsertTag.java:501) at org.apache.jsp.WEB_002dINF.tiles.public_.layouts.base_jsp._jspx_meth_ti les_g et_0(base_jsp.java:511) at org.apache.jsp.WEB_002dINF.tiles.public_.layouts.base_jsp._jspService(b ase_j sp.java:162) - 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]
R: [OT] Soccer portal released goal.com
Hey guys, I'm just a developer, not the editor of the website :-) Anyway, in a near future they will add more languages Simone - Simone Chiaretta www.piyosailing.com/S Any sufficiently advanced technology is indistinguishable from magic Life is short, play hard -Messaggio originale- Da: Guillermo Meyer [mailto:[EMAIL PROTECTED] Inviato: giovedì 17 giugno 2004 22.00 A: 'Struts Users Mailing List' Oggetto: RE: [OT] Soccer portal released goal.com Brazil? What is Brasil? I think Argentina must be in this site. Simone, I think that the portal should have at least a section of Diego Armando Maradona, who was, is and will be the greatest soccer player of the history! Cheers! Guillermo -Original Message- From: Daniel H. F. e Silva [mailto:[EMAIL PROTECTED] Sent: Jueves, 17 de Junio de 2004 04:49 p.m. To: Struts Users Mailing List Subject: Re: [OT] Soccer portal released goal.com Hi Simone, Good job. Looks a very interesting soccer portal, but i agree with my brazilian mate. Where is all the content deserved by the 5 times world champions? A soccer website is not a real soccer website without content about the best soccer players in the Earth: brazilian players. By the way, i had some problems to navigate at your website using Mozilla 1.6. You told you used M$ stuff at server side. But please, don't forget that client site is diverse. I love Mozilla, and use it all the time. I do wish you didn't design goal.com just for IE users. Regards, Daniel Silva. --- Marcelo Epstein [EMAIL PROTECTED] wrote: I can´t believe, Goal.com don´t talk about the best soccer around the World. I sugest u to write about BRAZILIAN SOCCER. Maybe u will find how many Ronaldo´s we have here! 8-) GOOD JOB, Marcelo - Original Message - From: Andrew Hill [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Thursday, June 17, 2004 11:10 AM Subject: RE: [OT] Soccer portal released goal.com +1 -Original Message- From: McCormack, Chris [mailto:[EMAIL PROTECTED] Sent: Thursday, 17 June 2004 22:13 To: Struts Users Mailing List Subject: RE: [OT] Soccer portal released goal.com I for one appreciate the post Simone. Its a good looking site and its nice to see work that developers have spent time on and are proud of. Good job ! Chris McCormack -Original Message- From: Simone-dev [mailto:[EMAIL PROTECTED] Sent: 17 June 2004 15:02 To: Struts Users Mailing List Subject: Re: [OT] Soccer portal released goal.com I'm just a developer... :-) I did the serverside development and the javascript + dhtml (menu) The rest, desing, css, layout design and so on was developed by a webdesigner I'm working on this engine since november Simone Robert Taylor wrote: Wow! Cool site. Good job. Did you do all page authoring(javascript, css, dhtml, graphics, etc...) or just server side development (architecture, site design/structure, functionality, etc...)? How long did it take to design and implement? robert -Original Message- From: Simone - Dev [mailto:[EMAIL PROTECTED] Sent: Thursday, June 17, 2004 8:25 AM To: 'Struts Users Mailing List' Subject: [OT] Soccer portal released goal.com Hello All, I know this is a lot off-topic, but I'm so proud of the portal I designed and developed that I'd like you all know that it has just been released a worldwide soccer portal named Goal.com (www.goal.com) and that now it's having a lot of news and live results and live netcasting on the european championship 2004. I aplogize for the invasion also becuase it's not developed in Struts, but with ASP.NET but as I said, it took me the last 6 month of work to develop the engine that drives that portal (and all its netwok: all main italian soccer teams). I use Struts in my spare time but in my real work I develop with .NET and C# (not my decision, of course)... but I prefer Struts. Simone - Simone Chiaretta http://www.piyosailing.com/S www.piyosailing.com/S Any sufficiently advanced technology is indistinguishable from magic Life is short, play hard --- -- 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] *** This e-mail and its attachments are confidential and are intended for the above named recipient only. If this
Displaying image data from the database
I've been using a solution that I found by searching the struts user archive to display image data from the database. I've developed a page that displays at most two images on one page (one is referred as the global image and the other the local image in the code shown below). Most of the time the correct images are displayed, however, sometimes the same image is displayed for both global and local but the images stored are actually different. There is an inconsistency. Re-displaying the page sometimes shows the same image and sometimes different images. Any ideas? Here is parts of interface WebDefs: *** public static final String PARAM_IS_GLOBAL_IMAGE = isGlobalImage; public static final String PARAM_GLOBAL_ID = globalId; public static final String PARAM_LOCAL_ID = localId; Here is the main action class:** * public class LoadCampaignImageAction extends LoadImageAction implements WebDefs { /** * @param mapping The ActionMapping used to select this instance * @param form The ActionForm bean for this request * @param request The HTTP request we are processing * @param response The HTTP response we are creating * @return ActionForward * @throws Exception * @see com.ford.focit.web.BaseAction#executeAuthorized(ActionMapping, ActionForm, HttpServletRequest, HttpServletResponse) */ public ActionForward executeAuthorized(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception { trace( -- entered + this.getClass().getName() + .executeAuthorized(mapping, form, request, response)); String isGlobalImageParam = request.getParameter(PARAM_IS_GLOBAL_IMAGE); String globalIdParam = request.getParameter(PARAM_GLOBAL_ID); String localIdParam = request.getParameter(PARAM_LOCAL_ID); ConsumerCampaignImageDTO imageDTO = null; try { ConsumerCampaignService ccsService = new ConsumerCampaignService(super.getIsisUserContext(request)); if (globalIdParam != null) { ConsumerCampaignGlobalPKDTO globalCampaignPK = new ConsumerCampaignGlobalPKDTO(); globalCampaignPK.setGlobalCampaignId(new Integer(globalIdParam)); globalCampaignPK.restoreFromVersionedString(globalCampaignPK.toVersioned String()); ConsumerCampaignGlobalDTO globalDTO = ccsService.getGlobalCampaign(globalCampaignPK); if (isGlobalImageParam.equals(true)) { imageDTO = globalDTO.getGlobalImage(); } else { imageDTO = globalDTO.getMasterLocalRecord().getImage(); } } else if (localIdParam != null isGlobalImageParam.equals(false)) { ConsumerCampaignInfoPKDTO localCampaignPK = new ConsumerCampaignInfoPKDTO(); localCampaignPK.setCampaignId(new Integer(localIdParam)); localCampaignPK.restoreFromVersionedString(localCampaignPK.toVersionedSt ring()); ConsumerCampaignLocalDTO localDTO = ccsService.getLocalCampagin(localCampaignPK); imageDTO = localDTO.getImage(); } } catch (IsisObjectNotFoundException e) { Object[] params = null; if (globalIdParam != null) { warning(this.getClass().getName() + IsisObjectNotFoundException occurred calling ConsumerCampaignService.getGlobalCampaign()); params = new Object[] { getResources(request).getMessage(message.type.campaignGlobal) , globalIdParam }; } else if (localIdParam != null isGlobalImageParam.equals(false)) { warning(this.getClass().getName() + IsisObjectNotFoundException occurred calling ConsumerCampaignService.getLocalCampagin()); params = new Object[] { getResources(request).getMessage(message.type.campaignLocal) , localIdParam }; } ActionErrors actionErrors = new ActionErrors(); handleObjectNotFoundException(request, actionErrors, error.staleDataArg2, params); saveErrors(request, actionErrors); return (mapping.findForward(FORWARD_CAMPAIGN_NOT_FOUND)); } if (imageDTO != null) { super.setImage(imageDTO.getImage()); super.setImageType(imageDTO.getImageType()); } return (super.executeAuthorized(mapping, form, request, response)); } } Here is the
R: [OT] Soccer portal released goal.com
We tested the site with Mozilla, too...(btw I use firefox as default browser) But unfortunately the stats says that 95% of the internet users use IE. So, from a commercial point of view if Mozilla doesn't see all graphic enrichments... The important is that the user can read the contents and navigate the portal Simone - Simone Chiaretta www.piyosailing.com/S Any sufficiently advanced technology is indistinguishable from magic Life is short, play hard -Messaggio originale- Da: Daniel H. F. e Silva [mailto:[EMAIL PROTECTED] Inviato: giovedì 17 giugno 2004 21.49 A: Struts Users Mailing List Oggetto: Re: [OT] Soccer portal released goal.com Hi Simone, Good job. Looks a very interesting soccer portal, but i agree with my brazilian mate. Where is all the content deserved by the 5 times world champions? A soccer website is not a real soccer website without content about the best soccer players in the Earth: brazilian players. By the way, i had some problems to navigate at your website using Mozilla 1.6. You told you used M$ stuff at server side. But please, don't forget that client site is diverse. I love Mozilla, and use it all the time. I do wish you didn't design goal.com just for IE users. Regards, Daniel Silva. --- Marcelo Epstein [EMAIL PROTECTED] wrote: I can´t believe, Goal.com don´t talk about the best soccer around the World. I sugest u to write about BRAZILIAN SOCCER. Maybe u will find how many Ronaldo´s we have here! 8-) GOOD JOB, Marcelo - Original Message - From: Andrew Hill [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Thursday, June 17, 2004 11:10 AM Subject: RE: [OT] Soccer portal released goal.com +1 -Original Message- From: McCormack, Chris [mailto:[EMAIL PROTECTED] Sent: Thursday, 17 June 2004 22:13 To: Struts Users Mailing List Subject: RE: [OT] Soccer portal released goal.com I for one appreciate the post Simone. Its a good looking site and its nice to see work that developers have spent time on and are proud of. Good job ! Chris McCormack -Original Message- From: Simone-dev [mailto:[EMAIL PROTECTED] Sent: 17 June 2004 15:02 To: Struts Users Mailing List Subject: Re: [OT] Soccer portal released goal.com I'm just a developer... :-) I did the serverside development and the javascript + dhtml (menu) The rest, desing, css, layout design and so on was developed by a webdesigner I'm working on this engine since november Simone Robert Taylor wrote: Wow! Cool site. Good job. Did you do all page authoring(javascript, css, dhtml, graphics, etc...) or just server side development (architecture, site design/structure, functionality, etc...)? How long did it take to design and implement? robert -Original Message- From: Simone - Dev [mailto:[EMAIL PROTECTED] Sent: Thursday, June 17, 2004 8:25 AM To: 'Struts Users Mailing List' Subject: [OT] Soccer portal released goal.com Hello All, I know this is a lot off-topic, but I'm so proud of the portal I designed and developed that I'd like you all know that it has just been released a worldwide soccer portal named Goal.com (www.goal.com) and that now it's having a lot of news and live results and live netcasting on the european championship 2004. I aplogize for the invasion also becuase it's not developed in Struts, but with ASP.NET but as I said, it took me the last 6 month of work to develop the engine that drives that portal (and all its netwok: all main italian soccer teams). I use Struts in my spare time but in my real work I develop with .NET and C# (not my decision, of course)... but I prefer Struts. Simone - Simone Chiaretta http://www.piyosailing.com/S www.piyosailing.com/S Any sufficiently advanced technology is indistinguishable from magic Life is short, play hard --- -- 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] *** This e-mail and its attachments are confidential and are intended for the above named recipient only. If this has come to you in error, please notify the sender immediately and delete this e-mail from your system. You must take no action based on this, nor must you copy or disclose it or any part of its contents to any person or organisation. Statements
RE: Displaying image data from the database
Sorry that my last email was badly formatted so I am reposting it again. Hope its more readable. -Original Message- From: Siena, Christina (.) Sent: Thursday, June 17, 2004 7:15 PM To: [EMAIL PROTECTED] Subject: Displaying image data from the database I've been using a solution that I found by searching the struts user archive to display image data from the database. I've developed a page that displays at most two images on one page (one is referred as the global image and the other the local image in the code shown below). Most of the time the correct images are displayed, however, sometimes the same image is displayed for both global and local but the images stored are actually different. There is an inconsistency. Re-displaying the page sometimes shows the same image and sometimes different images. Any ideas? Here is parts of interface WebDefs: public static final String PARAM_IS_GLOBAL_IMAGE = isGlobalImage; public static final String PARAM_GLOBAL_ID = globalId; public static final String PARAM_LOCAL_ID = localId; Here is the main action class:** public class LoadCampaignImageAction extends LoadImageAction implements WebDefs { public ActionForward executeAuthorized(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception { trace( -- entered + this.getClass().getName() + .executeAuthorized(mapping, form, request, response)); String isGlobalImageParam = request.getParameter(PARAM_IS_GLOBAL_IMAGE); String globalIdParam = request.getParameter(PARAM_GLOBAL_ID); String localIdParam = request.getParameter(PARAM_LOCAL_ID); ConsumerCampaignImageDTO imageDTO = null; try { ConsumerCampaignService ccsService = new ConsumerCampaignService(super.getIsisUserContext(request)); if (globalIdParam != null) { ConsumerCampaignGlobalPKDTO globalCampaignPK = new ConsumerCampaignGlobalPKDTO(); globalCampaignPK.setGlobalCampaignId(new Integer(globalIdParam)); globalCampaignPK.restoreFromVersionedString(globalCampaignPK.toVersioned String()); ConsumerCampaignGlobalDTO globalDTO = ccsService.getGlobalCampaign(globalCampaignPK); if (isGlobalImageParam.equals(true)) { imageDTO = globalDTO.getGlobalImage(); } else { imageDTO = globalDTO.getMasterLocalRecord().getImage(); } } else if (localIdParam != null isGlobalImageParam.equals(false)) { ConsumerCampaignInfoPKDTO localCampaignPK = new ConsumerCampaignInfoPKDTO(); localCampaignPK.setCampaignId(new Integer(localIdParam)); localCampaignPK.restoreFromVersionedString(localCampaignPK.toVersionedSt ring()); ConsumerCampaignLocalDTO localDTO = ccsService.getLocalCampagin(localCampaignPK); imageDTO = localDTO.getImage(); } } catch (IsisObjectNotFoundException e) { Object[] params = null; if (globalIdParam != null) { warning(this.getClass().getName() + IsisObjectNotFoundException occurred); params = new Object[] { getResources(request).getMessage(message.type.campaignGlobal) , globalIdParam ; } else if (localIdParam != null isGlobalImageParam.equals(false)) { warning(this.getClass().getName() + IsisObjectNotFoundException occurred); params = new Object[] { getResources(request).getMessage(message.type.campaignLocal) , localIdParam }; } ActionErrors actionErrors = new ActionErrors(); handleObjectNotFoundException(request, actionErrors, error.staleDataArg2, params); saveErrors(request, actionErrors); return (mapping.findForward(FORWARD_CAMPAIGN_NOT_FOUND)); } if (imageDTO != null) { super.setImage(imageDTO.getImage()); super.setImageType(imageDTO.getImageType()); } return (super.executeAuthorized(mapping, form, request, response)); } } Here is the abstract superclass that serves the images:** public abstract class LoadImageAction extends IsisBaseAction { private byte[] image = null; private String imageType = null; public ActionForward executeAuthorized(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception { trace( --
Re: Forms/JSP
I just realized something I could do. The jsp I forward to has a tiles definition like the following: tiles:insert definition=.popupLayout tiles:put name=pageTitle bean:message key=my.message.key.to.page.title/ /tiles:put tiles:put name=formId value=maintenanceForm/ tiles:put name=formAction value=/postaction/ tiles:put name=body value=/pages/test-body.jsp / /tiles:insert The test-body.jsp then has the following statements at the top: bean:define id=formBeantiles:getAsString name=formId//bean:define bean:define id=actionBeantiles:getAsString name=formAction//bean:define Then when I'm working with my form: html:form action=%=actionBean% html:hidden name=%=formBean% property=myField1/ html:text name=%=formBean% property=userName size=25 maxlength=32 / html:submitbean:message key=global.forms.button.submit.label//html:submit /html:form I can also use the statement: c:out value=${formBean}/ Therefore, if I create my action form classes as such: public class CheckboxPagedForm extends ActionForm public class MaintenanceForm extends CheckboxPagedForm I can define multiple action mappings in struts-config.xml like: action path=/maintMfrLookup type=com.setech.catalog.CatalogMaintenanceAction name=maintenanceForm forward name=success path=/pages/catalog/mfrlookup.jsp/ /action action path=/maintMainCategoryLookup type=com.setech.catalog.CatalogMaintenanceAction name=maintenanceForm forward name=success path=/pages/catalog/maincategorieslookup.jsp/ /action Each of the above two JSPs referenced in the forwards would include the same base BODY JSP page, thus when I need to make changes to how these popups work, I only make the change in 1 place and its applicable to all. Another alternative to having multiple action mappings would be to derive my action from a dispatch action instead of an action forward thus giving me only 1 mapping with multiple forwards which may make more sense. Anyone have any thoughts on this approach? - Original Message - From: Linck, Ken [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Thursday, June 17, 2004 3:08 PM Subject: RE: Forms/JSP I have never seen any good strategy crossing oo-concepts like inheritance and user interface patterns. I always end up back at the containment approach(Breaking your interfaces into smallest re-usable pieces). If I had the time I would collaborate with you. If you have some kind of white paper concept already, I will be happy to read it though and provide some feedback. Ken -Original Message- From: mike [mailto:[EMAIL PROTECTED] Sent: Thursday, June 17, 2004 2:46 PM To: Struts Users Mailing List; Struts Users Mailing List Subject: Re: Forms/JSP Hello, Chris, I sent out a note some time back on this saying that I think we should all collaborate and build something this is new on this issue. This is a major recurrent issue. The current solutions all suck to some extent either in bloating the session and creating difficulty with multiple windows, or in requiring too much coding when the MVC structure, which I believe in way deeply, is adhered to strictly. I think something other than the normal scopes for retaining and accessing data is what is required, i.e. something out-of-the-present box. I still think that this is necessary, and if there had been a response of any kind, I would have set about working collaboratively on it. I guess this is a time to reassert the need and to ask if anyone on the list would like to collaborate. I think that someone going off on their own, whjich I will do eventually if no one responds, is less advisable because the collective wisdom of the list is helpful. This is a good issue, I think, for the dev list as well. Specifically on your issue, there is a simple answer depending on what your question is. You can always reference a super class from a subclass, if that is the question. If the question is whether you can reference another instance of the superclass, the answer is that you can if you have parked it somewhere and have access to it. Is this a fair answer, or am I misunderstanding you? Michael At 11:32 AM 6/17/2004, Chris Cranford wrote: Any thoughts anybody? - Original Message - From: Chris Cranford [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Thursday, June 17, 2004 12:17 PM Subject: Forms/JSP I have created a form hierarchy as follows: public class CheckboxPagedForm extends ActionForm public class MaintenanceForm extends CheckboxPagedForm I did this because there are form-specific attributes for the maintenance form, but we have multiple forms which are going to need to leverage the paged checkbox form stuff. In the maintenance.jsp I need to open a new window and work with only the data in the base class CheckboxPagedForm. What I'd like to do
Re: Forms/JSP
I failed to point out the point of all this :-) I could also have a third form: public class SearchForm extends CheckboxPagedForm It too has an action mapping with a forward to its own JSP but that JSP again includes the common JSP body content and uses the define tiles put variables to determine the form bean name, action to forward to, and any other variable values which may change from display-type to display-type while CORE functionality of the page remains in 1 place coded once regardless of the form/action since all forms are derived from a common ActionForm class and that those are the only values being referenced in the CORE functionality of this common JSP. Make sense? - Original Message - From: Chris Cranford [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Thursday, June 17, 2004 9:39 PM Subject: Re: Forms/JSP I just realized something I could do. The jsp I forward to has a tiles definition like the following: tiles:insert definition=.popupLayout tiles:put name=pageTitle bean:message key=my.message.key.to.page.title/ /tiles:put tiles:put name=formId value=maintenanceForm/ tiles:put name=formAction value=/postaction/ tiles:put name=body value=/pages/test-body.jsp / /tiles:insert The test-body.jsp then has the following statements at the top: bean:define id=formBeantiles:getAsString name=formId//bean:define bean:define id=actionBeantiles:getAsString name=formAction//bean:define Then when I'm working with my form: html:form action=%=actionBean% html:hidden name=%=formBean% property=myField1/ html:text name=%=formBean% property=userName size=25 maxlength=32 / html:submitbean:message key=global.forms.button.submit.label//html:submit /html:form I can also use the statement: c:out value=${formBean}/ Therefore, if I create my action form classes as such: public class CheckboxPagedForm extends ActionForm public class MaintenanceForm extends CheckboxPagedForm I can define multiple action mappings in struts-config.xml like: action path=/maintMfrLookup type=com.setech.catalog.CatalogMaintenanceAction name=maintenanceForm forward name=success path=/pages/catalog/mfrlookup.jsp/ /action action path=/maintMainCategoryLookup type=com.setech.catalog.CatalogMaintenanceAction name=maintenanceForm forward name=success path=/pages/catalog/maincategorieslookup.jsp/ /action Each of the above two JSPs referenced in the forwards would include the same base BODY JSP page, thus when I need to make changes to how these popups work, I only make the change in 1 place and its applicable to all. Another alternative to having multiple action mappings would be to derive my action from a dispatch action instead of an action forward thus giving me only 1 mapping with multiple forwards which may make more sense. Anyone have any thoughts on this approach? - Original Message - From: Linck, Ken [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Thursday, June 17, 2004 3:08 PM Subject: RE: Forms/JSP I have never seen any good strategy crossing oo-concepts like inheritance and user interface patterns. I always end up back at the containment approach(Breaking your interfaces into smallest re-usable pieces). If I had the time I would collaborate with you. If you have some kind of white paper concept already, I will be happy to read it though and provide some feedback. Ken -Original Message- From: mike [mailto:[EMAIL PROTECTED] Sent: Thursday, June 17, 2004 2:46 PM To: Struts Users Mailing List; Struts Users Mailing List Subject: Re: Forms/JSP Hello, Chris, I sent out a note some time back on this saying that I think we should all collaborate and build something this is new on this issue. This is a major recurrent issue. The current solutions all suck to some extent either in bloating the session and creating difficulty with multiple windows, or in requiring too much coding when the MVC structure, which I believe in way deeply, is adhered to strictly. I think something other than the normal scopes for retaining and accessing data is what is required, i.e. something out-of-the-present box. I still think that this is necessary, and if there had been a response of any kind, I would have set about working collaboratively on it. I guess this is a time to reassert the need and to ask if anyone on the list would like to collaborate. I think that someone going off on their own, whjich I will do eventually if no one responds, is less advisable because the collective wisdom of the list is helpful. This is a good issue, I think, for the dev list as well. Specifically on your issue, there is a simple answer depending on what your question is. You can always reference a super class from a subclass, if that
RE: Theoretical debate
Hi All, My understanding is JSF is nothing but an improved implementation of Struts' philosophy where all Struts'' internals are made transparent to the end user. So what end user gets is - the same functionality of Struts but with lesser coding. In that way I find JSF to be logical extension of Struts. Please rectify me if my high level understanding is wrong. Regards, Sourav -Original Message- From: Hookom, Jacob [mailto:[EMAIL PROTECTED] Sent: Friday, June 18, 2004 1:28 AM To: 'Struts Users Mailing List' Subject: RE: Theoretical debate I completely agree with what Crysalis is trying to push, also a framework called VRaptor (vraptor.org) also pushes the same idea of moving away from the procedural weight that Struts promotes. Look at JSF, do you have actions? No, JSF just updates your POJO beans and calls methods on them. Why have an ActionForm or have to create all of these Actions that are simply getter/setter adapters? Please don't be too quick to retort to my supposed anti-struts mindset, but there are other frameworks out there that allow direct interaction with my business objects and don't require a heck of a lot of framework specific coding. --- Example: To have a multi-page form with JSF, I just create a bean that sits in Session scope that has a series of getters and setters. JSF will also allow me to pre-set relationships to other objects at creation time. Then, when I'm ready to submit the multi-page form, I just put in the jsp #{myFormBean.submit}. No action mappings, only a managed bean entry. With Struts, I have to create an ActionForm objects (can't just use a business object I already have), and then create separate Action objects to manipulate that ActionForm. --- -Jacob Hookom -Original Message- From: Frank Zammetti [mailto:[EMAIL PROTECTED] Sent: Thursday, June 17, 2004 2:29 PM To: [EMAIL PROTECTED] Subject: Theoretical debate Last night I was Googling for something and I stumbled across the Crysalis framework. I was actualyl intrigued by the underlying premise of it and I wanted to see what others thought about it. In a nutshell and in my own words, Crysalis (http://chrysalis.sourceforge.net/) has the underlying idea that when you develop in most MVC frameworks, Struts chief among them, you are actually doing something unnatural and in a way at odds with basic OOP design. Think about a shopping cart example... If you were going to write that in straight Java, not for the web or anything, how would you model it? Most likely you would have a ShoppingCart class with a number of methods in it, things like addItem(), removeItem(), totalPrice(), etc. In Struts, although you aren't FORCED to, what you GENERALLY do is create three different Action classes like addItemAction, removeItemAction and totalPriceAction, and each is called in response to a form submission. But isn't it kind of odd that your object model isn't following what you probably think in your head is the right way, i.e., one class with multiple related methods? Proper encapsulation and all that jazz, right? Well, Crysalis does just that. It's controller elements are regular Java classes with multiple methods. What you wind up with is something that resembles Remote Procedure Calls instead of numerous servlets as controllers. In other words, you would create the ShoppingCart object just as I described above, with all three methods. Then, when you submit a form, the action is something along the lines of ShoppingCart.addItem.cmd. ShoppingCart is the class to execute, addItem the method and cmd is a suffix to direct the request, just like extensions in your Struts apps map requests to ActionServlet. The elements of the submitted form are treated as the parameters of the method being called, making it rather elegant. I haven't gotten into any real detail on Crysalis, but I was interested in getting other peoples' thoughts on the underlying principal (which I *THINK* I've stated properly!). It was rather interesting to me because I'd never reall considered looking at it that way, and certainly it's not the way you typically approach a Struts-based application. It was also interesting to me because I've for about four years now been preaching here at work that we should write our applications as a collection of services that are executed to form a coherent larger application, which is very much along the lines of this (so I guess I actually HAVE looked at it this way in a sense, but not exactly). Any thoughts? Frank _ Watch the online reality show Mixed Messages with a friend and enter to win a trip to NY http://www.msnmessenger-download.click-url.com/go/onm00200497ave/direct/ 01/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Theoretical debate
Hi, This is a very good detail explanation given by Hans Bergsten Looking through all the other threads dealing with this question, I see that most of the points have already been mentioned but let's see if I can give you a more conclusive answer. I describe this in more detail in the book, but my take on this is that Struts and JSF are focused on different parts of the application. They also overlap in some areas, however, which is probably the cause for this endless discussion. I refer to Struts as an application framework. It's main goal in life is to hand off the processing of a request to code registered for the task indicated by the URI, and then hand off the response generation to another piece of code registered under a name returned by the request processing piece of code. Struts doesn't care much about how the request is processed or how the response is generated. Typically JSP is used to generate the response, and if so, there are tag libraries that can help, but you can use any template technology you like, e.g., Velocity. I refer to JSF as a UI framework. It's focus is on user interface components, which are bound directly to business logic properties holding their values. A request is processed through these components with the help of other well-defined objects attached to the component. For instance, an input component reads its value from the request, converts it to the business logic data type by calling an attached converter, validates it by calling an attached validator, and if everything is okay, sets the business logic property bound to the component to the new value. A command component looks for a marker in the request that tells it if it triggered this request, and if so, queues an event. An event listener bound to the command component handles the event when all components have processed their input, typically by calling business logic code, and may return an outcome mapped to a view ID to tell JSF to use a different set of components to render the response. The response is generated by the components, or more commonly, by an attached renderer. So JSF hides a lot of the HTTP details and let you develop application code that's focused on the business objective rather that fiddling around with details that add no value to the application. More importantly, a JSF component handles both output and input. For instance, an date input component can let the user input the date by selecting a year, a month and a day from three separate selection lists. Because it knows this, it can correctly read the three input values, merge them and convert the value to a java.util.Date object and update the business logic with this Date object. Struts, on the other hand, may provide a JSP tag that generates the three selection elements, but your application code must know about it and get all three values from the request. The overlap is in validation and navigation. JSF provides just the basics for component level validation out-of-the box, while Struts offers a more sophisticated validation mechanism. I don't think the functional differences in navigation are so big, rather different because of differences between the framework. The important point, though, is that you can plug in custom validation and navigation support in JSF if the defaults aren't good enough for your application. So, that leaves us with the big question: which should I use? My standard answer is that for an existing Struts application, if you want to migrate to JSF for the user interface, it may be a good idea to do it piece by piece with the help of the Struts-JSF integration library if the application is big and complex. If it's small, it's pretty straight forward to migrate all of it to JSF in one shot. But first you need to ask yourself if migrating is the right thing to do. For a complex user interface, the answer is probably yes (at least if you're still making user interface changes now and then). For an application with a simple user interface (e.g., mostly simple dynamic output rather than a lot of complex input), or an application that's rarely changed, the answer is probably no. For a new application, JSF would be my first choice if the user interface is complex, or plain JSP or some other template technology if the user interface is simple. If there are Struts features you can't live without, or don't want to implement as JSF plug-ins, I would take a look at the Struts-JSF integration library and consider using both. Regards Kamakshya Prasad Mishra Sourav, you might know me -Original Message- From: souravm [mailto:[EMAIL PROTECTED] Sent: Friday, June 18, 2004 11:56 AM To: Struts Users Mailing List Subject: RE: Theoretical debate Hi All, My understanding is JSF is nothing but an improved implementation of Struts' philosophy where all Struts'' internals are made transparent to the end user. So what end user gets is - the same functionality of Struts but with lesser coding. In that way I find
RE: Theoretical debate
There is a LOT MORE to JSF than that. The event structure is important. At 07:56 PM 6/17/2004, souravm wrote: Hi All, My understanding is JSF is nothing but an improved implementation of Struts' philosophy where all Struts'' internals are made transparent to the end user. So what end user gets is - the same functionality of Struts but with lesser coding. In that way I find JSF to be logical extension of Struts. Please rectify me if my high level understanding is wrong. Regards, Sourav -Original Message- From: Hookom, Jacob [mailto:[EMAIL PROTECTED] Sent: Friday, June 18, 2004 1:28 AM To: 'Struts Users Mailing List' Subject: RE: Theoretical debate I completely agree with what Crysalis is trying to push, also a framework called VRaptor (vraptor.org) also pushes the same idea of moving away from the procedural weight that Struts promotes. Look at JSF, do you have actions? No, JSF just updates your POJO beans and calls methods on them. Why have an ActionForm or have to create all of these Actions that are simply getter/setter adapters? Please don't be too quick to retort to my supposed anti-struts mindset, but there are other frameworks out there that allow direct interaction with my business objects and don't require a heck of a lot of framework specific coding. --- Example: To have a multi-page form with JSF, I just create a bean that sits in Session scope that has a series of getters and setters. JSF will also allow me to pre-set relationships to other objects at creation time. Then, when I'm ready to submit the multi-page form, I just put in the jsp #{myFormBean.submit}. No action mappings, only a managed bean entry. With Struts, I have to create an ActionForm objects (can't just use a business object I already have), and then create separate Action objects to manipulate that ActionForm. --- -Jacob Hookom -Original Message- From: Frank Zammetti [mailto:[EMAIL PROTECTED] Sent: Thursday, June 17, 2004 2:29 PM To: [EMAIL PROTECTED] Subject: Theoretical debate Last night I was Googling for something and I stumbled across the Crysalis framework. I was actualyl intrigued by the underlying premise of it and I wanted to see what others thought about it. In a nutshell and in my own words, Crysalis (http://chrysalis.sourceforge.net/) has the underlying idea that when you develop in most MVC frameworks, Struts chief among them, you are actually doing something unnatural and in a way at odds with basic OOP design. Think about a shopping cart example... If you were going to write that in straight Java, not for the web or anything, how would you model it? Most likely you would have a ShoppingCart class with a number of methods in it, things like addItem(), removeItem(), totalPrice(), etc. In Struts, although you aren't FORCED to, what you GENERALLY do is create three different Action classes like addItemAction, removeItemAction and totalPriceAction, and each is called in response to a form submission. But isn't it kind of odd that your object model isn't following what you probably think in your head is the right way, i.e., one class with multiple related methods? Proper encapsulation and all that jazz, right? Well, Crysalis does just that. It's controller elements are regular Java classes with multiple methods. What you wind up with is something that resembles Remote Procedure Calls instead of numerous servlets as controllers. In other words, you would create the ShoppingCart object just as I described above, with all three methods. Then, when you submit a form, the action is something along the lines of ShoppingCart.addItem.cmd. ShoppingCart is the class to execute, addItem the method and cmd is a suffix to direct the request, just like extensions in your Struts apps map requests to ActionServlet. The elements of the submitted form are treated as the parameters of the method being called, making it rather elegant. I haven't gotten into any real detail on Crysalis, but I was interested in getting other peoples' thoughts on the underlying principal (which I *THINK* I've stated properly!). It was rather interesting to me because I'd never reall considered looking at it that way, and certainly it's not the way you typically approach a Struts-based application. It was also interesting to me because I've for about four years now been preaching here at work that we should write our applications as a collection of services that are executed to form a coherent larger application, which is very much along the lines of this (so I guess I actually HAVE looked at it this way in a sense, but not exactly). Any thoughts? Frank _ Watch the online reality show Mixed Messages with a friend and enter to win a trip to NY http://www.msnmessenger-download.click-url.com/go/onm00200497ave/direct/ 01/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: