Re: Tiles and ActionForm
Hello Roland, I guess the problem is this line: input=/layout/page.do in your action mapping. Did you define this action? -- Best regards, Dirk Markert -- To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org
Re[2]: Tiles and StrutsAction
Hello Chris, look here for your first question (chapter 5.2): http://www.lifl.fr/~dumoulin/tiles/tilesAdvancedFeatures.pdf -- Best regards, Dirk Markert -- To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org
Re: [REMINDER] --- Struts Nightly and 1.1B1 1.1B2 users
James Mitchell wrote: The only tests that are failing are in Tomcat 3.2 (but I'm hot the trail) Up to this point the 'folk lore' was that it was a bug in TC 3.2. So you think it might be in Struts/Commons code, or possible to work around it ? Give the Man a Cigar !!! -Rob -- To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org
how to delete ActionForm ?
I got an AddRecord.jsp, AddRecordAction and AddRecordForm and last but not least an ShowAddedRecord.jsp that displays the record that was added. When I added a new record to database, I want to forward to the same jsp, AddRecord.jsp, so that the user can add further records. The problem now is that a) If I set this Action to scope=request, I can't redisplay the record if I set it to scope=session, b)when I forward to the same page again, AddRecord.jsp all field are filled witht the values of the old record. c) When I set value of the form to value= it works, but when an error occurrs and the validate method gets called, all fields are left blank instead of filled. d) redirecting neither helped, because I am not using an action on the last page, just a link to the first page. Have you got a better solution ? Someone suggested to delete the form, but I don't know how to do this / guess it won't work / or wouldn't be following the mvc design to delete the form on jsp. thx in advance, marcus -- To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org
Re: java.util.Date
EB from javadoc on SimpleDateFormat: Synchronization EB Date formats are not synchronized. It is recommended to create EB separate format instances for each thread. If multiple threads access EB a format concurrently, it must be synchronized externally. EB ... so your concern is quite valid ... kind of. The time I could see EB a problem arising would be when you are *changing* the format. That's exactly as I understood javadoc. *formats* are not synchronized. Since format is applyed in static code I suggested to move SimpleDateFormat creation there. Seems I was wrong. That's javadoc ambiguously. Sorry all guys for confusing you. -- Max Kutny -- To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org
Re: Tiles and ActionForm
Ouch, I missed a char in the name :-( I'm sorry for wasting your time on a typo. Regards Roland - Original Message - From: Postfach 4711 [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Thursday, November 07, 2002 9:02 AM Subject: Re: Tiles and ActionForm Hello Roland, I guess the problem is this line: input=/layout/page.do in your action mapping. Did you define this action? -- Best regards, Dirk Markert -- To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org -- To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org
needing multiple browser threads on macs
We have an app that needs to allow a user to open multiple web browser windows and maintain separate threads for each. I did a quick search and came up with the threads below, including some untested sample code using filters with servlet-spec 2.3. The Joy of File : New Window [URLs]: http://marc.theaimsgroup.com/?l=tomcat-userm=98696145121079w=2 The Joy of File : New Window [window names and custom sessions]: http://marc.theaimsgroup.com/?l=struts-userm=98699875015552w=2 The Joy of File : New Window [hidden variables]: http://marc.theaimsgroup.com/?l=tomcat-userm=98707711606424w=2 The Joy of File : New Window ... alternate approach [flow control] http://marc.theaimsgroup.com/?l=struts-userm=98700070023308w=2 session ids cont...[re-writing is not enough] http://marc.theaimsgroup.com/?l=struts-userm=98104624500940w=2 Multiple browser windows, different logical sessions [filters and sub-sessions] http://marc.theaimsgroup.com/?l=struts-userm=102870589425513w=2 Multiple browser windows, different logical sessions [putting all the above together to make filters and sub-sessions work, mention of clustering issues, some sample source] http://marc.theaimsgroup.com/?l=struts-userm=102875101210735w=2 Two questions -- Does struts yet have anything to reduce the coding load for this? Is anyone willing to share their code? And do the above posts pretty much cover the issues? -- Joel Rees [EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org
How to forward from a struts form to a login dialog ?
Hi, in a struts form I want to check whether to user has already logged in. If not, instead of showing the form I want to forward the user to a login dialog and he must log in. After the user logged in, I want him to come back to the form and I have to restore the original parameters of the form. What is the best solution? Zsolt -- To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org
Re: Websphere Application Server 4.01 to 4.04 for AIX
Hi Rodney I am trying to deploy on WebSphere 4.0.1 after successfully deploying the same application on WebSphere 4.0.3 but I am getting parser exceptions. You mentioned replacing the Xalan and Xerces classes. Could you please outline how you did this ie: for the whole App Server or just for your individual app ? thanks very much Aisling Yeo, Rodney W rodney.yeo@eds. To: 'Struts Users Mailing List (E-mail)' [EMAIL PROTECTED] com cc: Subject: Websphere Application Server 4.01 to 4.04 for AIX 07/11/2002 09:26 AM Please respond to Struts Users Mailing List Anyone ever tried successfully using Struts in above-mentioned environment? I have tried deploying to Websphere 4.01 for Window 2000 (having replaced the Xalan and Xerces) and it works fine but not in AIX (and doing the same thing!) strange. Regards, Rodney -- To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org -- To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org
Re: how to delete ActionForm ?
Hello Marcus, Thursday, November 7, 2002, 9:51:31 AM, you wrote: MB I got an AddRecord.jsp, AddRecordAction and AddRecordForm MB and last but not least an ShowAddedRecord.jsp that displays the record MB that was added. MB When I added a new record to database, I want to forward to the same MB jsp, AddRecord.jsp, so that the user can add further records. MB The problem now is that MB a) If I set this Action to scope=request, I can't redisplay the record I always prefer to use request scope. So: What exactly do you mean by 'I can't redisplay the record'? MB if I set it to scope=session, MB b)when I forward to the same page again, AddRecord.jsp all field are MB filled witht the values of the old record. MB c) When I set value of the form to value= it works, but when an error MB occurrs and the validate method gets called, MB all fields are left blank instead of filled. MB d) redirecting neither helped, because I am not using an action on the MB last page, just a link to the first page. MB Have you got a better solution ? MB Someone suggested to delete the form, but I don't know how to do this / MB guess it won't work / or wouldn't be following the mvc design to MB delete the form on jsp. I have never heard of this. MB thx in advance, MB marcus MB -- MB To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org MB For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org -- Best regards, Dirk -- To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org
RE: Websphere Application Server 4.01 to 4.04 for AIX
Hi Aisling I deployed for the whole App Server by changing the xalan.jar and xerces.jar in WebSphere40/AppServer/lib directory. I'm now get com.ibm.ejs.sm.exception.StaleActiveObjectInvocationException error when i try to start up my default server using the administrative console. Do you encounter that? Regards, Rodney -Original Message- From: [EMAIL PROTECTED] [mailto:avasey;za.safmarine.com] Sent: Thursday, November 07, 2002 05:17 PM To: Struts Users Mailing List Subject: Re: Websphere Application Server 4.01 to 4.04 for AIX Hi Rodney I am trying to deploy on WebSphere 4.0.1 after successfully deploying the same application on WebSphere 4.0.3 but I am getting parser exceptions. You mentioned replacing the Xalan and Xerces classes. Could you please outline how you did this ie: for the whole App Server or just for your individual app ? thanks very much Aisling Yeo, Rodney W rodney.yeo@eds. To: 'Struts Users Mailing List (E-mail)' [EMAIL PROTECTED] com cc: Subject: Websphere Application Server 4.01 to 4.04 for AIX 07/11/2002 09:26 AM Please respond to Struts Users Mailing List Anyone ever tried successfully using Struts in above-mentioned environment? I have tried deploying to Websphere 4.01 for Window 2000 (having replaced the Xalan and Xerces) and it works fine but not in AIX (and doing the same thing!) strange. Regards, Rodney -- To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org -- To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org -- To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org
RE: Websphere Application Server 4.01 to 4.04 for AIX
Hi Rodney I just added the new xerces.jar to my App Server (default server) as a classpath setting using the Admin Console as opposed to replacing the WebSphere's version of the jar. My Struts parser exceptions seem to have gone away. (I am fighting some ClassNotFound exceptions with my web module not finding classes that are part of my EAR file. I don't think this is related to Struts as I had these problems before adding the xerces.jar to my classpath. Didn't have them with websphere 4.0.3.) Hope this helps. Aisling Yeo, Rodney W rodney.yeo@eds. To: 'Struts Users Mailing List' [EMAIL PROTECTED] com cc: Subject: RE: Websphere Application Server 4.01 to 4.04 for AIX 07/11/2002 11:54 AM Please respond to Struts Users Mailing List Hi Aisling I deployed for the whole App Server by changing the xalan.jar and xerces.jar in WebSphere40/AppServer/lib directory. I'm now get com.ibm.ejs.sm.exception.StaleActiveObjectInvocationException error when i try to start up my default server using the administrative console. Do you encounter that? Regards, Rodney -Original Message- From: [EMAIL PROTECTED] [mailto:avasey;za.safmarine.com] Sent: Thursday, November 07, 2002 05:17 PM To: Struts Users Mailing List Subject: Re: Websphere Application Server 4.01 to 4.04 for AIX Hi Rodney I am trying to deploy on WebSphere 4.0.1 after successfully deploying the same application on WebSphere 4.0.3 but I am getting parser exceptions. You mentioned replacing the Xalan and Xerces classes. Could you please outline how you did this ie: for the whole App Server or just for your individual app ? thanks very much Aisling Yeo, Rodney W rodney.yeo@eds. To: 'Struts Users Mailing List (E-mail)' [EMAIL PROTECTED] com cc: Subject: Websphere Application Server 4.01 to 4.04 for AIX 07/11/2002 09:26 AM Please respond to Struts Users Mailing List Anyone ever tried successfully using Struts in above-mentioned environment? I have tried deploying to Websphere 4.01 for Window 2000 (having replaced the Xalan and Xerces) and it works fine but not in AIX (and doing the same thing!) strange. Regards, Rodney -- To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org -- To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org -- To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org -- To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org
Re: How to forward from a struts form to a login dialog ?
ZK Hi, in a struts form I want to check whether to user has already ZK logged in. If not, instead of showing the form I want to forward the ZK user to a login dialog and he must log in. After the user logged in, I ZK want him to come back to the form and I have to restore the original ZK parameters of the form. ZK What is the best solution? Move authentication to container level. -- Max Kutny -- To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org
checkbox always checked(help needed)
Hi! all I am using multibox to display the multiple checkbox. By default all checkbox should be checked. I am not able to find any of the property of the multibox so that by default all checkbox should be checked. What is the property of the multibox so that all check box should be checked (when I display first time) or is there other way to do that. Thanks in advance Sandeep -- To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org
Re: How to forward from a struts form to a login dialog ?
Ok, but how? Zsolt On Thursday 07 November 2002 11:14, Max Kutny wrote: Move authentication to container level -- To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org
empty form after errors
When a submit my form with errors, the jsp is returned back with errors displayed as i expect. But all fields are empty. is it because I define my form like this html:form action=/newReception name=readMailForm type= com.bpam.mail.forms.ReadMailForm I'm saying this because it seem like that a new actionForm is created when the page is loaded. can someone helps. Meissa -- To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org
Problems with ActionMessages... (again)
Hi, I´m just not getting anywhere with the ActionMessages. I wrote to the mailing list about a week ago and got no answer. Unfortunately since then, I still haven´t managed to solve the problem myself. Aaahhhrrr! I´m trying to display a message in my jsp which I have defined in my action as follows: ActionMessages messages = new ActionMessages(); ActionMessage newMessage = new ActionMessage(regform.myMessage ); messages.add(ActionMessages.GLOBAL_MESSAGE, newMessage); saveMessages(request, messages); And in my jsp: html:messages id=message message=true bean:write name=message/ /html:messages I´m getting exactly the same error as described in the thread below (which also received no answer on this topic): http://www.mail-archive.com/struts-user;jakarta.apache.org/msg34621.html If anyone knows how to solve this, please help! Regards, Michael -- To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org
Re: empty form after errors
It could also be that the form in your jsp has the standard: value= marcus [EMAIL PROTECTED] schrieb: When a submit my form with errors, the jsp is returned back with errors displayed as i expect. But all fields are empty. is it because I define my form like this html:form action=/newReception name=readMailForm type= com.bpam.mail.forms.ReadMailForm I'm saying this because it seem like that a new actionForm is created when the page is loaded. can someone helps. Meissa -- To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org
Struts Validator
Hi All, I have two common validation issues I need some help with. Firstly I would like to use the validator to check that a password and its confirmation are equal. Secondly I would like to use the validator to ensure that a checkbox (terms and conditions) has been selected. A snippet for validation.xml would be great Jon Ridgway The contents of this email are intended only for the named addressees and may contain confidential and/or privileged material. If received in error please contact UPCO on +44 (0) 113 201 0600 and then delete the entire e-mail from your system. Unauthorised review, distribution, disclosure or other use of this information could constitute a breach of confidence. Your co-operation in this matter is greatly appreciated. -- To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org
Return to same JSP
Hi, If I return a non-empty ActionError from my validate method, struts should return to the same JSP. This will happen if I specify the input parameter for the action mapping. Is this right ? It doesn't seem to work that way. Am I missing something ? Thanks, Mohan -- To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org
Re: Return to same JSP
MR Hi, If I return a non-empty ActionError from my validate method, MR struts should return to the same JSP. This will happen if I specify MR the input parameter for the action mapping. MR Is this right ? It doesn't seem to work that way. Am I missing MR something ? You should use return new ActionForward(mapping.getInput()); -- Max Kutny -- To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org
RE: Return to same JSP
Hi, Thanks. I though it was automatic ? bye, Mohan -Original Message- From: Max Kutny [mailto:mkut;umc.com.ua] Sent: Thursday, November 07, 2002 6:13 PM To: Struts Users Mailing List Subject: Re: Return to same JSP MR Hi, If I return a non-empty ActionError from my validate method, MR struts should return to the same JSP. This will happen if I specify MR the input parameter for the action mapping. MR Is this right ? It doesn't seem to work that way. Am I missing MR something ? You should use return new ActionForward(mapping.getInput()); -- Max Kutny -- To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org -- To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org
Can logic:redirect been used in Tiles JSP files?
Hi, I have the impression that logic:redirect ... commands are ignored when they are in JSP files included over Tiles. Is that true? Zsolt -- To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org
RE: Return to same JSP
providing you perform the validation in your ActionForm method: public ActionErrors validate (ActionMapping mapping, HttpServletRequest request) { // stuff } -Original Message- From: Mohan Radhakrishnan [mailto:MohanR;hclcomnet.co.in] Sent: 07 November 2002 12:59 To: 'Struts Users Mailing List' Subject: RE: Return to same JSP Hi, Thanks. I though it was automatic ? bye, Mohan -Original Message- From: Max Kutny [mailto:mkut;umc.com.ua] Sent: Thursday, November 07, 2002 6:13 PM To: Struts Users Mailing List Subject: Re: Return to same JSP MR Hi, If I return a non-empty ActionError from my validate method, MR struts should return to the same JSP. This will happen if I specify MR the input parameter for the action mapping. MR Is this right ? It doesn't seem to work that way. Am I missing MR something ? You should use return new ActionForward(mapping.getInput()); -- Max Kutny -- To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org -- To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org -- To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org
RE: problem with client-side validation and ValidatorActionForm
Regardless of whether it's referenced by form-bean name or action path, wouldn't it only validate if you've got validate=true set in your action ? Therefore allowing you to only validate on a specific action... -Original Message- From: Ryan Bell [mailto:ryan;messagecast.net] Sent: Wednesday, November 06, 2002 3:33 PM To: Struts Users Mailing List Subject: RE: problem with client-side validation and ValidatorActionForm I only want to validate when a specific action is performed (server-side) so I'm extending the ValidatorActionForm for my form which is why I'm using the action-mapping in the as the form name in my validation file as described in the pdf of chapter twelve of Struts in action book: To enable the Struts Validator for Struts 1.1, just follow the initial setup instructions in chapter 4 and extend your ActionForm from ValidatorForm and Validator- ActionForm. The ValidatorForm will match the formset name with the form-bean name. The ValidatorActionForm will match the formset name with the actionmapping path. -Original Message- From: Pete Gieser [mailto:pgieser;tampabay.rr.com] Sent: Wednesday, November 06, 2002 1:07 PM To: 'Struts Users Mailing List' Subject: RE: problem with client-side validation and ValidatorActionForm I misread your configurations. Upon further review, it looks like you are putting the action instead of the form name in your validation and jsp form name property. i.e., you should have formset form name=contactInfoForm field property=companyName depends=required arg0 key=contactInfo.companyName.displayName / /field /form /formset The javascript output when I add html:javascript formName=contactInfoForm/ to my jsp starts out like this: Pete -- To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org -- To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org -- To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org
RE: Help with ValidatorForm
I will typically (I don't know if this is an accepted convention) have two action-mappings: for example, StudentEdit and StudentEditSave that point at the same form-bean, and call the same Action class - the only difference being that StudentEditSave has validate=true and StudentEdit has validate=false. Of course, you also need to pass in a parameter to the Action to specify whether to load the edit jsp or save the record (or you could just write two separate Action classes). -Original Message- From: Wendy Smoak [mailto:Wendy.Smoak;asu.edu] Sent: Wednesday, November 06, 2002 4:17 PM To: 'Struts Users Mailing List' Subject: RE: Help with ValidatorForm Eddie wrote: Gotcha! Validate defaults to true :-O ... so set it to false in your populate action ;-) Will do... but how could you *ever* set it to true with a LookupDispatchAction? It's validating *before* the form is ever displayed for the first time. Of course it's going to fail! I am attempting to use a ValidationForm here. I haven't quite figured out the many options available-- any suggestions will be appreciated. -- Wendy Smoak http://sourceforge.net/projects/unidbtags -- To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org
No getter method for property message
I'm tearing my hair off about this very strange error message. here it is. javax.servlet.ServletException: No getter method for property targetDir of bean org.apache.struts.taglib.html.BEAN I get it when my jsp is called. it seems like my own form bean is not recognized even when I do define all thins in my config file. here is the definition in the struts config file form-bean name=readMailForm type=com.bpam.mail.forms.ReadingMailForm/ actionpath=/initReception name=readMailForm type=com.bpam.mail.actions.CreateReceptionAction scope=request validate=false forward name=success path=/admReception.jsp/ /action the form bean class contains simple String attributes. in my jsp, the form is defined like this : html:form action=/filterMails html:hidden property=taskAction value=save/ table border=0 width=90% align=center CELLPADDING=0 CELLSPACING= 1 border=0 claform tr height=40 td width=3%nbsp;/td tdbean:message key=libelle.repertoire//td td html:text property=targetDir size=30 maxlength= 50/nbsp;* /td /tr /table /html:form when I call them in admReception.jsp, I get error message above saying that the targetDir has no getter method. what' wrong. I've searching the all archive list, but there is nothing similar to my problem. if someone can help . Meissa -- To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org
Re: No getter method for property message
Hello meissa, could you please mail your /filterMails action mapping, the corresponding form bean, and action form? Thursday, November 7, 2002, 2:02:20 PM, you wrote: mSbf I'm tearing my hair off about this very strange mSbf error message. mSbf here it is. mSbf javax.servlet.ServletException: No getter method for property targetDir of bean mSbf org.apache.struts.taglib.html.BEAN mSbf I get it when my jsp is called. it seems like my own form bean is not mSbf recognized even when I do define all mSbf thins in my config file. mSbf here is the definition in the struts config file mSbf form-bean name=readMailForm mSbf type=com.bpam.mail.forms.ReadingMailForm/ mSbf actionpath=/initReception mSbfname=readMailForm mSbftype=com.bpam.mail.actions.CreateReceptionAction mSbf scope=request mSbfvalidate=false mSbf forward name=success path=/admReception.jsp/ mSbf /action mSbf the form bean class contains simple String attributes. mSbf in my jsp, the form is defined like this : mSbf html:form action=/filterMails mSbf html:hidden property=taskAction value=save/ mSbf table border=0 width=90% align=center CELLPADDING=0 CELLSPACING= mSbf 1 border=0 claform mSbftr height=40 mSbf td width=3%nbsp;/td mSbf tdbean:message key=libelle.repertoire//td mSbf td mSbf html:text property=targetDir size=30 maxlength= 50/nbsp;* mSbf /td mSbf/tr mSbf /table mSbf /html:form mSbf when I call them in admReception.jsp, I get error message above saying that the mSbf targetDir has no getter method. what' wrong. mSbf I've searching the all archive list, but there is nothing similar to my problem. mSbf if someone can help . mSbf Meissa mSbf -- mSbf To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org mSbf For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org -- Best regards, Dirk -- To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org
Re: No getter method for property message
Meissa... From looking at your code your the jsp is getting it's form definition from the action=filterMails. I would guess that your form definition for fillterMails is not readMailForm If not otherwise specified, the required ActionForm is determined by the value you put in html:form action=xxx Later, aj [EMAIL PROTECTED] wrote: I'm tearing my hair off about this very strange error message. here it is. javax.servlet.ServletException: No getter method for property targetDir of bean org.apache.struts.taglib.html.BEAN I get it when my jsp is called. it seems like my own form bean is not recognized even when I do define all thins in my config file. here is the definition in the struts config file form-bean name=readMailForm type=com.bpam.mail.forms.ReadingMailForm/ actionpath=/initReception name=readMailForm type=com.bpam.mail.actions.CreateReceptionAction scope=request validate=false forward name=success path=/admReception.jsp/ /action the form bean class contains simple String attributes. in my jsp, the form is defined like this : html:form action=/filterMails html:hidden property=taskAction value=save/ table border=0 width=90% align=center CELLPADDING=0 CELLSPACING= 1 border=0 claform tr height=40 td width=3%nbsp;/td tdbean:message key=libelle.repertoire//td td html:text property=targetDir size=30 maxlength= 50/nbsp;* /td /tr /table /html:form when I call them in admReception.jsp, I get error message above saying that the targetDir has no getter method. what' wrong. I've searching the all archive list, but there is nothing similar to my problem. if someone can help . Meissa -- To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org -- To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org
validate() in ActionForms
Hi all, we're using Struts 1.1b2 to develop a Web Application. we're having a strange behaviour. One of our Actions (ModifyUser) works as follows: modifyuser.do - inizializes a new ModifyUserForm(); - reads the data from db and fills out the fields - puts the ModifyUserform() in session - forward to /jsp/user/modify/jsp. After the user modifies some data and submits the form, the validate() is called. As expected, struts shows the form if some errors occured; but the form is not filled in with the latest modifications from the user. Struts shows the form with the values from the bean inizialized in modifyUser.do. What is a correct solution for this? Thanks Reinhard -- To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org
Re: Help with ValidatorForm
I typically go for seperate Action subclasses. The dispatch stuff works really well, but, having not found a way to have one function of the action not validate - and the rest validate - I have copped out to the quick fix :-(. I'd be most interested if someone knows how you can use a dispatch-type action and still use conditional validation. Perhaps invoking it yourself is the way to go (and just set validate=false)? I didn't think about that when I was sitting down setting convention ;-O It's not really that big of an issue to me though. Most modern IDEs, once you declare an interface or super-class will bring in methods that need to be overriden (abstract functions). Those methods it doesn't automatically add are just a couple of clicks off, and then - voila - you've got your method skelleton sitting there to flesh out. Wendy Smoak wrote: Eddie wrote: Gotcha! Validate defaults to true :-O ... so set it to false in your populate action ;-) Will do... but how could you *ever* set it to true with a LookupDispatchAction? It's validating *before* the form is ever displayed for the first time. Of course it's going to fail! I am attempting to use a ValidationForm here. I haven't quite figured out the many options available-- any suggestions will be appreciated. -- Eddie Bush -- To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org
Re: java.util.Date
I don't think it's your fault, Max. The docs should talk about that internal Calendar instance. Knowing things like that .oO( Hrm ... if it just has a single internal Calendar instance, it's probably doing modification to it on-the-fly ...) is quite important! If the only thing involved were the format, I think your apporach of moving things to a static initializer would have been the way to do it. Sounds like that's not the way to do it though :-( Max Kutny wrote: EB from javadoc on SimpleDateFormat: Synchronization EB Date formats are not synchronized. It is recommended to create EB separate format instances for each thread. If multiple threads access EB a format concurrently, it must be synchronized externally. EB ... so your concern is quite valid ... kind of. The time I could see EB a problem arising would be when you are *changing* the format. That's exactly as I understood javadoc. *formats* are not synchronized. Since format is applyed in static code I suggested to move SimpleDateFormat creation there. Seems I was wrong. That's javadoc ambiguously. Sorry all guys for confusing you. -- Eddie Bush -- To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org
NullpointerException in ActionForms
Hi all, i was wondering how to handle correctly the following behaviour: if a user calls directly from the url an action that has a Jsp in his input and validate=true, i get a Nullpointerexception inside the validate(). I think that this happens because the FormBean has never been initialized with the values from the Jsp (the jsp has not been displayed). All values in the FormBean are nulls. I have added an instruction at the beginning of the validate() that checks if one of the text fields are null, the validate returns null. Is there a better way to handle this? Thanks Reinhard -- To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org
Re: NullpointerException in ActionForms
Hello Reinhard, what will happen if the user calls the action from the jsp without entering any data? If you also get the exception something is wrong with your validate method. Thursday, November 7, 2002, 3:27:43 PM, you wrote: RS Hi all, RS i was wondering how to handle correctly the following behaviour: RS if a user calls directly from the url an action that has a Jsp in his RS input and validate=true, i get a Nullpointerexception inside the RS validate(). RS I think that this happens because the FormBean has never been RS initialized with the values from the Jsp (the jsp has not been RS displayed). All values in the FormBean are nulls. RS I have added an instruction at the beginning of the validate() that RS checks if one of the text fields are null, the validate returns null. RS Is there a better way to handle this? RS Thanks RS Reinhard RS -- RS To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org RS For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org -- Best regards, Dirk -- To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org
Re: checkbox always checked(help needed)
Sandeep == Sandeep Karnwal Sandeep writes: Sandeep Hi! all Sandeep I am using multibox to display the multiple checkbox. Sandeep By default all checkbox should be checked. I am not able to find any of the Sandeep property of the multibox so that by default all checkbox should be checked. Sandeep What is the property of the multibox so that all check box should be checked Sandeep (when I display first time) or is there other way to do that. The checkbox in a multibox tag will be checked if the value attribute is equal to one of the objects in the collection specified by the bean property. If your page is fronted by an action where you can prepare the actionform in this way, then it will always be checked. -- === David M. Karr ; Java/J2EE/XML/Unix/C++ [EMAIL PROTECTED] ; SCJP -- To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org
Réf. : Re: No getter method for property message
Still trying to debug my No getter method for property strange behavior I'm posting my classes source code. I'm thanking in advance thoses who will check about this. It's been two days I'm trying to find out why this happens. (See attached file: admReception.jsp)(See attached file: ReadMailForm.java)(See attached file: ReceptionHandlerAction.java)(See attached file: struts-config.xml) Meissa Postfach 4711 [EMAIL PROTECTED] on 07/11/2002 15:04:56 Veuillez répondre à Struts Users Mailing List [EMAIL PROTECTED] Pour :Struts Users Mailing List [EMAIL PROTECTED] cc : Objet : Re: No getter method for property message Hello meissa, could you please mail your /filterMails action mapping, the corresponding form bean, and action form? Thursday, November 7, 2002, 2:02:20 PM, you wrote: mSbf I'm tearing my hair off about this very strange mSbf error message. mSbf here it is. mSbf javax.servlet.ServletException: No getter method for property targetDir of bean mSbf org.apache.struts.taglib.html.BEAN mSbf I get it when my jsp is called. it seems like my own form bean is not mSbf recognized even when I do define all mSbf thins in my config file. mSbf here is the definition in the struts config file mSbf form-bean name=readMailForm mSbf type=com.bpam.mail.forms.ReadingMailForm/ mSbf actionpath=/initReception mSbfname=readMailForm mSbftype=com.bpam.mail.actions.CreateReceptionAction mSbf scope=request mSbfvalidate=false mSbf forward name=success path=/admReception.jsp/ mSbf /action mSbf the form bean class contains simple String attributes. mSbf in my jsp, the form is defined like this : mSbf html:form action=/filterMails mSbf html:hidden property=taskAction value=save/ mSbf table border=0 width=90% align=center CELLPADDING=0 CELLSPACING= mSbf 1 border=0 claform mSbftr height=40 mSbf td width=3%nbsp;/td mSbf tdbean:message key=libelle.repertoire//td mSbf td mSbf html:text property=targetDir size=30 maxlength= 50/nbsp;* mSbf /td mSbf/tr mSbf /table mSbf /html:form mSbf when I call them in admReception.jsp, I get error message above saying that the mSbf targetDir has no getter method. what' wrong. mSbf I've searching the all archive list, but there is nothing similar to my problem. mSbf if someone can help . mSbf Meissa mSbf -- mSbf To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org mSbf For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org -- Best regards, Dirk -- To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org admReception.jsp Description: Binary data ReadMailForm.java Description: Binary data ReceptionHandlerAction.java Description: Binary data struts-config.xml Description: Binary data -- To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org
Re[2]: NullpointerException in ActionForms
Hello Eddie, Thursday, November 7, 2002, 5:01:38 PM, you wrote: EB Postfach 4711 wrote: Hello Reinhard, what will happen if the user calls the action from the jsp without entering any data? If you also get the exception something is wrong with your validate method. EB There is a contract between actions and the forms they use: The form EB *will* be created. This can be evidenced by the source (see EB RequestProcessor.java). Yes, the form does exist. As Reinhard wrote the NPE occurs *inside* the validate methods. Seems like the validate methods is using objects which do not exist. EB Your job, as an application developer, is to communicate to Struts (by EB placing the name of the form-bean in the name attribute of the EB action-mapping that needs access to the form) that a particular action EB needs a particular form. By doing Struts can (and will!) look for that EB action to be executed and instantiate the form-bean if needed. As such, EB you should never get an NPE because of a form-bean. If you do, it's EB *most likely* because you did not tell Struts that the action requires EB access to a form-bean. Thursday, November 7, 2002, 3:27:43 PM, you wrote: RS Hi all, RS i was wondering how to handle correctly the following behaviour: RS if a user calls directly from the url an action that has a Jsp in his RS input and validate=true, i get a Nullpointerexception inside the RS validate(). RS I think that this happens because the FormBean has never been RS initialized with the values from the Jsp (the jsp has not been RS displayed). All values in the FormBean are nulls. RS I have added an instruction at the beginning of the validate() that RS checks if one of the text fields are null, the validate returns null. RS Is there a better way to handle this? RS Thanks RS Reinhard -- Best regards, Dirk -- To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org
RE: Réf. : Re: No getter method for property message
not sure if this matters, but there isn't a closing quote around the action definition in your form tag -Original Message- From: [EMAIL PROTECTED] [mailto:meissa.Sakho;bpam.fr] Sent: Thursday, November 07, 2002 9:02 AM To: Struts Users Mailing List Subject: Réf. : Re: No getter method for property message Still trying to debug my No getter method for property strange behavior I'm posting my classes source code. I'm thanking in advance thoses who will check about this. It's been two days I'm trying to find out why this happens. (See attached file: admReception.jsp)(See attached file: ReadMailForm.java)(See attached file: ReceptionHandlerAction.java)(See attached file: struts-config.xml) Meissa Postfach 4711 [EMAIL PROTECTED] on 07/11/2002 15:04:56 Veuillez répondre à Struts Users Mailing List [EMAIL PROTECTED] Pour :Struts Users Mailing List [EMAIL PROTECTED] cc : Objet : Re: No getter method for property message Hello meissa, could you please mail your /filterMails action mapping, the corresponding form bean, and action form? Thursday, November 7, 2002, 2:02:20 PM, you wrote: mSbf I'm tearing my hair off about this very strange mSbf error message. mSbf here it is. mSbf javax.servlet.ServletException: No getter method for property targetDir of bean mSbf org.apache.struts.taglib.html.BEAN mSbf I get it when my jsp is called. it seems like my own form bean is not mSbf recognized even when I do define all mSbf thins in my config file. mSbf here is the definition in the struts config file mSbf form-bean name=readMailForm mSbf type=com.bpam.mail.forms.ReadingMailForm/ mSbf actionpath=/initReception mSbfname=readMailForm mSbftype=com.bpam.mail.actions.CreateReceptionAction mSbf scope=request mSbfvalidate=false mSbf forward name=success path=/admReception.jsp/ mSbf /action mSbf the form bean class contains simple String attributes. mSbf in my jsp, the form is defined like this : mSbf html:form action=/filterMails mSbf html:hidden property=taskAction value=save/ mSbf table border=0 width=90% align=center CELLPADDING=0 CELLSPACING= mSbf 1 border=0 claform mSbftr height=40 mSbf td width=3%nbsp;/td mSbf tdbean:message key=libelle.repertoire//td mSbf td mSbf html:text property=targetDir size=30 maxlength= 50/nbsp;* mSbf /td mSbf/tr mSbf /table mSbf /html:form mSbf when I call them in admReception.jsp, I get error message above saying that the mSbf targetDir has no getter method. what' wrong. mSbf I've searching the all archive list, but there is nothing similar to my problem. mSbf if someone can help . mSbf Meissa mSbf -- mSbf To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org mSbf For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org -- Best regards, Dirk -- To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org -- To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org
Réf. : RE: Réf. : Re: No getter method for property message
I've added the missing closing quote. I'm still getting the No getter method for property error. Meissa John Espey [EMAIL PROTECTED] on 07/11/2002 16:18:23 Veuillez répondre à Struts Users Mailing List [EMAIL PROTECTED] Pour :Struts Users Mailing List [EMAIL PROTECTED] cc : Objet : RE: Réf. : Re: No getter method for property message not sure if this matters, but there isn't a closing quote around the action definition in your form tag -Original Message- From: [EMAIL PROTECTED] [mailto:meissa.Sakho;bpam.fr] Sent: Thursday, November 07, 2002 9:02 AM To: Struts Users Mailing List Subject: Réf. : Re: No getter method for property message Still trying to debug my No getter method for property strange behavior I'm posting my classes source code. I'm thanking in advance thoses who will check about this. It's been two days I'm trying to find out why this happens. (See attached file: admReception.jsp)(See attached file: ReadMailForm.java)(See attached file: ReceptionHandlerAction.java)(See attached file: struts-config.xml) Meissa Postfach 4711 [EMAIL PROTECTED] on 07/11/2002 15:04:56 Veuillez répondre à Struts Users Mailing List [EMAIL PROTECTED] Pour :Struts Users Mailing List [EMAIL PROTECTED] cc : Objet : Re: No getter method for property message Hello meissa, could you please mail your /filterMails action mapping, the corresponding form bean, and action form? Thursday, November 7, 2002, 2:02:20 PM, you wrote: mSbf I'm tearing my hair off about this very strange mSbf error message. mSbf here it is. mSbf javax.servlet.ServletException: No getter method for property targetDir of bean mSbf org.apache.struts.taglib.html.BEAN mSbf I get it when my jsp is called. it seems like my own form bean is not mSbf recognized even when I do define all mSbf thins in my config file. mSbf here is the definition in the struts config file mSbf form-bean name=readMailForm mSbf type=com.bpam.mail.forms.ReadingMailForm/ mSbf actionpath=/initReception mSbfname=readMailForm mSbftype=com.bpam.mail.actions.CreateReceptionAction mSbf scope=request mSbfvalidate=false mSbf forward name=success path=/admReception.jsp/ mSbf /action mSbf the form bean class contains simple String attributes. mSbf in my jsp, the form is defined like this : mSbf html:form action=/filterMails mSbf html:hidden property=taskAction value=save/ mSbf table border=0 width=90% align=center CELLPADDING=0 CELLSPACING= mSbf 1 border=0 claform mSbftr height=40 mSbf td width=3%nbsp;/td mSbf tdbean:message key=libelle.repertoire//td mSbf td mSbf html:text property=targetDir size=30 maxlength= 50/nbsp;* mSbf /td mSbf/tr mSbf /table mSbf /html:form mSbf when I call them in admReception.jsp, I get error message above saying that the mSbf targetDir has no getter method. what' wrong. mSbf I've searching the all archive list, but there is nothing similar to my problem. mSbf if someone can help . mSbf Meissa mSbf -- mSbf To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org mSbf For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org -- Best regards, Dirk -- To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org -- To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org -- To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org
RE: empty form after errors
Make sure that the scope of the form-bean (as defined in the action mapping) is 'session'. Sri -Original Message- From: [EMAIL PROTECTED] [mailto:meissa.Sakho;bpam.fr] Sent: Thursday, November 07, 2002 5:52 AM To: [EMAIL PROTECTED] Subject: empty form after errors When a submit my form with errors, the jsp is returned back with errors displayed as i expect. But all fields are empty. is it because I define my form like this html:form action=/newReception name=readMailForm type= com.bpam.mail.forms.ReadMailForm I'm saying this because it seem like that a new actionForm is created when the page is loaded. can someone helps. Meissa -- To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org -- To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org
Réf. : Re: No getter method for property message
I can't give a reason for this. But when I looked at the jsp generated servlet files, I discover that the version that was interpreted was not the current one. I've removed them all and every thing works fine. thank you all who spen time helping me. Meissa Melanie Harris [EMAIL PROTECTED] on 07/11/2002 15:46:45 Veuillez répondre à Struts Users Mailing List [EMAIL PROTECTED] Pour :Struts Users Mailing List [EMAIL PROTECTED] cc : Objet : Re: No getter method for property message ok, now that I made a fool of myself with that last comment. I just thought of something. He also had a text tag with a property=blah... , but had not yet created an ActionForm with that property/attribute. That was likely the problem where we were getting the error. oh well, was one of the two. [EMAIL PROTECTED] wrote:I'm tearing my hair off about this very strange error message. here it is. javax.servlet.ServletException: No getter method for property targetDir of bean org.apache.struts.taglib.html.BEAN I get it when my jsp is called. it seems like my own form bean is not recognized even when I do define all thins in my config file. here is the definition in the struts config file type=com.bpam.mail.forms.ReadingMailForm/ name=readMailForm type=com.bpam.mail.actions.CreateReceptionAction scope=request validate=false the form bean class contains simple String attributes. in my jsp, the form is defined like this : 1 border=0 claform 50/ * when I call them in admReception.jsp, I get error message above saying that the targetDir has no getter method. what' wrong. I've searching the all archive list, but there is nothing similar to my problem. if someone can help . Meissa -- To unsubscribe, e-mail: For additional commands, e-mail: - Do you Yahoo!? U2 on LAUNCH - Exclusive medley videos from Greatest Hits CD -- To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org
RE: [REMINDER] --- Struts Nightly and 1.1B1 1.1B2 users
Well, its definitely a classloader issue. And since fixing classloader issues is definitely NOT my specialty, I'm having a slow go at it. Should have something today (hopefully). James Mitchell Software Engineer/Struts Evangelist http://www.open-tools.org Only two things are infinite, the universe and human stupidity, and I'm not sure about the former. - Albert Einstein (1879-1955) -Original Message- From: Rob Leland [mailto:rleland;apache.org] Sent: Thursday, November 07, 2002 3:32 AM To: Struts Users Mailing List Subject: Re: [REMINDER] --- Struts Nightly and 1.1B1 1.1B2 users James Mitchell wrote: The only tests that are failing are in Tomcat 3.2 (but I'm hot the trail) Up to this point the 'folk lore' was that it was a bug in TC 3.2. So you think it might be in Struts/Commons code, or possible to work around it ? Give the Man a Cigar !!! -Rob -- To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org -- To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org
Re: No getter method for pro perty message
I've looked at the sent files and they seemed ok. But, the JSP you have sent is different from the JSP fragment in the first mail, the action in sent jsp i /newReception and not /filterMails. Are you sure that you are looking in the right place in the right beans? The /newReception uses the bean class com.bpam.mail.forms.MailFilterForm and not ReadMailForm. Regards /Mikael I've added the missing closing quote. I'm still getting the No getter method for property error. Meissa mSbf in my jsp, the form is defined like this : mSbf html:form action=/filterMails mSbf html:hidden property=taskAction value=save/ mSbf table border=0 width=90% align=center CELLPADDING=0 CELLSPACING= mSbf 1 border=0 claform mSbftr height=40 mSbf td width=3%nbsp;/td mSbf tdbean:message key=libelle.repertoire//td mSbf td mSbf html:text property=targetDir size=30 maxlength= 50/nbsp;* mSbf /td mSbf/tr mSbf /table mSbf /html:form === Skickat genom Swedish Connection WebMail === -- To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org
[html:errors] Separation of Global Errors from Specific Errors
I know I've this answer before, but I cannot seem to find it in the archives. I am setting ActionErrors for both specific properties as well as global errors. In other words, in my action I have errors.add(ActionErrors.GLOBAL_ERROR, new ActionError(myError)); and errors.add(myProperty, new ActionError(myPropertyError)); In my JSP I am using html:errors / to get my global errors, and html:errors property=myProperty / to get my specific error. The problem is that the html:errors / is also returning the specific errors. I remember seeing an e-mail on this a few weeks ago, but can't find it in the archives. Is there a way to limit the html:errors / to only display the errors that are NOT associated with a specific property? TIA! Jerry Jalenak Web Publishing LabOne, Inc. 10101 Renner Blvd. Lenexa, KS 66219 (913) 577-1496 [EMAIL PROTECTED] This transmission (and any information attached to it) may be confidential and is intended solely for the use of the individual or entity to which it is addressed. If you are not the intended recipient or the person responsible for delivering the transmission to the intended recipient, be advised that you have received this transmission in error and that any use, dissemination, forwarding, printing, or copying of this information is strictly prohibited. If you have received this transmission in error, please immediately notify LabOne at (800)388-4675. -- To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org
RE: [REMINDER] --- Struts Nightly and 1.1B1 1.1B2 users
Well, what a coincidence. The solution to my dilemma was quickly resolved by using the suggestion posted about an hour ago by Kjeld Froberg: http://nagoya.apache.org/bugzilla/show_bug.cgi?id=14332 I will post to the dev list about committing this change. James Mitchell Software Engineer/Struts Evangelist http://www.open-tools.org Only two things are infinite, the universe and human stupidity, and I'm not sure about the former. - Albert Einstein (1879-1955) -Original Message- From: James Mitchell [mailto:jmitchtx;telocity.com] Sent: Thursday, November 07, 2002 10:41 AM To: Struts Users Mailing List Subject: RE: [REMINDER] --- Struts Nightly and 1.1B1 1.1B2 users Well, its definitely a classloader issue. And since fixing classloader issues is definitely NOT my specialty, I'm having a slow go at it. Should have something today (hopefully). James Mitchell Software Engineer/Struts Evangelist http://www.open-tools.org Only two things are infinite, the universe and human stupidity, and I'm not sure about the former. - Albert Einstein (1879-1955) -Original Message- From: Rob Leland [mailto:rleland;apache.org] Sent: Thursday, November 07, 2002 3:32 AM To: Struts Users Mailing List Subject: Re: [REMINDER] --- Struts Nightly and 1.1B1 1.1B2 users James Mitchell wrote: The only tests that are failing are in Tomcat 3.2 (but I'm hot the trail) Up to this point the 'folk lore' was that it was a bug in TC 3.2. So you think it might be in Struts/Commons code, or possible to work around it ? Give the Man a Cigar !!! -Rob -- To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org -- To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org -- To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org
Re: [ANNOUNCE] Struts In Action now in print
Congratulations to you all and thanks for this contribution to the Struts community! Kevin Ted Husted [EMAIL PROTECTED] on 11/07/2002 10:47:39 AM Please respond to Struts Users Mailing List [EMAIL PROTECTED] To:Struts Users Mailing List [EMAIL PROTECTED] cc: (bcc: Kevin Bedell/Systems/USHO/SunLife) Subject:[ANNOUNCE] Struts In Action now in print The Manning book, Struts in Action, is now available for sale at the publisher's website www.manning.com/husted and will arrive at bookstores everywhere over the next few weeks. Struts solves the most common problems of Web development by providing an open source framework for building Web applications. As the only book with full coverage of both Struts 1.0 and the upcoming Struts 1.1, Struts in Action points out the differences between the two and builds a case study that illustrates the transition from one to the other. The authors of the Manning book are core members of the Struts community who are intimately involved in the Struts development process. Manning makes this text available in either ebook edition for $22.47 or print edition for $44.95 at www.manning.com/husted. If you order the ebook from Manning's website first, you will receive a special offer on the print edition. If you later purchase the print edition from the publisher's website, Manning will deduct the cost of the ebook from the print edition order - that's both editions for $44.95! Please remember, to get this deal, you must order the ebook first. Struts in Action By Ted N. Husted, Cedric Dumoulin, George Franciscus, David Winterfeldt ISBN 1930110502 Softbound, 664 pages, $44.95 Ebook, 2.5 Mb PDF, $22.47 www.manning.com/husted ### -- To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org --- This e-mail message (including attachments, if any) is intended for the use of the individual or entity to which it is addressed and may contain information that is privileged, proprietary , confidential and exempt from disclosure. If you are not the intended recipient, you are notified that any dissemination, distribution or copying of this communication is strictly prohibited. If you have received this communication in error, please notify the sender and erase this e-mail message immediately. --- -- To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org
Re: [ANNOUNCE] Struts In Action now in print
The sample chapters look very good Ted - nice job :-) I'm sure the rest of the book is just as excellent! -- Eddie Bush -- To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org
RE: [ANNOUNCE] Struts In Action now in print
Congratulations, Ted. For those of you who do not know, Ted has been one of the most valuable contributors to the Struts community for a long, long time. He has showed both great knowledge and extreme patience when dealing with the user community, and Struts would not be the same without him. I have no problems recommending the book sight-unseen based solely upon Ted's reputation. -= James -Original Message- From: Ted Husted [mailto:husted;apache.org] Sent: Thursday, November 07, 2002 9:48 AM To: Struts Users Mailing List Subject: [ANNOUNCE] Struts In Action now in print The Manning book, Struts in Action, is now available for sale at the publisher's website www.manning.com/husted and will arrive at bookstores everywhere over the next few weeks. Struts solves the most common problems of Web development by providing an open source framework for building Web applications. As the only book with full coverage of both Struts 1.0 and the upcoming Struts 1.1, Struts in Action points out the differences between the two and builds a case study that illustrates the transition from one to the other. The authors of the Manning book are core members of the Struts community who are intimately involved in the Struts development process. Manning makes this text available in either ebook edition for $22.47 or print edition for $44.95 at www.manning.com/husted. If you order the ebook from Manning's website first, you will receive a special offer on the print edition. If you later purchase the print edition from the publishers website, Manning will deduct the cost of the ebook from the print edition order - that's both editions for $44.95! Please remember, to get this deal, you must order the ebook first. Struts in Action By Ted N. Husted, Cedric Dumoulin, George Franciscus, David Winterfeldt ISBN 1930110502 Softbound, 664 pages, $44.95 Ebook, 2.5 Mb PDF, $22.47 www.manning.com/husted ### -- To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org -- To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org
Validate and nightly build problem
Hi, I have a strange behaviour with the validator using the nightly build (20021107). I use the html:javascript tag in order to make client validation. It work well with the 1.1B2 but when I use the nightly build it doesn't generate the validateXXX javascript function. Debugging with source of struts and commons-validator it seems that it is a problem with locale( I use FR_fr in my browser). In my validator.xml I don't specify a locale in formset,is it the problem ? For me , we must specify a specific locale formset if we want to override some formbean validation of the default. Any help ? Fabrice BLANQUART *---* * Cet e-mail et toutes les pièces jointes sont destinés aux * * seules personnes auxquelles ils sont spécifiquement adressés * * et n'engagent que le signataire de ces documents et non la* * structure dont il dépend. * * Leur existence et leur contenu ont un caractère confidentiel. * * Toute utilisation ou diffusion non autorisée est interdite. * * Si vous avez reçu cet e-mail ou si vous détenez sans en être * * le destinataire, nous vous demandons de bien vouloir nous en * * informer immédiatement. * * Cette note assure que mimesweeper a vérifié que ce message* * ne comprenait aucun virus connu à ce jour, néanmoins tout * * message électronique est susceptible d'altération.* * Nous déclinons toute responsabilité au titre de ce message* * s'il a étéaltéré, déformé ou falsifié.* *---* -- To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org
RE: [ANNOUNCE] Struts In Action now in print
I purchased the e-book version of the book and I must say it is excellent! It's very well written. JOHN -Original Message- From: Eddie Bush [mailto:ekbush;swbell.net] Sent: Thursday, November 07, 2002 11:07 AM To: Struts Users Mailing List Subject: Re: [ANNOUNCE] Struts In Action now in print The sample chapters look very good Ted - nice job :-) I'm sure the rest of the book is just as excellent! -- Eddie Bush -- To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org -- To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org
Re: [ANNOUNCE] Struts In Action now in print
Congratulations!!! You have been my first approach to struts, I'll shurely buy your book!! (maybe in e-form) -- To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org
RE: Problems with ActionMessages... (again)
Have you tried removing the trailing space? ActionMessage newMessage = new ActionMessage(regform.myMessage ); ^ Not sure if that is a fix, but its a start. James Mitchell Software Engineer/Struts Evangelist http://www.open-tools.org Only two things are infinite, the universe and human stupidity, and I'm not sure about the former. - Albert Einstein (1879-1955) -Original Message- From: Michael Delamere [mailto:home;michael-delamere.de] Sent: Thursday, November 07, 2002 6:17 AM To: Struts Users Mailing List Subject: Problems with ActionMessages... (again) Hi, I´m just not getting anywhere with the ActionMessages. I wrote to the mailing list about a week ago and got no answer. Unfortunately since then, I still haven´t managed to solve the problem myself. Aaahhhrrr! I´m trying to display a message in my jsp which I have defined in my action as follows: ActionMessages messages = new ActionMessages(); ActionMessage newMessage = new ActionMessage(regform.myMessage ); messages.add(ActionMessages.GLOBAL_MESSAGE, newMessage); saveMessages(request, messages); And in my jsp: html:messages id=message message=true bean:write name=message/ /html:messages I´m getting exactly the same error as described in the thread below (which also received no answer on this topic): http://www.mail-archive.com/struts-user;jakarta.apache.org/msg34621.html If anyone knows how to solve this, please help! Regards, Michael -- To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org -- To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org
RE: Problems with ActionMessages... (again)
No, I just changed the text in my outlook window to make it easier to understand... :-) ! So in my actual program it´s correct... Thanks for your response though! Regards, Michael -Original Message- From: James Mitchell [mailto:jmitchtx;telocity.com] Sent: Donnerstag, 7. November 2002 17:31 To: Struts Users Mailing List Subject: RE: Problems with ActionMessages... (again) Have you tried removing the trailing space? ActionMessage newMessage = new ActionMessage(regform.myMessage ); ^ Not sure if that is a fix, but its a start. James Mitchell Software Engineer/Struts Evangelist http://www.open-tools.org Only two things are infinite, the universe and human stupidity, and I'm not sure about the former. - Albert Einstein (1879-1955) -Original Message- From: Michael Delamere [mailto:home;michael-delamere.de] Sent: Thursday, November 07, 2002 6:17 AM To: Struts Users Mailing List Subject: Problems with ActionMessages... (again) Hi, I´m just not getting anywhere with the ActionMessages. I wrote to the mailing list about a week ago and got no answer. Unfortunately since then, I still haven´t managed to solve the problem myself. Aaahhhrrr! I´m trying to display a message in my jsp which I have defined in my action as follows: ActionMessages messages = new ActionMessages(); ActionMessage newMessage = new ActionMessage(regform.myMessage ); messages.add(ActionMessages.GLOBAL_MESSAGE, newMessage); saveMessages(request, messages); And in my jsp: html:messages id=message message=true bean:write name=message/ /html:messages I´m getting exactly the same error as described in the thread below (which also received no answer on this topic): http://www.mail-archive.com/struts-user;jakarta.apache.org/msg34621.html If anyone knows how to solve this, please help! Regards, Michael -- To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org -- To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org -- To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org
A form with Collection of beans
I am using Struts 1.0.2. I have a form bean which has collection of other beans. How could I present this in html:form and retrieve users input for the form(for each beans in collection)? I came across Struts Nesting extension on KeyboardMonkey.com. Is it 1.0.2 compatible? If yes, what do I need? Your help is appreciated. Thank you. Vipul __ Do you Yahoo!? U2 on LAUNCH - Exclusive greatest hits videos http://launch.yahoo.com/u2 -- To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org
Re: [ANNOUNCE] Struts In Action now in print
Que capullos si compras primero el ebook ahora te llevas el book a mitad de precio o sea los 2 por 44 dolares. El problema es que yo ya prepedi el book. From: Ted Husted [EMAIL PROTECTED] Reply-To: Struts Users Mailing List [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Subject: [ANNOUNCE] Struts In Action now in print Date: Thu, 07 Nov 2002 10:47:39 -0500 The Manning book, Struts in Action, is now available for sale at the publisher's website www.manning.com/husted and will arrive at bookstores everywhere over the next few weeks. Struts solves the most common problems of Web development by providing an open source framework for building Web applications. As the only book with full coverage of both Struts 1.0 and the upcoming Struts 1.1, Struts in Action points out the differences between the two and builds a case study that illustrates the transition from one to the other. The authors of the Manning book are core members of the Struts community who are intimately involved in the Struts development process. Manning makes this text available in either ebook edition for $22.47 or print edition for $44.95 at www.manning.com/husted. If you order the ebook from Manning's website first, you will receive a special offer on the print edition. If you later purchase the print edition from the publishers website, Manning will deduct the cost of the ebook from the print edition order - that's both editions for $44.95! Please remember, to get this deal, you must order the ebook first. Struts in Action By Ted N. Husted, Cedric Dumoulin, George Franciscus, David Winterfeldt ISBN 1930110502 Softbound, 664 pages, $44.95 Ebook, 2.5 Mb PDF, $22.47 www.manning.com/husted ### -- To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org _ The new MSN 8: smart spam protection and 2 months FREE* http://join.msn.com/?page=features/junkmail -- To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org
Re: [ANNOUNCE] Struts In Action now in print
sorry, I mistaked the target address :-O From: Ted Husted [EMAIL PROTECTED] Reply-To: Struts Users Mailing List [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Subject: [ANNOUNCE] Struts In Action now in print Date: Thu, 07 Nov 2002 10:47:39 -0500 The Manning book, Struts in Action, is now available for sale at the publisher's website www.manning.com/husted and will arrive at bookstores everywhere over the next few weeks. Struts solves the most common problems of Web development by providing an open source framework for building Web applications. As the only book with full coverage of both Struts 1.0 and the upcoming Struts 1.1, Struts in Action points out the differences between the two and builds a case study that illustrates the transition from one to the other. The authors of the Manning book are core members of the Struts community who are intimately involved in the Struts development process. Manning makes this text available in either ebook edition for $22.47 or print edition for $44.95 at www.manning.com/husted. If you order the ebook from Manning's website first, you will receive a special offer on the print edition. If you later purchase the print edition from the publishers website, Manning will deduct the cost of the ebook from the print edition order - that's both editions for $44.95! Please remember, to get this deal, you must order the ebook first. Struts in Action By Ted N. Husted, Cedric Dumoulin, George Franciscus, David Winterfeldt ISBN 1930110502 Softbound, 664 pages, $44.95 Ebook, 2.5 Mb PDF, $22.47 www.manning.com/husted ### -- To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org _ MSN 8 helps eliminate e-mail viruses. Get 2 months FREE*. http://join.msn.com/?page=features/virus -- To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org
form component reuse best practices?
(this is a refinement of a question i asked yesterday) If you have common form components that can be reused multiple times on a page or between projects (e.g. a list of months for date entry, a list of states for address entry), what is the best way to share this code (the html:select/html:option items)? Do you use a backing static bean and html:options to point to that bean? Any ideas would be appreciated. thanks andy kriger -- To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org
Re: empty form after errors
In 1.1b2, I have found that if you have to forward from an Action class following a JSP to an Action class that precedes the JSP ( like a setup Action ) and both Actions are set to scope=session, then the first Action creates a new form and wipes out the one in the session. I worked around this by putting a copy of the populated form in the session and repopulating the newly created form in the pre Action when it got returned there. I believe that the nightly builds have fixed this, although I have other problems with those that preclude me from using it at this time. Eric Sri Sankaran wrote: Make sure that the scope of the form-bean (as defined in the action mapping) is 'session'. Sri -Original Message- From: [EMAIL PROTECTED] [mailto:meissa.Sakho;bpam.fr] Sent: Thursday, November 07, 2002 5:52 AM To: [EMAIL PROTECTED] Subject: empty form after errors When a submit my form with errors, the jsp is returned back with errors displayed as i expect. But all fields are empty. is it because I define my form like this html:form action=/newReception name=readMailForm type= com.bpam.mail.forms.ReadMailForm I'm saying this because it seem like that a new actionForm is created when the page is loaded. can someone helps. Meissa -- To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org -- To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org -- To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org
Re: Validate and nightly build problem
Fabrice BLANQUART wrote: Hi, I have a strange behaviour with the validator using the nightly build (20021107). I use the html:javascript tag in order to make client validation. It work well with the 1.1B2 but when I use the nightly build it doesn't generate the validateXXX javascript function. Debugging with source of struts and commons-validator it seems that it is a problem with locale( I use FR_fr in my browser). In my validator.xml I don't specify a locale in formset,is it the problem ? This does sound like a bug Does the struts-validator example work correctly ? Also could you post the JSP code from the html:javascript tag ? Any help ? Fabrice BLANQUART -Rob -- To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org
Best Practice: Organizing Bean Key Error Key Constants?
Are there any best practices on how to organize all the bean key and error key constants that created when implementing a Struts application? I'm assuming most people create String constants for the name of keys used to: 1) store/retrieve bean data to/from application and session scope 2) error messages from the application resources file. My project currently puts all their bean key constants in their own package for a module. For example: public final class BeanConstants { public static final String SALESPERSON_DEFAULT_PLAN_NAME_KEY = planassociations.salespersonDefaultPlanName; public static final String SALESPERSON_CURRENT_PLAN_ID_KEY = planassociations.salespersonCurrentPlanId; ... } Are others creating classes like this or are they just hard-coding the key names when needed? The use of constants helps guard against typos when a bean key is used in multiple places. Obviously, a hard-coded string will always compile, so a typo won't be detected until run-time (e.g. bean not found error). In addition, with this approach, are others importing the BeanConstants class in their JSP so they can reference the constant instead of hard-coding the string in the JSP as well? My project doesn't allow any Java scriplet code in their JSPs, but this might become our only exception. Finally, where are you defining the keys for error messages? Are you using constants or just hard-coding them? If you're using constants for the error keys, are they in the action or an ErrorKeyConstants class (similar to the bean key constants class above). In some cases, the same error key (or message) will be used by multiple actions. I looked in some of the new Struts books (Ted Husted's Chuck Cavaness') as well as the mailing lists and didn't really see much on this topic. Most code examples use the hard-coded String approach for brevity purposes. Thanks, JOHN -- To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org
Re: Best Practice: Organizing Bean Key Error Key Constants?
I have a Constants class that holds constants for any name used in request, session, application scopes as well as context init. parameters. I currently hardcode the string in JSPs because I haven't looked into my options there. I hardcode the error message keys because there would be an explosion of constants that would be just as hard to maintain. Not sure if there's a best practice here but it makes it easier when Actions use constants when putting objects in a scope. David From: Hohlen, John [EMAIL PROTECTED] Reply-To: Struts Users Mailing List [EMAIL PROTECTED] To: Struts-Help (E-mail) [EMAIL PROTECTED] Subject: Best Practice: Organizing Bean Key Error Key Constants? Date: Thu, 7 Nov 2002 11:09:21 -0600 Are there any best practices on how to organize all the bean key and error key constants that created when implementing a Struts application? I'm assuming most people create String constants for the name of keys used to: 1) store/retrieve bean data to/from application and session scope 2) error messages from the application resources file. My project currently puts all their bean key constants in their own package for a module. For example: public final class BeanConstants { public static final String SALESPERSON_DEFAULT_PLAN_NAME_KEY = planassociations.salespersonDefaultPlanName; public static final String SALESPERSON_CURRENT_PLAN_ID_KEY = planassociations.salespersonCurrentPlanId; ... } Are others creating classes like this or are they just hard-coding the key names when needed? The use of constants helps guard against typos when a bean key is used in multiple places. Obviously, a hard-coded string will always compile, so a typo won't be detected until run-time (e.g. bean not found error). In addition, with this approach, are others importing the BeanConstants class in their JSP so they can reference the constant instead of hard-coding the string in the JSP as well? My project doesn't allow any Java scriplet code in their JSPs, but this might become our only exception. Finally, where are you defining the keys for error messages? Are you using constants or just hard-coding them? If you're using constants for the error keys, are they in the action or an ErrorKeyConstants class (similar to the bean key constants class above). In some cases, the same error key (or message) will be used by multiple actions. I looked in some of the new Struts books (Ted Husted's Chuck Cavaness') as well as the mailing lists and didn't really see much on this topic. Most code examples use the hard-coded String approach for brevity purposes. Thanks, JOHN -- To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org _ Tired of spam? Get advanced junk mail protection with MSN 8. http://join.msn.com/?page=features/junkmail -- To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org
RE: [Tiles] Tiles vs. Custom Tag - anyone have a view?
If Hue was to use Tiles' definition, then much more flexible. My preference is To use Tiles in this case. Of course, when performance become an issues then you Might want to consider other approach, and this could be using tags. Or, use Fragmented-cache, I mean using cache tags to prevent Tiles' components from rendering Again. My preferences gears toward Tiles for flexibilities and re-usable View components Out weight the performance issue. Danny Ps. Cedric, UR-Rock -Original Message- From: David Graham [mailto:dgraham1980;hotmail.com] Sent: Wednesday, November 06, 2002 8:52 PM To: [EMAIL PROTECTED] Subject: Re: [Tiles] Tiles vs. Custom Tag - anyone have a view? How many milliseconds faster/slower is the tiles solution vs. the custom tag solution? When you use a custom tag, can you perceive a difference in page load time? Until you can answer those questions, stick with what you have. Programmers are notoriously bad at guessing where a performance problem is and you need real data to make a decision. David From: Hue Holleran [EMAIL PROTECTED] Reply-To: Struts Users Mailing List [EMAIL PROTECTED] To: Struts Users Mailing List \(E-mail\) [EMAIL PROTECTED] Subject: [Tiles] Tiles vs. Custom Tag - anyone have a view? Date: Wed, 6 Nov 2002 18:01:34 - We've been using tiles extensively in an app and it has been extremely effective - as one might expect for including tiles of information on a page and consolidating standard layout into templates - however I'm concerned that we might be going too far in its use... and using it where we might otherwise have used a custom tag: For a single img that is used extensively in an app that has mouseover/out/down behaviour, e.g. (in HTML - lots of code left out deliberately here): img src=/images/navigation/right.gif onmouseover=javascript:setImg(this,'/images/right_hot.gif') onmousedown=javascript:setImg(this,'/images/right_hot_down.gif') onmouseout=javascript:setImg(this,'/images/right.gif') This can be much simplified to including a tile of just this control: tiles:insert template=/tiles-components/controls/imgactive.jsp tiles:put imgName=/images/right / /tiles:insert The alternative would be a custom tag, e.g: sshtml:imgactive imgName=/images/navigation/right / Which is obviously much easier to include but so much less flexible - requiring editing tag handler java code to edit html - and all of the issues this entails - tiles allows us to edit the html in a nice easy jsp. This is much more effective for complete chunks of html and has saved huge amounts of time for large composite controls that we have everywhere. I feel it is neater but am concerned we are introducing too much processing for just producing the html for the control - does anyone else have a view on this ... any comments appreciated (even Stupid Idea if this is). (code for the template is included below). Thanks, Hue. /tiles-components/controls/imgactive.jsp %@ taglib uri=/WEB-INF/struts-tiles.tld prefix=tiles % img src=tiles:getAsString name='imgName'/.gif onmouseover=javascript:setImg(this,'tiles:getAsString name='imgName'/_hot.gif'); onmousedown=javascript:setImg(this,'tiles:getAsString name='imgName'/_hot_down.gif') onmouseout=javascript:setImg(this,'tiles:getAsString name='imgName'/.gif') -- To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org _ STOP MORE SPAM with the new MSN 8 and get 2 months FREE* http://join.msn.com/?page=features/junkmail -- To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org -- To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org
How to validate manually?
Because I need to allow the user to come and go from the form before the final submit, I need to hold off on validation until that point. So I've got validate=false (that was a gotcha!) in the action tag and I'm now in my LookupDispatchAction doing the validation manually: How does this look? request.removeAttribute(org.apache.struts.action.ERROR); ActionErrors er = ((ContactForm) form).validate(mapping, request); if ( !er.isEmpty() ) { request.setAttribute(org.apache.struts.action.ERROR, er); return ( mapping.findForward( edit ) ); } Can someone point me to where in the struts source code this is done automatically when validate is set to true in the action tag? I've grepped through the source code for 'ERROR' but there was too much! Thanks, -- Wendy Smoak http://sourceforge.net/projects/unidbtags
RE: [Tiles] Tiles vs. Custom Tag - anyone have a view?
My preferences gears toward Tiles for flexibilities and re-usable View components Out weight the performance issue. outburst Tiles Kick Ass! /outburst :-) Trieu, Danny [EMAIL PROTECTED] on 11/07/2002 11:16:34 AM Please respond to Struts Users Mailing List [EMAIL PROTECTED] To:'Struts Users Mailing List' [EMAIL PROTECTED] cc: Subject:RE: [Tiles] Tiles vs. Custom Tag - anyone have a view? If Hue was to use Tiles' definition, then much more flexible. My preference is To use Tiles in this case. Of course, when performance become an issues then you Might want to consider other approach, and this could be using tags. Or, use Fragmented-cache, I mean using cache tags to prevent Tiles' components from rendering Again. My preferences gears toward Tiles for flexibilities and re-usable View components Out weight the performance issue. Danny Ps. Cedric, UR-Rock -Original Message- From: David Graham [mailto:dgraham1980;hotmail.com] Sent: Wednesday, November 06, 2002 8:52 PM To: [EMAIL PROTECTED] Subject: Re: [Tiles] Tiles vs. Custom Tag - anyone have a view? How many milliseconds faster/slower is the tiles solution vs. the custom tag solution? When you use a custom tag, can you perceive a difference in page load time? Until you can answer those questions, stick with what you have. Programmers are notoriously bad at guessing where a performance problem is and you need real data to make a decision. David From: Hue Holleran [EMAIL PROTECTED] Reply-To: Struts Users Mailing List [EMAIL PROTECTED] To: Struts Users Mailing List \(E-mail\) [EMAIL PROTECTED] Subject: [Tiles] Tiles vs. Custom Tag - anyone have a view? Date: Wed, 6 Nov 2002 18:01:34 - We've been using tiles extensively in an app and it has been extremely effective - as one might expect for including tiles of information on a page and consolidating standard layout into templates - however I'm concerned that we might be going too far in its use... and using it where we might otherwise have used a custom tag: For a single img that is used extensively in an app that has mouseover/out/down behaviour, e.g. (in HTML - lots of code left out deliberately here): img src=/images/navigation/right.gif onmouseover=javascript:setImg(this,'/images/right_hot.gif') onmousedown=javascript:setImg(this,'/images/right_hot_down.gif') onmouseout=javascript:setImg(this,'/images/right.gif') This can be much simplified to including a tile of just this control: tiles:insert template=/tiles-components/controls/imgactive.jsp tiles:put imgName=/images/right / /tiles:insert The alternative would be a custom tag, e.g: sshtml:imgactive imgName=/images/navigation/right / Which is obviously much easier to include but so much less flexible - requiring editing tag handler java code to edit html - and all of the issues this entails - tiles allows us to edit the html in a nice easy jsp. This is much more effective for complete chunks of html and has saved huge amounts of time for large composite controls that we have everywhere. I feel it is neater but am concerned we are introducing too much processing for just producing the html for the control - does anyone else have a view on this ... any comments appreciated (even Stupid Idea if this is). (code for the template is included below). Thanks, Hue. /tiles-components/controls/imgactive.jsp %@ taglib uri=/WEB-INF/struts-tiles.tld prefix=tiles % img src=tiles:getAsString name='imgName'/.gif onmouseover=javascript:setImg(this,'tiles:getAsString name='imgName'/_hot.gif'); onmousedown=javascript:setImg(this,'tiles:getAsString name='imgName'/_hot_down.gif') onmouseout=javascript:setImg(this,'tiles:getAsString name='imgName'/.gif') -- To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org _ STOP MORE SPAM with the new MSN 8 and get 2 months FREE* http://join.msn.com/?page=features/junkmail -- To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org -- To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org -- To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org
RE: [Tiles]TilesAction and contents changing dynamically
Sure you can -Original Message- From: yoko hama [mailto:myohott;hotmail.com] Sent: Wednesday, November 06, 2002 6:52 PM To: [EMAIL PROTECTED] Subject: [Tiles]TilesAction and contents changing dynamically Hi,guys. I am a newbie to struts and tiles. I wonder how can i get a part of my contents changed in a jsp dynamically without changing the other part by using tiles,although i can do it by frame.After search the tiles documents,i found maybe i can do it by extends the TilesAction.But how can i get the component context from the jsp? Thanks in advance Thomas.W _ Help STOP SPAM with the new MSN 8 and get 2 months FREE* http://join.msn.com/?page=features/junkmail -- To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org -- To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org
RE: [Tiles] Tiles vs. Custom Tag - anyone have a view?
-Original Message- From: [EMAIL PROTECTED] [SMTP:[EMAIL PROTECTED]] Sent: Thursday, November 07, 2002 10:48 PM To: Struts Users Mailing List Subject: RE: [Tiles] Tiles vs. Custom Tag - anyone have a view? My preferences gears toward Tiles for flexibilities and re-usable View components Out weight the performance issue. outburst Tiles Kick Ass! /outburst :-) Trieu, Danny [EMAIL PROTECTED] on 11/07/2002 11:16:34 AM Please respond to Struts Users Mailing List [EMAIL PROTECTED] To:'Struts Users Mailing List' [EMAIL PROTECTED] cc: Subject:RE: [Tiles] Tiles vs. Custom Tag - anyone have a view? If Hue was to use Tiles' definition, then much more flexible. My preference is To use Tiles in this case. Of course, when performance become an issues then you Might want to consider other approach, and this could be using tags. Or, use Fragmented-cache, I mean using cache tags to prevent Tiles' components from rendering Again. My preferences gears toward Tiles for flexibilities and re-usable View components Out weight the performance issue. Danny Ps. Cedric, UR-Rock -Original Message- From: David Graham [mailto:dgraham1980;hotmail.com] Sent: Wednesday, November 06, 2002 8:52 PM To: [EMAIL PROTECTED] Subject: Re: [Tiles] Tiles vs. Custom Tag - anyone have a view? How many milliseconds faster/slower is the tiles solution vs. the custom tag solution? When you use a custom tag, can you perceive a difference in page load time? Until you can answer those questions, stick with what you have. Programmers are notoriously bad at guessing where a performance problem is and you need real data to make a decision. David From: Hue Holleran [EMAIL PROTECTED] Reply-To: Struts Users Mailing List [EMAIL PROTECTED] To: Struts Users Mailing List \(E-mail\) [EMAIL PROTECTED] Subject: [Tiles] Tiles vs. Custom Tag - anyone have a view? Date: Wed, 6 Nov 2002 18:01:34 - We've been using tiles extensively in an app and it has been extremely effective - as one might expect for including tiles of information on a page and consolidating standard layout into templates - however I'm concerned that we might be going too far in its use... and using it where we might otherwise have used a custom tag: For a single img that is used extensively in an app that has mouseover/out/down behaviour, e.g. (in HTML - lots of code left out deliberately here): img src=/images/navigation/right.gif onmouseover=javascript:setImg(this,'/images/right_hot.gif') onmousedown=javascript:setImg(this,'/images/right_hot_down.gif') onmouseout=javascript:setImg(this,'/images/right.gif') This can be much simplified to including a tile of just this control: tiles:insert template=/tiles-components/controls/imgactive.jsp tiles:put imgName=/images/right / /tiles:insert The alternative would be a custom tag, e.g: sshtml:imgactive imgName=/images/navigation/right / Which is obviously much easier to include but so much less flexible - requiring editing tag handler java code to edit html - and all of the issues this entails - tiles allows us to edit the html in a nice easy jsp. This is much more effective for complete chunks of html and has saved huge amounts of time for large composite controls that we have everywhere. I feel it is neater but am concerned we are introducing too much processing for just producing the html for the control - does anyone else have a view on this ... any comments appreciated (even Stupid Idea if this is). (code for the template is included below). Thanks, Hue. /tiles-components/controls/imgactive.jsp %@ taglib uri=/WEB-INF/struts-tiles.tld prefix=tiles % img src=tiles:getAsString name='imgName'/.gif onmouseover=javascript:setImg(this,'tiles:getAsString name='imgName'/_hot.gif'); onmousedown=javascript:setImg(this,'tiles:getAsString name='imgName'/_hot_down.gif') onmouseout=javascript:setImg(this,'tiles:getAsString name='imgName'/.gif') -- To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org _ STOP MORE SPAM with the new MSN 8 and get 2 months FREE* http://join.msn.com/?page=features/junkmail -- To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org -- To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org -- To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org For additional commands, e-mail:
Re: NullpointerException in ActionForms
Well, let's say (form == null) evaluates to true. Which is entirely possible if you don't specify a name (or attribute) attribute for the action element. However, that means that mapping.getAttribute() will also evaluate to null, right? If so, then I'm thinking that request.setAttribute and session.setAttribute will likely throw an NPE when they get invoked (or something else equally evil). So, it looks like it's not only unnecessary, it's just plain wrong. I'm guessing that the reason it works is that the only mapping for EditSubscriptionAction is this: action path=/editSubscription type=org.apache.struts.webapp.example.EditSubscriptionAction attribute=subscriptionForm scope=request validate=false forward name=failure path=/mainMenu.jsp / forward name=success path=/subscription.jsp / /action which has a value for the attribute attribute ;-) and so Struts will auto- create the form. Quoting Wendy Smoak [EMAIL PROTECTED]: EB There is a contract between actions and the forms they use: The form EB *will* be created. This can be evidenced by the source (see EB RequestProcessor.java). Dirk wrote: Yes, the form does exist. As Reinhard wrote the NPE occurs *inside* the validate methods. Seems like the validate methods is using objects which do not exist. Given the facts above, can someone comment on this code in the struts-example webapp? from EditSubscriptionAction.java in the execute() method: // Populate the subscription form if (form == null) { if (log.isTraceEnabled()) { log.trace( Creating new SubscriptionForm bean under key + mapping.getAttribute()); } form = new SubscriptionForm(); if (request.equals(mapping.getScope())) { request.setAttribute(mapping.getAttribute(), form); } else { session.setAttribute(mapping.getAttribute(), form); } } Is that whole block just not necessary? -- Wendy Smoak http://sourceforge.net/projects/unidbtags -- Kris Schneider mailto:kris;dotech.com D.O.Tech http://www.dotech.com/ -- To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org
Re: Diiabling Validator XML Validation
On Wed, 6 Nov 2002, David Graham wrote: Date: Wed, 06 Nov 2002 13:34:33 -0700 From: David Graham [EMAIL PROTECTED] Reply-To: Struts Users Mailing List [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: Re: Diiabling Validator XML Validation Oops, you're right. I don't know how to disable the validator's dtd validation. It seems like a dev. box that's not connected to the net is pretty useless. How do you look up docs, check the mailing list, etc? Struts keeps an internal copy of the DTDs it uses, so you can indeed validate offline. If this is not working for you, it means one of two things: * You've mis-typed the public identifier in the DOCTYPE -- this is what Struts uses to match up on and select the internal copy. * The XML parser you're using is broken. David Craig -- To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org
Re: Graph of Struts Growth.l
On Wed, 6 Nov 2002, Robert Leland wrote: Date: Wed, 06 Nov 2002 14:10:54 -0500 From: Robert Leland [EMAIL PROTECTED] Reply-To: Struts Users Mailing List [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Subject: Graph of Struts Growth.l Back in Feburary of 2001 when I proposed to my new employer that we use struts, one of the items I looked at was mailing list traffic, between it and other open source projects. I have been keeping that chart up to date and thought people here might find it interesting. This is a simplified chart which only shows tomcat and struts list traffic. Back then the tomcat mailing list traffic was so large that it made the struts mailing list traffic look like a straight line. That has definately changed ! Over time, the subscription count on the Struts user list has also been approaching that of the Tomcat user list (largest user list on Jakarta since forever) as well. As of today, and counting digest subsribers to both lists: STRUTS-USER = 2376 TOMCAT-USER = 2433 Almost there! -Rob Craig -- To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org
Re: Graph of Struts Growth.l
On Wed, 6 Nov 2002, James Holmes wrote: Date: Wed, 6 Nov 2002 11:18:18 -0800 (PST) From: James Holmes [EMAIL PROTECTED] Reply-To: Struts Users Mailing List [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Subject: Re: Graph of Struts Growth.l Very interesting! I would tend to agree with these numbers as the Struts Console download rate has significantly increased over time. I get over a hundred downloads a day now versus under 50 several months ago. I wonder if there are any numbers for how many Struts downloads there are? 1.0 vs 1.1 vs nighlty? -james http://www.jamesholmes.com/struts/ Last time I checked (several months ago), Struts downloads as a whole (I didn't keep my notes on the split) were in the 10-20k/month range, compared to Tomcat's 80-100k/month. I'll see if I can dig up some more recent figures -- but I don't personally have access to any nice log analysis software that would make this easy. Can someone point me to something useful I can throw against (say) the October 2002 log files? Craig -- To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org
Re: How to validate manually?
Check out Action.saveErrors for saving the errors returned from your call to validate: saveErrors(request, null); // clear current errors if you want ActionErrors er = form.validate(mapping, request); if ((er != null) (!er.isEmpty())) { saveErrors(request, er); forward = new ActionForward(mapping.getInput()); } Quoting Wendy Smoak [EMAIL PROTECTED]: Because I need to allow the user to come and go from the form before the final submit, I need to hold off on validation until that point. So I've got validate=false (that was a gotcha!) in the action tag and I'm now in my LookupDispatchAction doing the validation manually: How does this look? request.removeAttribute(org.apache.struts.action.ERROR); ActionErrors er = ((ContactForm) form).validate(mapping, request); if ( !er.isEmpty() ) { request.setAttribute(org.apache.struts.action.ERROR, er); return ( mapping.findForward( edit ) ); } Can someone point me to where in the struts source code this is done automatically when validate is set to true in the action tag? I've grepped through the source code for 'ERROR' but there was too much! Thanks, -- Wendy Smoak http://sourceforge.net/projects/unidbtags -- Kris Schneider mailto:kris;dotech.com D.O.Tech http://www.dotech.com/ -- To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org
RE: [ANNOUNCE] Struts In Action now in print
Tan apenas imprima y sujete con grapa el libro. James Mitchell Software Engineer/Struts Evangelist http://www.open-tools.org Only two things are infinite, the universe and human stupidity, and I'm not sure about the former. - Albert Einstein (1879-1955) -Original Message- From: Adolfo Miguelez [mailto:pelly69;hotmail.com] Sent: Thursday, November 07, 2002 12:00 PM To: [EMAIL PROTECTED] Subject: Re: [ANNOUNCE] Struts In Action now in print sorry, I mistaked the target address :-O From: Ted Husted [EMAIL PROTECTED] Reply-To: Struts Users Mailing List [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Subject: [ANNOUNCE] Struts In Action now in print Date: Thu, 07 Nov 2002 10:47:39 -0500 The Manning book, Struts in Action, is now available for sale at the publisher's website www.manning.com/husted and will arrive at bookstores everywhere over the next few weeks. Struts solves the most common problems of Web development by providing an open source framework for building Web applications. As the only book with full coverage of both Struts 1.0 and the upcoming Struts 1.1, Struts in Action points out the differences between the two and builds a case study that illustrates the transition from one to the other. The authors of the Manning book are core members of the Struts community who are intimately involved in the Struts development process. Manning makes this text available in either ebook edition for $22.47 or print edition for $44.95 at www.manning.com/husted. If you order the ebook from Manning's website first, you will receive a special offer on the print edition. If you later purchase the print edition from the publishers website, Manning will deduct the cost of the ebook from the print edition order - that's both editions for $44.95! Please remember, to get this deal, you must order the ebook first. Struts in Action By Ted N. Husted, Cedric Dumoulin, George Franciscus, David Winterfeldt ISBN 1930110502 Softbound, 664 pages, $44.95 Ebook, 2.5 Mb PDF, $22.47 www.manning.com/husted ### -- To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org _ MSN 8 helps eliminate e-mail viruses. Get 2 months FREE*. http://join.msn.com/?page=features/virus -- To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org -- To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org
RE: [ANNOUNCE] Struts In Action now in print
On Thu, 7 Nov 2002, James Childers wrote: Date: Thu, 7 Nov 2002 10:07:46 -0600 From: James Childers [EMAIL PROTECTED] Reply-To: Struts Users Mailing List [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Subject: RE: [ANNOUNCE] Struts In Action now in print Congratulations, Ted. For those of you who do not know, Ted has been one of the most valuable contributors to the Struts community for a long, long time. He has showed both great knowledge and extreme patience when dealing with the user community, and Struts would not be the same without him. +1. And that's no disrespect to the other committers as well, who have also been incredibly cool to work with. I have no problems recommending the book sight-unseen based solely upon Ted's reputation. It's good. And the book also had valuable contributions from several other key players (not necessarily counting my foreword as valuable :-). -= James Craig -- To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org
Re: How to validate manually?
Whoops! You also asked where the Struts source code is. For 1.1 it's in: RequestProcessor.processValidate And I think to be correct for 1.1 I should've said: forward = mapping.getInputForward() Quoting Kris Schneider [EMAIL PROTECTED]: Check out Action.saveErrors for saving the errors returned from your call to validate: saveErrors(request, null); // clear current errors if you want ActionErrors er = form.validate(mapping, request); if ((er != null) (!er.isEmpty())) { saveErrors(request, er); forward = new ActionForward(mapping.getInput()); } Quoting Wendy Smoak [EMAIL PROTECTED]: Because I need to allow the user to come and go from the form before the final submit, I need to hold off on validation until that point. So I've got validate=false (that was a gotcha!) in the action tag and I'm now in my LookupDispatchAction doing the validation manually: How does this look? request.removeAttribute(org.apache.struts.action.ERROR); ActionErrors er = ((ContactForm) form).validate(mapping, request); if ( !er.isEmpty() ) { request.setAttribute(org.apache.struts.action.ERROR, er); return ( mapping.findForward( edit ) ); } Can someone point me to where in the struts source code this is done automatically when validate is set to true in the action tag? I've grepped through the source code for 'ERROR' but there was too much! Thanks, -- Wendy Smoak http://sourceforge.net/projects/unidbtags -- Kris Schneider mailto:kris;dotech.com D.O.Tech http://www.dotech.com/ -- To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org -- Kris Schneider mailto:kris;dotech.com D.O.Tech http://www.dotech.com/ -- To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org
resource properties not found
I have a resource property defined in my web.xml file as follows: servlet ... init-param param-nameapplication/param-name param-valueVCSCResources_en_US.properties/param-value /init-param ... /servlet This properties file is in the application jar file at the root. And I'm trying to access a property as follows in my jsp: bean:message key=container.search.event/ I get the following error: javax.servlet.jsp.JspException: Missing message for key container.search.event at org.apache.struts.taglib.bean.MessageTag.doStartTag(MessageTag.java:242) at jsp_servlet._st.__ContainerList._jspService(__ContainerList.java:205) at weblogic.servlet.jsp.JspBase.service(JspBase.java:27) at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java :265) at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java :200) at weblogic.servlet.internal.RequestDispatcherImpl.forward(RequestDispatcherImp l.java:241) at org.apache.struts.action.ActionServlet.processActionForward(ActionServlet.ja va:1759) at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1596) at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:510) at javax.servlet.http.HttpServlet.service(HttpServlet.java:760) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java :265) at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java :200) at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletCo ntext.java:2495) at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java :2204) at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:139) at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120) What else needs to be condigured? What else can I look at to resolve this issue? Thanks, Cindy -- To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org
RE: resource properties not found
Cindy, A couple of things you can try: 1) Take off the _en_US from the end of the filename prefix. You don't really need it if your system is already set up to use US English by default. 2) Make sure it's in the right directory. From the way you have it defined it should be located in WEB-INF/classes, although judging by the error message you're getting this is probably already there. 3) Double check the bundle to make sure that resource key exists and has a value. -= James -Original Message- From: Cindy Horn at SF x4874 [mailto:CHorn;matson.com] Sent: Thursday, November 07, 2002 12:09 PM To: Struts (E-mail) Subject: resource properties not found I have a resource property defined in my web.xml file as follows: servlet ... init-param param-nameapplication/param-name param-valueVCSCResources_en_US.properties/param-value /init-param ... /servlet This properties file is in the application jar file at the root. And I'm trying to access a property as follows in my jsp: bean:message key=container.search.event/ I get the following error: javax.servlet.jsp.JspException: Missing message for key container.search.event at org.apache.struts.taglib.bean.MessageTag.doStartTag(MessageTag .java:242) at jsp_servlet._st.__ContainerList._jspService(__ContainerList.java:205) at weblogic.servlet.jsp.JspBase.service(JspBase.java:27) at weblogic.servlet.internal.ServletStubImpl.invokeServlet(Servle tStubImpl.java :265) at weblogic.servlet.internal.ServletStubImpl.invokeServlet(Servle tStubImpl.java :200) at weblogic.servlet.internal.RequestDispatcherImpl.forward(Reques tDispatcherImp l.java:241) at org.apache.struts.action.ActionServlet.processActionForward(Ac tionServlet.ja va:1759) at org.apache.struts.action.ActionServlet.process(ActionServlet.j ava:1596) at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:510) at javax.servlet.http.HttpServlet.service(HttpServlet.java:760) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at weblogic.servlet.internal.ServletStubImpl.invokeServlet(Servle tStubImpl.java :265) at weblogic.servlet.internal.ServletStubImpl.invokeServlet(Servle tStubImpl.java :200) at weblogic.servlet.internal.WebAppServletContext.invokeServlet(W ebAppServletCo ntext.java:2495) at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRe questImpl.java :2204) at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:139) at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120) What else needs to be condigured? What else can I look at to resolve this issue? Thanks, Cindy -- To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org -- To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org
RE: resource properties not found
The properties files should be stored in the WEB-INF/classes directory of your WAR file, according to the package path you specified. The param-value element should just specify the base name of the properties file. So, you should have just VCSCResources as your param-value value. -Original Message- From: Cindy Horn at SF x4874 [mailto:CHorn;matson.com] Sent: Thursday, November 07, 2002 10:09 AM To: Struts (E-mail) Subject: resource properties not found I have a resource property defined in my web.xml file as follows: servlet ... init-param param-nameapplication/param-name param-valueVCSCResources_en_US.properties/param-value /init-param ... /servlet This properties file is in the application jar file at the root. And I'm trying to access a property as follows in my jsp: bean:message key=container.search.event/ I get the following error: javax.servlet.jsp.JspException: Missing message for key container.search.event -- To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org
Ted, et al, Struts Book
I have been into the online version a bit, and am loving it. How do we get credit when ordering the hard copy? The site mentions the credit but seems to have no mechanism that is obvious. Micael --- This electronic mail transmission and any accompanying documents contain information belonging to the sender which may be confidential and legally privileged. This information is intended only for the use of the individual or entity to whom this electronic mail transmission was sent as indicated above. If you are not the intended recipient, any disclosure, copying, distribution, or action taken in reliance on the contents of the information contained in this transmission is strictly prohibited. If you have received this transmission in error, please delete the message. Thank you -- To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org
FW: validation + multiple sub applications.....
Hi, I wonder if anybody else has experienced this strange behaviour: When using auto-validation in two forms (two different sub-apps) it doesn´t seem to work on both. The second one always returns an empty ActionErrors even if I have left fields empty. Now, after having deleted the first sub-application temporarily out of the web.xml, the validation suddenly seems to work after all in the first app!? What could this be? Are there values being overwritten perhaps when validating more than one sub-app? Can someone confirm that they have validated various forms in multiple sub-applications? Any help appreciated. Regards, Michael -- To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org
RE: Steps to Get JRUN 3.1 and Struts 1.1b2 working
Steve, No, I understand what you are doing now that you've explained it. I had not thought of taking your approach. You might want to post your fix on the JRUN board, as a number of people have tried to get JRUN 3.1 working with Struts 1.1b2 with no success. Macromedia support has not responded to the issue, probably because JRUN 4.0 is out, and they would prefer that people upgrade. You way sounds much better than the round about way I found to get Struts 1.1b2 working with JRUN 3.1 Thanks for the clarification! Celeste -Original Message- From: Steve Fyfe [mailto:sdf;cnicorp.com] Sent: Wednesday, November 06, 2002 8:10 AM To: [EMAIL PROTECTED]; [EMAIL PROTECTED] Subject: RE: Steps to Get JRUN 3.1 and Struts 1.1b2 working Celeste, In my case, in order to get Struts 1.1 to work in a JRun 3.1 system I wrote one simple class, and plugged that class into the system by specifying the class name in the web.xml file. The complete class was included in my last email. All the class does is set the Action Servlet's context class loader, then it starts the Action Servlet as normal. My class is not a class loader itself, nor does it modify the Struts source code or require a rebuild of the struts.jar file. Yes, this is a workaround, but I would not call it a hack. You can completely document the problem with its solution in a few comments in the web.xml file to prevent confusion in the future. If you are still confused, send me a message off-list with more specific questions. Steve Steve Fyfe CNI Corporation Milford NH 03055 [EMAIL PROTECTED] Haseltine, Celeste [EMAIL PROTECTED] Tuesday, November 05, 2002 7:24:43 PM Steve, I'm a little confused. Your first item was just a change in the JRUN 3.1 web.xml file, correct? Or are you creating your own JRUN 3.1 action class loader to correctly preload the action class? And the second item regarding the public void init method (as seen below), is this a modification to the Struts source code, and a local rebuild of the struts.jar file? If so, I wanted to avoid this step, and use Struts 1.1b2 as is. To me a modification of the struts source code is just a hack workaround that will end up confusing the people who come after me on on this project. public void init(javax.servlet.ServletConfig sc) throws javax.servlet.ServletException { Thread.currentThread().setContextClassLoader( this.getClass().getClassLoader()); super.init(sc); } } Let me know if I misunderstood you. If there is a better way to get Struts 1.1b2 working under JRUN 3.1, I will reconsider my decision to start our new project in Struts 1.02. But I have to come up with a way that does NOT involve an obscure or hack work around, so that when I move onto the next project, and leave these guys to maintain this, they can rebuild the system without someone remembering that something unusual had to be done to get the project restored onto the server. And modifying the Struts source code is NOT an acceptable option for us. What happened to our partner who was based in the World Trade Center taught us a lesson the hard way, when it comes to reinstalling your web apps on new hardware, and getting them up and running again. Thanks for any additional insight/advice you can offer. Celeste Haseltine, PE MTL, Inc Dallas, TX -Original Message- From: Steve Fyfe [mailto:sdf;cnicorp.com] Sent: Tuesday, November 05, 2002 1:52 PM To: [EMAIL PROTECTED] Subject: Re: Steps to Get JRUN 3.1 and Struts 1.1b2 working As promised, I am posting the steps I took to get Struts 1.1b2 working in JRUN 3.1. I only got the example application working, I did not bother to get the other web apps bundled with Struts 1.1b2 working. So I can't guarantee that I found EVERY problem in getting Struts 1.1b2 working in JRUN 3.1. As you can see, the steps necessary to get Struts 1.1b2 working are such that you cannot run any 1.02 Struts apps on the same physical server in JRUN 3.1. I cannot comment on all the steps you went through, but I do know that I was able to get my Struts application to load and run from the standard WEB-INF folders. So in my case, it should be possible to share the machine with Struts 1.0.2 based webapps. I avoided the classloader problems by using the following code to initialize the Action Servlet's context class loader at startup: /** * Inserts initialization code into the beginning of the ActionServlet. * p * For JRun 3.1, replace the class specified for the ActionServlet in web.xml with * the full name of this class. */ public class Struts11JrunAdaptor extends org.apache.struts.action.ActionServlet { /** * Before running the code in the standard Struts v1.1 ActionServlet, initialize * the thread's classloader. This problem is fixed in JRun v4, so only use this * module on JRun v3.1. * * @param sc
Is it possible to configure where to forward if ActionForm.validate returns false?
Hi, in a Tiles JSP page, when ActionForm.validate returns false, not the JSP will be called that creates the complete layout but the JSP that contains the form. How can I tell struts which JSP should be called if ActionForm.validate returns false? Zsolt -- To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org
Re: Is it possible to configure where to forward if ActionForm.validate returnsfalse?
Struts sends the request to the input page when validate returns false. You configure this via the input attribute of the action element in struts-config.xml David From: Zsolt Koppany [EMAIL PROTECTED] Reply-To: Struts Users Mailing List [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: Is it possible to configure where to forward if ActionForm.validate returns false? Date: Thu, 7 Nov 2002 19:52:16 +0100 Hi, in a Tiles JSP page, when ActionForm.validate returns false, not the JSP will be called that creates the complete layout but the JSP that contains the form. How can I tell struts which JSP should be called if ActionForm.validate returns false? Zsolt -- To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org _ The new MSN 8: smart spam protection and 2 months FREE* http://join.msn.com/?page=features/junkmail -- To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org
New ApacheCon session: What's New in Struts 1.1
For anyone going to ApacheCon, this may be of interest. robert -Original Message- From: Rodent of Unusual Size [mailto:Ken.Coar;Golux.Com] Sent: Thursday, November 07, 2002 2:16 PM To: [EMAIL PROTECTED]; [EMAIL PROTECTED] Subject: ApacheCon schedule change Another change to the ApacheCon 2002 US schedule: Stig Bakken has had to withdraw his TU07 session,'PEAR: Easy PHP Re-use'. It has been replaced with Craig McClanahan and 'What's New in Struts 1.1'. -- #kenP-)} Ken Coar, Sanagendamgagwedweinini http://Golux.Com/coar/ Author, developer, opinionist http://Apache-Server.Com/ Millennium hand and shrimp! - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org
RE: form component reuse best practices?
To serve just this purpose: I have created a ListFactory that I initialize using a PlugIn when my Struts app starts. The PlugIn creates an instance of the factory and stashes a reference to it in Application scope. Then my Actions or JSPs use a getList(String listName) method on the stashed ListFactory to get the desired List of ListBeans that represent the List keys and values. My ListFactory also holds its own connection to the Model layer and caches Lists that it has previously retrieved. This gives me a single point of access with caching functionality built-in for all my re-usable HTML drop down list keys and values. Then I created a generic JSP template that I can include into my forms to display the lists and defined a template for it using Tiles. Here is my example: Tiles-def.xml - !-- === -- !-- Drop Down List definitions -- !-- === -- definition name=doc.ddList path=/pages/tiles/ddl/ddlist.jsp/ !-- Retrieves allowed Credit Card types -- definition name=ddl.cc_type extends=doc.ddList put name=value.ddList content=CCTYPE direct=true/ put name=value.property content=cc_type direct=true/ /definition !-- === -- !-- Form definitions -- !-- === -- definition name=form.billingForm extends=doc.templateForm put name=page.formBody content=/pages/tiles/client/billinfo.jsp/ put name=ddl.cc_type content=ddl.cc_type/ /definition /pages/tiles/ddl/ddlist.jsp % page language =java import=zzz.mycompany.Constants % % taglib uri=/tags/struts/html prefix=html % % taglib uri=/tags/struts/bean prefix=bean % % taglib uri=/tags/struts/tiles prefix=tiles % % taglib uri=/tags/struts/logic prefix=logic % %-- Tile that defines a generic Drop Down List Defines component attributes for Drop Down List value.ddList = Listname to retrieve from Factory value.property = Form property to set for value selected by client --% tiles:useAttribute id=ddList name=value.ddList/ tiles:useAttribute id=property name=value.property/ bean:define id=factory name=%= Constants.LISTFACTORY % type=zzz.mycompany.ListFactory/ bean:define id=list name=%= Constants.LISTFACTORY % property='%= list( + ddList.toString() + ) %' type=java.util.List/ html:select property=%= property.toString() % html:options collection=list labelProperty=description property=title / /html:select My example may not work as posted above because I have removed some lines of code for easier reading, but you should be able to get the gist of it. Jason Rosen -Original Message- From: Andy Kriger [mailto:akriger;greaterthanone.com] Sent: Thursday, November 07, 2002 9:02 AM To: Struts Users Mailing List Subject: form component reuse best practices? (this is a refinement of a question i asked yesterday) If you have common form components that can be reused multiple times on a page or between projects (e.g. a list of months for date entry, a list of states for address entry), what is the best way to share this code (the html:select/html:option items)? Do you use a backing static bean and html:options to point to that bean? Any ideas would be appreciated. thanks andy kriger -- To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org -- To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org
Re: Best Practice: Organizing Bean Key Error Key Constants?
I would say that your example is good practice, that is in constants. I sometimes put them in an interfaces. As far as keys, I just use getMetaData. Also, most of my primary keys are called ID and auto generated by db as sequence for high load support. hth, .V Hohlen, John wrote: Are there any best practices on how to organize all the bean key and error key constants that created when implementing a Struts application? I'm assuming most people create String constants for the name of keys used to: 1) store/retrieve bean data to/from application and session scope 2) error messages from the application resources file. My project currently puts all their bean key constants in their own package for a module. For example: public final class BeanConstants { public static final String SALESPERSON_DEFAULT_PLAN_NAME_KEY = planassociations.salespersonDefaultPlanName; public static final String SALESPERSON_CURRENT_PLAN_ID_KEY = planassociations.salespersonCurrentPlanId; ... } Are others creating classes like this or are they just hard-coding the key names when needed? The use of constants helps guard against typos when a bean key is used in multiple places. Obviously, a hard-coded string will always compile, so a typo won't be detected until run-time (e.g. bean not found error). In addition, with this approach, are others importing the BeanConstants class in their JSP so they can reference the constant instead of hard-coding the string in the JSP as well? My project doesn't allow any Java scriplet code in their JSPs, but this might become our only exception. Finally, where are you defining the keys for error messages? Are you using constants or just hard-coding them? If you're using constants for the error keys, are they in the action or an ErrorKeyConstants class (similar to the bean key constants class above). In some cases, the same error key (or message) will be used by multiple actions. I looked in some of the new Struts books (Ted Husted's Chuck Cavaness') as well as the mailing lists and didn't really see much on this topic. Most code examples use the hard-coded String approach for brevity purposes. Thanks, JOHN -- To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org
RE: Return to same JSP
Hi, That is what I meant in my first mail. Like the following 1. Look up an ActionMapping. 2. If the ActionMapping has an ActionForm specified, it instantiates (or retrieves from session scope) the ActionForm and populates it based on the request. 3. If the ActionMapping specifies validate, Struts calls the ActionForm's validate method. 4. If validate returns a non-zero-length ActionErrors object, Struts forwards control to the ActionMapping's specified input path rather than forwarding control to the action class associated with the mapping Thanks, Mohan -Original Message- From: Homer, Christopher [mailto:Christopher.Homer;ds-s.com] Sent: Thursday, November 07, 2002 6:30 PM To: 'Struts Users Mailing List' Subject: RE: Return to same JSP providing you perform the validation in your ActionForm method: public ActionErrors validate (ActionMapping mapping, HttpServletRequest request) { // stuff } -Original Message- From: Mohan Radhakrishnan [mailto:MohanR;hclcomnet.co.in] Sent: 07 November 2002 12:59 To: 'Struts Users Mailing List' Subject: RE: Return to same JSP Hi, Thanks. I though it was automatic ? bye, Mohan -Original Message- From: Max Kutny [mailto:mkut;umc.com.ua] Sent: Thursday, November 07, 2002 6:13 PM To: Struts Users Mailing List Subject: Re: Return to same JSP MR Hi, If I return a non-empty ActionError from my validate method, MR struts should return to the same JSP. This will happen if I specify MR the input parameter for the action mapping. MR Is this right ? It doesn't seem to work that way. Am I missing MR something ? You should use return new ActionForward(mapping.getInput()); -- Max Kutny -- To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org -- To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org -- To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org -- To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org
Re: Steps to Get JRUN 3.1 and Struts 1.1b2 working
Perhaps your problem is related to this Bug report ? http://nagoya.apache.org/bugzilla/show_bug.cgi?id=14332 Also see topic strust-dev, why it may not be a bug in struts but in the Application Server. http://marc.theaimsgroup.com/?l=struts-devm=103669629505455w=3 Re: [Vote] Modify classloading in RequestUtils -Rob -- To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org
RE: Return to same JSP
Use your action mapping as your input path. For example: action path=/partEdit name=partForm type=com.csmi.doe.core.controller.actions.project.EditPartAction scope=request validate=false forward name=Success path=tiles.project.editPart/ forward name=failure path=tiles.errors.pagenotfound/ /action action path=/partUpdate name=partForm type=com.csmi.doe.core.controller.actions.project.UpdatePartAction scope=request validate=true input=/action/partEdit forward name=Success path=/action/projectdetail redirect=true/ /action Kurt Madel Programmer, CSMi (703) 823-4300 ext. 170 -Original Message- From: Mohan Radhakrishnan [mailto:MohanR;hclcomnet.co.in] Sent: Thursday, November 07, 2002 8:26 AM To: 'Struts Users Mailing List' Subject: RE: Return to same JSP Hi, That is what I meant in my first mail. Like the following 1. Look up an ActionMapping. 2. If the ActionMapping has an ActionForm specified, it instantiates (or retrieves from session scope) the ActionForm and populates it based on the request. 3. If the ActionMapping specifies validate, Struts calls the ActionForm's validate method. 4. If validate returns a non-zero-length ActionErrors object, Struts forwards control to the ActionMapping's specified input path rather than forwarding control to the action class associated with the mapping Thanks, Mohan -Original Message- From: Homer, Christopher [mailto:Christopher.Homer;ds-s.com] Sent: Thursday, November 07, 2002 6:30 PM To: 'Struts Users Mailing List' Subject: RE: Return to same JSP providing you perform the validation in your ActionForm method: public ActionErrors validate (ActionMapping mapping, HttpServletRequest request) { // stuff } -Original Message- From: Mohan Radhakrishnan [mailto:MohanR;hclcomnet.co.in] Sent: 07 November 2002 12:59 To: 'Struts Users Mailing List' Subject: RE: Return to same JSP Hi, Thanks. I though it was automatic ? bye, Mohan -Original Message- From: Max Kutny [mailto:mkut;umc.com.ua] Sent: Thursday, November 07, 2002 6:13 PM To: Struts Users Mailing List Subject: Re: Return to same JSP MR Hi, If I return a non-empty ActionError from my validate method, MR struts should return to the same JSP. This will happen if I specify MR the input parameter for the action mapping. MR Is this right ? It doesn't seem to work that way. Am I missing MR something ? You should use return new ActionForward(mapping.getInput()); -- Max Kutny -- To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org -- To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org -- To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org -- To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org -- To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org
working with resource.properties files in JSTL Struts
What is recognized way to get JSTL fmt:message tag to share the same resources bundle as Struts bean:message tag? Thanks Anthony -- To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org
Re: back button
Can the isTokenValid and saveToken be in the same Action ? Gus Delgado wrote: I'm trying to use the saveToken function but is not working here is what I have: a parameter called action if(save.equals(request.getParameter(action))) { if(!isTokenValid(request)){ System.out.println(our of transaction order); resetToken(request); } //save stuff } else if(validate.equals(request.getParameter(action))) { saveToken(request);//validate stuff } any inside will be very helpful thanks gus Trieu, Danny wrote: No-cache settings in the controller will make sure that every response going Through the controller will have its head setting to no-cache on the user Browser. Meaning, the content on the user browser get expired as the user Going to another page, and so when the user click the back button the browser Will request to the server for the new contents of whatever on the history Stack. With transaction token, if there is a match meaning you have a good Transaction, a sync with the current state, and you can go on and process The request. Else, there isn't a match with the token which mean out of sync Then you can handle the condition as if it is out of sync. Hope this would help. danny -Original Message- From: Gus Delgado [mailto:gdelgado;oceanobjects.com] Sent: Wednesday, October 30, 2002 8:49 AM To: Struts Users Mailing List Subject: Re: back button please explain the controller to no-cache part? Trieu, Danny wrote: Use transaction token to guaranty your transaction. And don't forget To set your controller to no-cache. -Original Message- From: David Graham [mailto:dgraham1980;hotmail.com] Sent: Wednesday, October 30, 2002 7:29 AM To: [EMAIL PROTECTED] Subject: Re: back button That is an absolutely hideous solution to the problem. Breaking the user's back button will only make them angry. David From: Affan Qureshi [EMAIL PROTECTED] Reply-To: Struts Users Mailing List [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Subject: Re: back button Date: Wed, 30 Oct 2002 19:47:39 +0500 You can disable the back button by using JavaScript history.forward() at the top of your page. But i dont know if that solves your problem. - Original Message - From: Gus Delgado [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Wednesday, October 30, 2002 6:38 PM Subject: back button I have a JSP that has a sequence of actions. First one is validate which will validate some IO File and the next one is load to load the file. When the user hits validate it sends a request to the back-end to do some validation and I get back a response. When I hit Load it sends a request to the back-end to persist that file. the Load button depends on the validation button. When click validate and get an ok response, load shows. The problem is the back button on the browser, the file is already validated but if I hit the back button the ui and the back-end are our of sync I can validate again. Any one run into this problem? how can it be handlel? thanks. -- To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org -- To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org _ Surf the Web without missing calls! Get MSN Broadband. http://resourcecenter.msn.com/access/plans/freeactivation.asp -- To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org -- To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org . -- To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org -- To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org . -- To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org . -- To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org
Re: robot search engines and struts
Thank you for sugestions. Dragan On Tuesday 05 November 2002 17:59, you wrote: Bottom line -- search engines are for web *sites*, not web *apps*. Web *pages*, single web pages serving static content to be exact. If you can't have your welcome page (DO NOT MAKE A SPLASH PAGE) be static, create another static page that doesn't necessarily need to be accessible to your real users (although it would be better, if it was) and submit that to the search engines. Site map pages are sometimes used for this purpose. On corporate sites the about us page is perfect for this kind of stuff, because it should really summarizy everything worth knowing about the company on one page. -TPP - coded HTML for food long time ago -- To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org
RE: problem with client-side validation and ValidatorActionForm
Yes, that's true and it solves my problem. Thanks for pointing that out. On a side note, is there any advantage to referencing the action path when using validator versus using the form-bean and setting validate to false in the config file? Ryan -Original Message- From: Jarnot Voytek Contr AU HQ/SC [mailto:Voytek.Jarnot;MAXWELL.AF.MIL] Sent: Thursday, November 07, 2002 5:23 AM To: 'Struts Users Mailing List' Subject: RE: problem with client-side validation and ValidatorActionForm Regardless of whether it's referenced by form-bean name or action path, wouldn't it only validate if you've got validate=true set in your action ? Therefore allowing you to only validate on a specific action... -Original Message- From: Ryan Bell [mailto:ryan;messagecast.net] Sent: Wednesday, November 06, 2002 3:33 PM To: Struts Users Mailing List Subject: RE: problem with client-side validation and ValidatorActionForm I only want to validate when a specific action is performed (server-side) so I'm extending the ValidatorActionForm for my form which is why I'm using the action-mapping in the as the form name in my validation file as described in the pdf of chapter twelve of Struts in action book: To enable the Struts Validator for Struts 1.1, just follow the initial setup instructions in chapter 4 and extend your ActionForm from ValidatorForm and Validator- ActionForm. The ValidatorForm will match the formset name with the form-bean name. The ValidatorActionForm will match the formset name with the actionmapping path. -Original Message- From: Pete Gieser [mailto:pgieser;tampabay.rr.com] Sent: Wednesday, November 06, 2002 1:07 PM To: 'Struts Users Mailing List' Subject: RE: problem with client-side validation and ValidatorActionForm I misread your configurations. Upon further review, it looks like you are putting the action instead of the form name in your validation and jsp form name property. i.e., you should have formset form name=contactInfoForm field property=companyName depends=required arg0 key=contactInfo.companyName.displayName / /field /form /formset The javascript output when I add html:javascript formName=contactInfoForm/ to my jsp starts out like this: Pete -- To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org -- To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org -- To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org -- To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org
Re: working with resource.properties files in JSTL Struts
I think something like this worked for me with Struts 1.0.2. Not sure if it will still work with 1.1. c_rt:set var=messageResourcesKey value=%= org.apache.struts.action.Action.MESSAGES_KEY %/ c:set var=messageResources value=${applicationScope[messageResourcesKey]}/ c:set var=messageResourcesConfig value=${messageResources.config}/ fmt:setBundle basename=${messageResourcesConfig} var=messageResourcesBundle/ Quoting Anthony Mutiso 2 [EMAIL PROTECTED]: What is recognized way to get JSTL fmt:message tag to share the same resources bundle as Struts bean:message tag? Thanks Anthony -- To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org -- Kris Schneider mailto:kris;dotech.com D.O.Tech http://www.dotech.com/ -- To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org
Re: Ted, et al, Struts Book
On Thursday, November 7, 2002, 1:19:33 PM, micael wrote: m I have been into the online version a bit, and am loving it. How m do we get credit when ordering the hard copy? The site mentions m the credit but seems to have no mechanism that is obvious. Did you find out any more info on this? I'm sure I'll end up getting the hard copy of the book but I'd like to start out with the electronic one if they are going to give the credit towards the hardcopy. -- Rick mailto:maillist;reumann.net -- To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org
RE: Ted, et al, Struts Book
I'm betting that when you get into the order process for the hard-cover, they'll ask you if you have an order code or promotional code or something, and that's where you'd paste in your orderID for the electronic version. The electronic order confirmation tells you to hold onto the orderID, probably for that purpose. --joe -Original Message- From: Rick Reumann [mailto:maillist;reumann.net] Sent: Thursday, November 07, 2002 12:23 PM To: Struts Users Mailing List Subject: Re: Ted, et al, Struts Book On Thursday, November 7, 2002, 1:19:33 PM, micael wrote: m I have been into the online version a bit, and am loving it. How m do we get credit when ordering the hard copy? The site mentions m the credit but seems to have no mechanism that is obvious. Did you find out any more info on this? I'm sure I'll end up getting the hard copy of the book but I'd like to start out with the electronic one if they are going to give the credit towards the hardcopy. -- Rick mailto:maillist;reumann.net -- To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org -- To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org
RE: Populating a Form from the Model before view
this example works by going through the action, so the url you need to use must go through the action... http://hostname/myAction.do do not go through: http://hostname/myPage.jsp # your Action will not execute What also might catch you is that by going through the action, it forces the the validate() method of the Form bean to be called, so if your validate fails, your action will never get a chance to run, which in this case is bad because you haven't populated your view yet! I've got some smarts in my Form by using a hidden field so that the validate method knows what the user is doing so as not to fail if the model data has not been populated yet. So I might edit data with http://hostname/editUser.do?action='load'id='jsmith' and when clicking the save button on my page after editing, i change the hidden text field named 'action' to be 'save' In this way validate() knows to do something different in the action='load' case as opposed to an action='save' case. In the 'load' case, my required field may be only 'id' but in the 'edit' case, i may have lots of required fields, 'firstName', 'ssn', etc... -don -Original Message- From: Marcus Biel [mailto:Marcus.Biel;bmw.de] Sent: Thursday, November 07, 2002 6:18 AM To: [EMAIL PROTECTED] Subject: Re: Populating a Form from the Model before view Your Action ... (){ perform(...ActionForm form..) { ... .. . YourActionForm yourActionForm = (YourActionForm)form; ... .. . yourActionForm.setYourProperty(yourPropertyValue); } } [EMAIL PROTECTED] schrieb: Hello, Could someone point out the process in Struts in which a Form is poulated form the model before being viewed. Most of the examples for Struts assume the Form is origianlly populated from the view. I looking for the **reverse solution**. The sort of workflow for editing data ? Best Regards Mark -- To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org
Re: FW: validation + multiple sub applications.....
Michael Delamere wrote: Hi, What could this be? Are there values being overwritten perhaps when validating more than one sub-app? It could be storing the ACTION_ERRORS in one place and trying to read them from another place. Which version of struts ? It always helps to state : Struts: Nightly 20021020, 1.1B2, 1.1B1,etc... Nightly is preferred as more bugs have been fixed in Validator. -Rob Can someone confirm that they have validated various forms in multiple sub-applications? -- To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org
Re: FW: validation + multiple sub applications.....
Sorry... it´s Struts1.1B2. I´ll try a nightly build later... thanks Regards, Michael - Original Message - From: Robert Leland [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Thursday, November 07, 2002 9:32 PM Subject: Re: FW: validation + multiple sub applications. Michael Delamere wrote: Hi, What could this be? Are there values being overwritten perhaps when validating more than one sub-app? It could be storing the ACTION_ERRORS in one place and trying to read them from another place. Which version of struts ? It always helps to state : Struts: Nightly 20021020, 1.1B2, 1.1B1,etc... Nightly is preferred as more bugs have been fixed in Validator. -Rob Can someone confirm that they have validated various forms in multiple sub-applications? -- To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org -- To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org
Re: [ANNOUNCE] Struts In Action now in print
The best place to post any questions regarding the mechanics of the SIA book is the forum at the book's website at manning.com. I will be following up on any questions posted there. I will also be spending more time at the JGuru Struts forum now, to help take the heat off this much-burdened mailing list =:0) -Ted. -- To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org
RE: Ted, et al, Struts Book
I would have bet that too. Tried it and would have lost the bet. At 12:20 PM 11/7/2002 -0800, you wrote: I'm betting that when you get into the order process for the hard-cover, they'll ask you if you have an order code or promotional code or something, and that's where you'd paste in your orderID for the electronic version. The electronic order confirmation tells you to hold onto the orderID, probably for that purpose. --joe -Original Message- From: Rick Reumann [mailto:maillist;reumann.net] Sent: Thursday, November 07, 2002 12:23 PM To: Struts Users Mailing List Subject: Re: Ted, et al, Struts Book On Thursday, November 7, 2002, 1:19:33 PM, micael wrote: m I have been into the online version a bit, and am loving it. How m do we get credit when ordering the hard copy? The site mentions m the credit but seems to have no mechanism that is obvious. Did you find out any more info on this? I'm sure I'll end up getting the hard copy of the book but I'd like to start out with the electronic one if they are going to give the credit towards the hardcopy. -- Rick mailto:maillist;reumann.net -- To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org -- To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org Micael --- This electronic mail transmission and any accompanying documents contain information belonging to the sender which may be confidential and legally privileged. This information is intended only for the use of the individual or entity to whom this electronic mail transmission was sent as indicated above. If you are not the intended recipient, any disclosure, copying, distribution, or action taken in reliance on the contents of the information contained in this transmission is strictly prohibited. If you have received this transmission in error, please delete the message. Thank you -- To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org