Bean formatting
Hi everybody, I am new to Struts 1.1, so I have a few questions about property formatting (I didn't find any answer in the list archives). 1) In the ActionForm, the bean properties should be String, it will avoid you formatting problems (especially with dates, if you want to use the html:text tag). Right ? NB: I know about the formatting capabilities of the JSTL taglib, and of the bean:write tag, but it seems that you have no way of formatting in the html:text tag. 2) As my business objects contain all kinds of types (double, long, java.util.Date, etc...), I need a way to transfer the content of one bean to another, in both directions: ActionForm (contains only String) = BusinessBean (contains all kinds of types) I think the right place to do the tranfer is in the Action classes. Right ? 3) I have seen that there are convert utils in the common-bean jar, and I have seen that the BeanUtils.copyProperties( ) method seems to answer my needs, but I couldn't make it work the way I want: when I want to tranfer ActionForm = BusinessBean, the methods uses only the StringConverter (since the ActionForm contains only Strings), therefore I can't precise different patterns. I would like to tell the method: the pattern for the dates is 'dd/MM/', the pattern for the doubles is '#.00', etc..., but the StringConverter knows only one pattern when you register it. Do I have to code my own StringConverter ? Thanks in advance, Marc. ___ Do You Yahoo!? -- Une adresse @yahoo.fr gratuite et en français ! Yahoo! Mail : http://fr.mail.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
MVC and security
Hi everybody, I have checked the archives and I could not find the answer to my question, so here it comes :-) I have programmed an extension to the Struts 1.0.2 taglibs, allowing to change the look of the JSP pages according to the profile of the users. As I didn't know of struts-layout, I did it by hand. I would like to know if my implementation is J2EE compliant ? (I really really need it, plase) - some tags (html:html, html:text...) have now an additional property, componentCode. html:html componentCode=anId - the users have all a profile, stored in a database. ie. in the database, you have the list of the users of the application, linked to their profile. A user can be, for example, an admin, a standard... - in the database, I store the list of the componentCodes of my application. I link these codes to the profiles, in order to give rights to the user. For example, an admin user can be allowed to write into the component theTextArea. If theTextArea is an html:text, you would have in the JSP html:text componentCode=theTextArea If the user is an admin, let's say he has the write right for theTextArea; the tag will display itself as an input type=text If the user is a standard, let's say he has the readonly right for theTextArea; the tag will display itself as a static table. NB: according to what I have read in the threads, there may have been better to do that, the only thing I want to know is if I am J2EE compliant, and if I respect the MVC pattern. Thanks in advance, Marc. ___ Do You Yahoo!? -- Une adresse @yahoo.fr gratuite et en français ! Yahoo! Mail : http://fr.mail.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
About the checkLogonTag of the example application
Hi everybody, The checkLogonTag of the Struts application checks if the user has logged in the application before displaying a JSP page. Therefore it manages a part of the security of the application. I would like to know if this tag is a good practice ? If it can be used in a real world J2EE application ? If it is J2EE compliant and MVC compliant ? Thanks in advance, Marc. ___ Do You Yahoo!? -- Une adresse @yahoo.fr gratuite et en français ! Yahoo! Mail : http://fr.mail.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: About the checkLogonTag of the example application
Is it allowed to contain something like if the user has the rights to see some data, he can see it ? NB: I have extended the html:text, html:textarea and html:link tags to manage that kind of things. Marc. --- David Graham [EMAIL PROTECTED] a écrit : The view should not contain *business* logic but it's perfectly reasonable to contain view logic. Something like: if accounts 10 display them in green else display in red. David From: A Stephen [EMAIL PROTECTED] Reply-To: Struts Users Mailing List [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Subject: Re: About the checkLogonTag of the example application Date: Thu, 3 Apr 2003 08:47:17 -0800 I agree with David. The view layer should not perform authentication logic, IMO the view layer should not contain *any* logic [maybe I live in a fantasy world :-)]. -S - Original Message - From: David Graham [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Thursday, April 03, 2003 7:11 AM Subject: Re: About the checkLogonTag of the example application IMO, it is *not* a good practice. The view layer should not perform authentication logic. This should be placed in a Filter or a base Action method that secured actions call before executing. It's there as an example of using application specific custom tags with Struts tags. David From: Eyrignoux Marc [EMAIL PROTECTED] Reply-To: Struts Users Mailing List [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: About the checkLogonTag of the example application Date: Thu, 3 Apr 2003 17:08:52 +0200 (CEST) Hi everybody, The checkLogonTag of the Struts application checks if the user has logged in the application before displaying a JSP page. Therefore it manages a part of the security of the application. I would like to know if this tag is a good practice ? If it can be used in a real world J2EE application ? If it is J2EE compliant and MVC compliant ? Thanks in advance, Marc. ___ Do You Yahoo!? -- Une adresse @yahoo.fr gratuite et en français ! Yahoo! Mail : http://fr.mail.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] _ Tired of spam? Get advanced junk mail protection with MSN 8. http://join.msn.com/?page=features/junkmail - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.463 / Virus Database: 262 - Release Date: 3/17/2003 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] _ Add photos to your messages with MSN 8. Get 2 months FREE*. http://join.msn.com/?page=features/featuredemail - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] ___ Do You Yahoo!? -- Une adresse @yahoo.fr gratuite et en français ! Yahoo! Mail : http://fr.mail.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]