Re: change locale on form-login-page
oups duplicated cp oups duplicated cp :) sorry sorry Tib Tib -- To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org
Trivial Q
This q is irrelevant to strusts but somebody can solve this easy puzzle that I am stuck with I have an multidimentional array rows*columnsCan someone figureout code to get the x, y poisition in this multidimentional array if i know the number For example I have number 10.Its position in array for size (4X4) will be 3rd row and 2nd column... What will be the code to get number when size of array of number change dynamically... Thanks -- To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org
RE: Trivial Q....Correcton
-Original Message- From: Khan, Manuchehar A (ACF) Sent: Monday, October 28, 2002 3:20 AM To: 'Struts Users Mailing List' Subject: Trivial Q This q is irrelevant to strusts but somebody can solve this easy puzzle that I am stuck with I have an multidimentional array rows*columnsCan someone figureout code to get the x, y poisition in this multidimentional array if i know the number For example I have number 10.Its position in array for size (4X4) will be 3rd row and 2nd column...x = 2 and y = 2 What will be the code to get x,y co ordinates dynamically... 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
Huge action instance synchronization problem
My problem: I have a search action. When 2 (or more) users submit the search form simultaniously, because the seach usually takes about 1-2 seconds, the same action instance is rethrieved to complete the search and sessions are combined like this: the action makes the search for the first session but does not finish until the second search is performed and because the resultset is divided into pages and this divisation is stored into session, both pages with results are put in the second session, and the second user shall be dispalyed the correct results but the first shall have null pointer exception because in his session there is no object representing the divisation of the resultset on pages. The problem in my opinion is because the same action instance performs the same task for the 2 users and so the sessions are combined, which is a huge problem, because like this every method of an action (dispatch action) that takes a while to complete shall have the same problem. Please advise me how to solve this problem. Thank you , Dan Bunea PS Dear Craig , I am sorry to bother you but this problem is very urgent, as the project is in final stages and this is a potentially huge problem. I have read that each action is instantiated only once in the RequestProcessor and for each request the action is rethrieved and its methods executed, but I have also read that this is not synchronized.
Problem with validator arguments - message is beingsubstituted by 'null'
I am having a problem with the validator. It is not substituting the message with the correct values, null is being substituted instead. I am using Struts 1.1b. I have a custom validator which checks that a phone number has a minimum number of digits (excluding special characters like spaces, plus signs, minus signs etc.) so I can't use the standard minlength validator. There are mask and maxlength validation rules on the field which are working perfectly. My custom validator is working perfectly (i.e. validating when it should and returning messages when it should), it is just the error message that is not working. Expected response when validation fails is: Home Telephone Number must have at least 10 digits. instead, I am getting Home Telephone Number must have at least null digits. Does anyone have any clues about this?? Thanks... Greg. properties file: errors.phoneNumber={0} must have at least {1} digits. validator-rules.xml: validator name=phoneNumber classname=com.jdv.stockhighway.web.validator.JDVWebValidator method=validatePhoneNumber methodParams=java.lang.Object, org.apache.commons.validator.ValidatorAction, org.apache.commons.validator.Field, org.apache.struts.action.ActionErrors, javax.servlet.http.HttpServletRequest msg=errors.phoneNumber /validator validation.xml: field property=homeTelephoneNumber depends=maxlength,mask,phoneNumber arg0 key=errors.userDetailsForm.homeTelephoneNumber.prompt/ arg1 key=${var:maxlength} name=maxlength resource=false/ arg1 key=${var:mindigits} name=mindigits resource=false/ var var-namemask/var-name var-value^(\+|[0-9(][ -()]?)[0-9()]+([ -][0-9()]+)*$/var-value /var var var-namemaxlength/var-name var-value20/var-value /var var var-namemindigits/var-name var-value10/var-value /var /field custom validator: public static boolean validatePhoneNumber(Object bean, ValidatorAction va, Field field, ActionErrors errors, HttpServletRequest request) { String value = null; if (isString(bean)) { value = (String) bean; } else { value = ValidatorUtil.getValueAsString(bean, field.getProperty()); } if (value == null || value.equals()) { return true; } int minDigits = Integer.parseInt(field.getVarValue(mindigits)); int digitCounter = 0; for (int i = 0; i value.length(); i++) { if (value.charAt(i) = '0' value.charAt(i) = '9') { digitCounter++; } } if (digitCounter = minDigits) { return true; } else { errors.add(field.getKey(), StrutsValidatorUtil.getActionError(request, va, field)); return false; } } JDV - e-Commerce and Outsourcing Solutions for Financial Services http://www.jdv.com/ JDV is a division of Hartleys Limited ABN 67 009 136 029 (JDV). Any securities recommendation contained in this document is unsolicited general information only. Do not act on a recommendation without first consulting your investment advisor to determine whether the recommendation is appropriate for your investment objectives, financial situation and particular needs. JDV believes that any information or advice (including any securities recommendation) contained in this document is accurate when issued. However, JDV does not warrant its accuracy or reliability. JDV, its officers, agents and employees exclude all liability whatsoever, in negligence or otherwise, for any loss or damage relating to this document to the full extent permitted by law. JDV may collect personal information from you in order to provide any services you have requested. A copy of JDV's privacy policy is available at http://www.jdv.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: Trivial Q
if number=10 (for instance) for an array nb_cols x nb_rows then col=number mod nb_rows (should be 2) row=(number div nb_cols) + 1 (should be 3) dont know the language you're looking for ;-) Vince -Original Message- From: Khan, Manuchehar A (ACF) [mailto:mkhan;acf.hhs.gov] Sent: Monday, October 28, 2002 9:20 AM To: 'Struts Users Mailing List' Subject: Trivial Q This q is irrelevant to strusts but somebody can solve this easy puzzle that I am stuck with I have an multidimentional array rows*columnsCan someone figureout code to get the x, y poisition in this multidimentional array if i know the number For example I have number 10.Its position in array for size (4X4) will be 3rd row and 2nd column... What will be the code to get number when size of array of number change dynamically... 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
RE: Trivial Q
Java -Original Message- From: Vincent PROSPER [mailto:Vincent.Prosper;Alkinos.com] Sent: Monday, October 28, 2002 3:29 AM To: Struts Users Mailing List Subject: RE: Trivial Q if number=10 (for instance) for an array nb_cols x nb_rows then col=number mod nb_rows (should be 2) row=(number div nb_cols) + 1 (should be 3) dont know the language you're looking for ;-) Vince -Original Message- From: Khan, Manuchehar A (ACF) [mailto:mkhan;acf.hhs.gov] Sent: Monday, October 28, 2002 9:20 AM To: 'Struts Users Mailing List' Subject: Trivial Q This q is irrelevant to strusts but somebody can solve this easy puzzle that I am stuck with I have an multidimentional array rows*columnsCan someone figureout code to get the x, y poisition in this multidimentional array if i know the number For example I have number 10.Its position in array for size (4X4) will be 3rd row and 2nd column... What will be the code to get number when size of array of number change dynamically... 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 -- To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org
RE: Huge action instance synchronization problem
The action instance itself doesnt have any member variables does it? If you store stuff in the HTTPSession each user will have their own session context - it shouldnt (be possible to) get mixed up like that (unless both requests are actually by the same user (in the same session) - in which case you may have troubles like those you describe). -Original Message- From: Dan Bunea [mailto:danbunea;linksystems.ro] Sent: Monday, October 28, 2002 16:14 To: [EMAIL PROTECTED] Cc: 'Craig R. McClanahan' Subject: Huge action instance synchronization problem My problem: I have a search action. When 2 (or more) users submit the search form simultaniously, because the seach usually takes about 1-2 seconds, the same action instance is rethrieved to complete the search and sessions are combined like this: the action makes the search for the first session but does not finish until the second search is performed and because the resultset is divided into pages and this divisation is stored into session, both pages with results are put in the second session, and the second user shall be dispalyed the correct results but the first shall have null pointer exception because in his session there is no object representing the divisation of the resultset on pages. The problem in my opinion is because the same action instance performs the same task for the 2 users and so the sessions are combined, which is a huge problem, because like this every method of an action (dispatch action) that takes a while to complete shall have the same problem. Please advise me how to solve this problem. Thank you , Dan Bunea PS Dear Craig , I am sorry to bother you but this problem is very urgent, as the project is in final stages and this is a potentially huge problem. I have read that each action is instantiated only once in the RequestProcessor and for each request the action is rethrieved and its methods executed, but I have also read that this is not synchronized. -- To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org
generating serial no
Is there any tag available in struts to generate serial no ? AB.
RE: Trivial Q
col=number % nb_rows ; row=(number / nb_cols) + 1; // provided that number and nb_cols are both int Vince -Original Message- From: Khan, Manuchehar A (ACF) [mailto:mkhan;acf.hhs.gov] Sent: Monday, October 28, 2002 9:30 AM To: 'Struts Users Mailing List' Subject: RE: Trivial Q Java -Original Message- From: Vincent PROSPER [mailto:Vincent.Prosper;Alkinos.com] Sent: Monday, October 28, 2002 3:29 AM To: Struts Users Mailing List Subject: RE: Trivial Q if number=10 (for instance) for an array nb_cols x nb_rows then col=number mod nb_rows (should be 2) row=(number div nb_cols) + 1 (should be 3) dont know the language you're looking for ;-) Vince -Original Message- From: Khan, Manuchehar A (ACF) [mailto:mkhan;acf.hhs.gov] Sent: Monday, October 28, 2002 9:20 AM To: 'Struts Users Mailing List' Subject: Trivial Q This q is irrelevant to strusts but somebody can solve this easy puzzle that I am stuck with I have an multidimentional array rows*columnsCan someone figureout code to get the x, y poisition in this multidimentional array if i know the number For example I have number 10.Its position in array for size (4X4) will be 3rd row and 2nd column... What will be the code to get number when size of array of number change dynamically... 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 -- 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: Trivial Q
oops! replace 'nb_rows' by 'nb_cols' in first instruction... nb_rows has nothing to do with that question... Vince -Original Message- From: Vincent PROSPER [mailto:Vincent.Prosper;Alkinos.com] Sent: Monday, October 28, 2002 9:43 AM To: Struts Users Mailing List Subject: RE: Trivial Q col=number % nb_rows ; row=(number / nb_cols) + 1; // provided that number and nb_cols are both int Vince -Original Message- From: Khan, Manuchehar A (ACF) [mailto:mkhan;acf.hhs.gov] Sent: Monday, October 28, 2002 9:30 AM To: 'Struts Users Mailing List' Subject: RE: Trivial Q Java -Original Message- From: Vincent PROSPER [mailto:Vincent.Prosper;Alkinos.com] Sent: Monday, October 28, 2002 3:29 AM To: Struts Users Mailing List Subject: RE: Trivial Q if number=10 (for instance) for an array nb_cols x nb_rows then col=number mod nb_rows (should be 2) row=(number div nb_cols) + 1 (should be 3) dont know the language you're looking for ;-) Vince -Original Message- From: Khan, Manuchehar A (ACF) [mailto:mkhan;acf.hhs.gov] Sent: Monday, October 28, 2002 9:20 AM To: 'Struts Users Mailing List' Subject: Trivial Q This q is irrelevant to strusts but somebody can solve this easy puzzle that I am stuck with I have an multidimentional array rows*columnsCan someone figureout code to get the x, y poisition in this multidimentional array if i know the number For example I have number 10.Its position in array for size (4X4) will be 3rd row and 2nd column... What will be the code to get number when size of array of number change dynamically... 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 -- 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: Huge action instance synchronization problem
I know it shouldn't have this problem. It is not the same session, nor the same user that performs the search. Of course each user has the same session, but let me explain some more of what I have seen happening. The first user (say with session id #s1) obtains the action instance ( say instance #1) from the ActionServlet (RequestProcessr). The action execute(..) starts executing, and makes the query into the database. At this time the second request comes to the ActionServlet (say with session id #s2), of course it has another session created for it, obtains the same action instance as the the first user (#1), and because the query in the database is not finished, the second user sets its session into the action (#s2), so when the first query is finished I call request.getSession() it returns the second users session (#s2) for both users, for the first that made the call and also for the second. Now I have tried to make the execute () method synchronized but it did not have any effect. -Original Message- From: Andrew Hill [mailto:andrew.david.hill;gridnode.com] Sent: Monday, October 28, 2002 10:33 AM To: Struts Users Mailing List Subject: RE: Huge action instance synchronization problem The action instance itself doesnt have any member variables does it? If you store stuff in the HTTPSession each user will have their own session context - it shouldnt (be possible to) get mixed up like that (unless both requests are actually by the same user (in the same session) - in which case you may have troubles like those you describe). -Original Message- From: Dan Bunea [mailto:danbunea;linksystems.ro] Sent: Monday, October 28, 2002 16:14 To: [EMAIL PROTECTED] Cc: 'Craig R. McClanahan' Subject: Huge action instance synchronization problem My problem: I have a search action. When 2 (or more) users submit the search form simultaniously, because the seach usually takes about 1-2 seconds, the same action instance is rethrieved to complete the search and sessions are combined like this: the action makes the search for the first session but does not finish until the second search is performed and because the resultset is divided into pages and this divisation is stored into session, both pages with results are put in the second session, and the second user shall be dispalyed the correct results but the first shall have null pointer exception because in his session there is no object representing the divisation of the resultset on pages. The problem in my opinion is because the same action instance performs the same task for the 2 users and so the sessions are combined, which is a huge problem, because like this every method of an action (dispatch action) that takes a while to complete shall have the same problem. Please advise me how to solve this problem. Thank you , Dan Bunea PS Dear Craig , I am sorry to bother you but this problem is very urgent, as the project is in final stages and this is a potentially huge problem. I have read that each action is instantiated only once in the RequestProcessor and for each request the action is rethrieved and its methods executed, but I have also read that this is not synchronized. -- 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: Trivial Q
Thanks...Finally working...I was playing with same % and / operators but got confused Thanks again.. -Original Message- From: Vincent PROSPER [mailto:Vincent.Prosper;Alkinos.com] Sent: Monday, October 28, 2002 3:48 AM To: Struts Users Mailing List Subject: RE: Trivial Q oops! replace 'nb_rows' by 'nb_cols' in first instruction... nb_rows has nothing to do with that question... Vince -Original Message- From: Vincent PROSPER [mailto:Vincent.Prosper;Alkinos.com] Sent: Monday, October 28, 2002 9:43 AM To: Struts Users Mailing List Subject: RE: Trivial Q col=number % nb_rows ; row=(number / nb_cols) + 1; // provided that number and nb_cols are both int Vince -Original Message- From: Khan, Manuchehar A (ACF) [mailto:mkhan;acf.hhs.gov] Sent: Monday, October 28, 2002 9:30 AM To: 'Struts Users Mailing List' Subject: RE: Trivial Q Java -Original Message- From: Vincent PROSPER [mailto:Vincent.Prosper;Alkinos.com] Sent: Monday, October 28, 2002 3:29 AM To: Struts Users Mailing List Subject: RE: Trivial Q if number=10 (for instance) for an array nb_cols x nb_rows then col=number mod nb_rows (should be 2) row=(number div nb_cols) + 1 (should be 3) dont know the language you're looking for ;-) Vince -Original Message- From: Khan, Manuchehar A (ACF) [mailto:mkhan;acf.hhs.gov] Sent: Monday, October 28, 2002 9:20 AM To: 'Struts Users Mailing List' Subject: Trivial Q This q is irrelevant to strusts but somebody can solve this easy puzzle that I am stuck with I have an multidimentional array rows*columnsCan someone figureout code to get the x, y poisition in this multidimentional array if i know the number For example I have number 10.Its position in array for size (4X4) will be 3rd row and 2nd column... What will be the code to get number when size of array of number change dynamically... 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 -- 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: generating serial no
I guess u can make a simple Bean that increments an instance variable on each read. /* A - Original Message - From: Amit Badheka [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Monday, October 28, 2002 1:40 PM Subject: generating serial no Is there any tag available in struts to generate serial no ? AB. -- To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org
how can I do it? using validation without formset.
I want to use validation at struts 1.1b2, with no validation.xml descriptor. Can anyone have an example for this one?
parameter in session
Hi, I got an select box, where you can select a value. When you hit submit, you get displayed a list of data records that fit to that value. But the selected value should get stored for the whole session, so if you hit on edit or delete that you directly get displayed the table, wihout selecting the value another time. At the moment I got something like this: html:form action=selectPlant.do method=POST html:select property=plantSelection size=1 html:options collection=plantList property=mo/ /html:select br html:submit/ /html:form logic:present parameter=plantSelection table tr tddata record/td html:link page=/editGroup.do/html:linkEdit/td /table /logic:present (The real page is much more complicated, but this should do it to understand the problem faster) So when I hit edit, I want to be able to edit the data record on the same page. Therefore when backwarding to this page, the table directly needs to get shown, without to hit on the submit button. Got me ? If you understan what I mean, help would be appreciated. thanks 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:[OT] Trivial Q
This will work some of the time (maybe most). But you are missing edge conditions. take 8 for ex. in a 4X4 that would be row 2 column 4. But your foumula places it at row 3 column 0. However, right now I can't think of a better solution (too early on a Mon morning!), other than to test for column == 0, in which case --row; column = numberOfColumns. Dave D - Original Message - From: Vincent PROSPER [EMAIL PROTECTED] oops! replace 'nb_rows' by 'nb_cols' in first instruction... nb_rows has nothing to do with that question... Vince -Original Message- From: Vincent PROSPER [mailto:Vincent.Prosper;Alkinos.com] col=number % nb_rows ; row=(number / nb_cols) + 1; // provided that number and nb_cols are both int Vince -Original Message- From: Khan, Manuchehar A (ACF) [mailto:mkhan;acf.hhs.gov] Sent: Monday, October 28, 2002 9:30 AM To: 'Struts Users Mailing List' Subject: RE: Trivial Q Java -Original Message- From: Vincent PROSPER [mailto:Vincent.Prosper;Alkinos.com] if number=10 (for instance) for an array nb_cols x nb_rows then col=number mod nb_rows (should be 2) row=(number div nb_cols) + 1 (should be 3) dont know the language you're looking for ;-) Vince -Original Message- This q is irrelevant to strusts but somebody can solve this easy puzzle that I am stuck with I have an multidimentional array rows*columnsCan someone figureout code to get the x, y poisition in this multidimentional array if i know the number For example I have number 10.Its position in array for size (4X4) will be 3rd row and 2nd column... What will be the code to get number when size of array of number change dynamically... Thanks -- To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org
Re: parameter in session
I think placing the Form Bean in the session scope will help. /* A - Original Message - From: Marcus Biel [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, October 28, 2002 4:57 PM Subject: parameter in session Hi, I got an select box, where you can select a value. When you hit submit, you get displayed a list of data records that fit to that value. But the selected value should get stored for the whole session, so if you hit on edit or delete that you directly get displayed the table, wihout selecting the value another time. At the moment I got something like this: html:form action=selectPlant.do method=POST html:select property=plantSelection size=1 html:options collection=plantList property=mo/ /html:select br html:submit/ /html:form logic:present parameter=plantSelection table tr tddata record/td html:link page=/editGroup.do/html:linkEdit/td /table /logic:present (The real page is much more complicated, but this should do it to understand the problem faster) So when I hit edit, I want to be able to edit the data record on the same page. Therefore when backwarding to this page, the table directly needs to get shown, without to hit on the submit button. Got me ? If you understan what I mean, help would be appreciated. thanks 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 -- To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org
Validation, javaScript modal windows
Hello, I'm working on a project that has a lot of existing static HTML; this will serve as the basis for the JSP's for the J2EE application. I've come across a situation in the HTML and I'd like to please ask your help. Existing Flow (in static HTML pages): 1. End-User sees information page on a particular account. There is also a Change link. 2. If user clicks this Change link, javascript is called that brings up another HTML file (change account page) in a browser modal window. The user can edit information on the account, and then click 'Save' or 'Cancel'. I have converted this to Struts and JSP's. 1. Information page and change account page, converted to JSP's. use a form bean. 2. The existing javaScript is still called to pop up the modal window displaying the change account page. I want to use the Struts Validator on the change account page. When the user clicks Save, it should send a request to the server. The form bean extends ValidatorForm. So - the validation will either be successful or not. If not successful: user will be returned to the same modal popup window, with validation errors displayed. If successful, popup window disappears, account info page is updated. The problem I'm seeing right now is in the case where the validation is unsuccessful. Using server-side validation techniques, how can I get Struts to return to the javascript modal popup window ? (Only way I can do so right now is by turning on client-side validation, so if the user can submit successfully, then it implies all validation has passed). Your help is really appreciated. Thanks so much. Regards, Ronald Albuquerque.
RE: html:option with iterate
It is much easier if you use the 'collection' attribute of the html:options tag. See http://jakarta.apache.org/struts/userGuide/struts-html.html#options. Also take a look at the html-select.jsp file that is in the struts-exercise-taglib application that ships with Struts. Sri -Original Message- From: Amit Badheka [mailto:amit;direct2s.com] Sent: Monday, October 28, 2002 12:39 AM To: Struts Users Mailing List Subject: html:option with iterate Hi all, I have some code like below, where I am trying to create a select list using form bean property. I am able to create it, but problem comes when I trying to put value for the option. To resolve the problem I defined to bean:define vars, which I am bale to use well as I am using categoryNm ,but when I put this value in value= it gives me error like cannot resolve symbol html:select property=categories size=1 logic:iterate id=cat name=forwardForm property=categories bean:define id=categoryNm name=cat property=value/ bean:define id=categoryId name=cat property=key/ html:option value=%=categoryId% %=categoryId%%=categoryNm%/html:option ---Here categoryId value display but in value it gives error- /logic:iterate /html:select Please help. Amit Badheka. -- To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org
Re: parameter in session
Hi, I got this: action-mappings type=org.apache.struts.action.ActionMapping action path=/selectPlant type=CreatePlantTableAction name=plantSelectionForm scope=session input=/index.jsp /action (scope=session in action) Or should I add scope=session to my form-bean mapping ??? form-bean name=plantSelectionForm type=PlantSelectionForm scope=session / ? thx, marcus [EMAIL PROTECTED] schrieb: I think placing the Form Bean in the session scope will help. /* A - Original Message - From: Marcus Biel [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, October 28, 2002 4:57 PM Subject: parameter in session Hi, I got an select box, where you can select a value. When you hit submit, you get displayed a list of data records that fit to that value. But the selected value should get stored for the whole session, so if you hit on edit or delete that you directly get displayed the table, wihout selecting the value another time. At the moment I got something like this: html:form action=selectPlant.do method=POST html:select property=plantSelection size=1 html:options collection=plantList property=mo/ /html:select br html:submit/ /html:form logic:present parameter=plantSelection table tr tddata record/td html:link page=/editGroup.do/html:linkEdit/td /table /logic:present (The real page is much more complicated, but this should do it to understand the problem faster) So when I hit edit, I want to be able to edit the data record on the same page. Therefore when backwarding to this page, the table directly needs to get shown, without to hit on the submit button. Got me ? If you understan what I mean, help would be appreciated. thanks 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 -- 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: Huge action instance synchronization problem
Thank you, but what happens if I set the execute method from the action synchronized? I did that and it works fine. I have also run some tests to see if performance drops but it did not. -Original Message- From: Sri Sankaran [mailto:Sri.Sankaran;sas.com] Sent: Monday, October 28, 2002 4:13 PM To: Struts Users Mailing List Subject: RE: Huge action instance synchronization problem It is good practice to have a delegate class that handles all business logic. This will not only ensure that you don't run into problems such as you state but also de-couples your business logic from the Struts framework -- which *should* be used only for controlling your presentation. public class SomeAction extends Action { public void execute(...) { Delegate delegate = new Delegate(...); delegate.execute(...); } } The delegate is responsible for all business operations including (any) database calls. Also make sure that your action class doesn't have any instance variables and only stack-resident method scope variables. The delegate should have all the information that would be needed. This way sessions don't step on each other. Sri -Original Message- From: Dan Bunea [mailto:danbunea;linksystems.ro] Sent: Monday, October 28, 2002 3:14 AM To: [EMAIL PROTECTED] Cc: 'Craig R. McClanahan' Subject: Huge action instance synchronization problem My problem: I have a search action. When 2 (or more) users submit the search form simultaniously, because the seach usually takes about 1-2 seconds, the same action instance is rethrieved to complete the search and sessions are combined like this: the action makes the search for the first session but does not finish until the second search is performed and because the resultset is divided into pages and this divisation is stored into session, both pages with results are put in the second session, and the second user shall be dispalyed the correct results but the first shall have null pointer exception because in his session there is no object representing the divisation of the resultset on pages. The problem in my opinion is because the same action instance performs the same task for the 2 users and so the sessions are combined, which is a huge problem, because like this every method of an action (dispatch action) that takes a while to complete shall have the same problem. Please advise me how to solve this problem. Thank you , Dan Bunea PS Dear Craig , I am sorry to bother you but this problem is very urgent, as the project is in final stages and this is a potentially huge problem. I have read that each action is instantiated only once in the RequestProcessor and for each request the action is rethrieved and its methods executed, but I have also read that this is not synchronized. -- 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: Huge action instance synchronization problem
As I pointed out, it de-couples your business logic and the data from how it is presented to the user. Further, it promotes re-usability. You have found your problem to disappear when you mark the execute() method as being syncrhonized. Is this a tenable alternative? Won't it affect the scalability of your application? As you've probably seen, http://jakarta.apache.org/struts/userGuide/building_controller.html#action_classes is a good read. Sri -Original Message- From: Dan Bunea [mailto:danbunea;linksystems.ro] Sent: Monday, October 28, 2002 9:18 AM To: 'Struts Users Mailing List' Subject: RE: Huge action instance synchronization problem Thank you, but what happens if I set the execute method from the action synchronized? I did that and it works fine. I have also run some tests to see if performance drops but it did not. -Original Message- From: Sri Sankaran [mailto:Sri.Sankaran;sas.com] Sent: Monday, October 28, 2002 4:13 PM To: Struts Users Mailing List Subject: RE: Huge action instance synchronization problem It is good practice to have a delegate class that handles all business logic. This will not only ensure that you don't run into problems such as you state but also de-couples your business logic from the Struts framework -- which *should* be used only for controlling your presentation. public class SomeAction extends Action { public void execute(...) { Delegate delegate = new Delegate(...); delegate.execute(...); } } The delegate is responsible for all business operations including (any) database calls. Also make sure that your action class doesn't have any instance variables and only stack-resident method scope variables. The delegate should have all the information that would be needed. This way sessions don't step on each other. Sri -Original Message- From: Dan Bunea [mailto:danbunea;linksystems.ro] Sent: Monday, October 28, 2002 3:14 AM To: [EMAIL PROTECTED] Cc: 'Craig R. McClanahan' Subject: Huge action instance synchronization problem My problem: I have a search action. When 2 (or more) users submit the search form simultaniously, because the seach usually takes about 1-2 seconds, the same action instance is rethrieved to complete the search and sessions are combined like this: the action makes the search for the first session but does not finish until the second search is performed and because the resultset is divided into pages and this divisation is stored into session, both pages with results are put in the second session, and the second user shall be dispalyed the correct results but the first shall have null pointer exception because in his session there is no object representing the divisation of the resultset on pages. The problem in my opinion is because the same action instance performs the same task for the 2 users and so the sessions are combined, which is a huge problem, because like this every method of an action (dispatch action) that takes a while to complete shall have the same problem. Please advise me how to solve this problem. Thank you , Dan Bunea PS Dear Craig , I am sorry to bother you but this problem is very urgent, as the project is in final stages and this is a potentially huge problem. I have read that each action is instantiated only once in the RequestProcessor and for each request the action is rethrieved and its methods executed, but I have also read that this is not synchronized. -- 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 can I do it? using validation without formset.
Why do you want to do this? I'm not sure that you can because the validator needs to know what fields to validate. David From: Arik Levin ( Tikal ) [EMAIL PROTECTED] Reply-To: Struts Users Mailing List [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Subject: how can I do it? using validation without formset. Date: Mon, 28 Oct 2002 13:44:24 +0200 I want to use validation at struts 1.1b2, with no validation.xml descriptor. Can anyone have an example for this one? _ Protect your PC - get McAfee.com VirusScan Online http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963 -- To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org
RE: [JSTL] c:out and DynaBeanClass
sometimes I need to display field value from my DynaValidatorForm based on user role and some criteria. For example c:choose c:when test=${user.Admin} html:text property=budget / /c:when c:otherwise bean:write name=MyDynaValidatorForm property=budget / /c:otherwise and sometimes bean:write name=MyDynaValidatorForm property=accountName / bean:write name=MyDynaValidatorForm property=budgetSpend / Let me know if you have any workaround, right now I'm using normal bean write tag. I have converted all struts tag to struts-EL tag (except bean:write) and so far I don't have any problem. My JSP files look so clean now. Thanks Deepak -Original Message- From: David M. Karr [mailto:dmkarr;earthlink.net] Sent: Sunday, October 27, 2002 11:57 PM To: [EMAIL PROTECTED] Subject: Re: [JSTL] c:out and DynaBeanClass Dipakkumar == Dipakkumar Parmar Parmar writes: Dipakkumar Hello, Dipakkumar Obviously c:out tag doesn't work with DynaBeanClass and we haven't converted Dipakkumar bean:write to use EL syntax. In this we do need to convert bean:write to Dipakkumar use EL syntax. If you can describe a specific situation where porting the bean:write tag to Struts-EL would be useful, then please submit a bug report, listing specific examples. I think I know what you're running into, but I need you to specify exactly what your situation is and what functionality would make your job easier. Note that DynaBeans aren't strictly JavaBeans (I believe), so it might be difficult to patch them into the JSTL. I wonder if something can be done with a Proxy class? -- === David M. Karr ; Java/J2EE/XML/Unix/C++ [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 -- To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org
RE: re. i18n
Thanks for all the information from everyone. My problem came from not understanding where I needed to place the UTF-8 line below. I had placed this line in all the included jsp, but not the wrapper jsp. Without being in the highest level JSP it did not load correctly. Once I moved it there everything is fine. % page contentType=text/html;charset=UTF-8 language=java % % taglib uri=/WEB-INF/struts-html.tld prefix=html % html:html locale=true jsp:include(s)/ /html:html jb -Original Message- From: James Mitchell [mailto:jmitchtx;telocity.com] Sent: Tuesday, October 22, 2002 5:08 PM To: Struts Users Mailing List Subject: RE: re. i18n Yes, the struts-example (from the distribution) takes advantage of i18n. Change (or add) browsers settings to use Russian [ru] or Japanese [ja], make sure the order of precedence is first for one of those. And hit your running app. (you might need to restart tomcat to kill the session if you've already hit the app using the default locale). Should work fine from there. 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: Jeff Born [mailto:jborn;gr.com] Sent: Tuesday, October 22, 2002 2:32 PM To: Struts Users Mailing List (E-mail) Subject: re. i18n I've had JSTL on my plate of things to look at for some time now. If it makes i18n implementation easier then I'm sold. However I still want to see how i18n works in struts. Does anyone have a small war file that has i18n working that they could send me? Any help finding a working war file that I can drop into Tomcat 4.1 would be appreciated. Thanks, jb -- 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
Serialization question...
In my web application, I have all of my forms declared as - public final class FORM_NAME extends org.apache.struts.validator.ValidatorForm implements Serializable { } In my tomcat 4.1.12 logs, however, I keep getting errors - Cannot serialize session attribute FORM_NAME Do I need to write a serialization function for each form? I assumed this was taken care of in org.apache.struts.validator.ValidatorForm. Thanks, Ryan
Tiles factory=''
Hi! I get an error that I fails to trace to the source so I would appreciate if anyone please could point me in the right direction. Thanks in advance Roland Carlsson 2002-10-28 15:45:39 action: Tiles definition factory loaded for processor ''. 2002-10-28 15:45:39 jsp: init 2002-10-28 15:45:35 StandardWrapper[:default]: Loading container servlet default 2002-10-28 15:45:36 default: init 2002-10-28 15:45:36 action: init 2002-10-28 15:45:39 action: Tiles definition factory loaded for processor ''. 2002-10-28 15:45:39 jsp: init 2002-10-28 15:45:39 action: Tiles definition factory loaded for processor ''. 2002-10-28 15:45:39 jsp: init 2002-10-28 15:46:19 jsp: init 2002-10-28 15:46:20 StandardWrapperValve[jsp]: Servlet.service() for servlet jsp threw exception javax.servlet.ServletException: Error - Tag Insert : No value defined for bean 'definitionName' with property 'null' in scope 'null'. at org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImp l.java:457) at org.apache.jsp.page$jsp._jspService(page$jsp.java:88) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:107) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.netbeans.modules.tomcat.tomcat40.runtime.IDEJspServlet$2002-10-28 15:46:19 jsp: init -- To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org
Re: Serialization question...
Does the form contain any fields which do not implement Serializable? If so that makes the form unable to be serialized. In order for an object to be serializble both that object and *all* fields it contains *must* implement Serializable. It cascades too, so the fields' fields (if they are not simple types) must implement Serializable - and so forth. Is this your problem, perhaps? Ryan Cornia wrote: In my web application, I have all of my forms declared as - public final class FORM_NAME extends org.apache.struts.validator.ValidatorForm implements Serializable { } In my tomcat 4.1.12 logs, however, I keep getting errors - Cannot serialize session attribute FORM_NAME Do I need to write a serialization function for each form? I assumed this was taken care of in org.apache.struts.validator.ValidatorForm. Thanks, Ryan -- 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: static pages
Andrew Hill wrote: Barracuda? -Original Message- From: James Mitchell [mailto:jmitchtx;telocity.com] I'm not here to argue about Struts' performance. Anyone who chooses another framework over Struts either doesn't need Struts or they don't know what it has to offer. I have yet to meet anything that comes close to what this framework can do. Maybe this should be in it's own thread but I would be interested in advantages that other frameworks may offer. I hate seeing people get too much in the 'home team' mentality rather than the 'best tool for the job' mentality. I like struts and am in the middle of my 3rd project with it but I can't believe it's the best tool for every possible web publishing job. Struts seems very focused on form handling and is perfect for web applications but what about a large brochure site? I would think another framework (like cocoon) might work better for a site that needs to manage 100s or 1000s of detailed pages but has little user input.I could see how tapestry or xmlc might work better where html designers are going to be working on the site more than programmers. I'd like to see comments like Framework X is better than Struts where you have situations Y and Z. -- 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 problem with tomcat 4.1.12
Am Freitag, 25. Oktober 2002 13:58 schrieb Marco Machmer: Am Freitag, 25. Oktober 2002 12:31 schrieb Hue Holleran: Hi, We had a few probs getting tiles to run with Tomcat 4.1.12 but have now sorted all those issues - to be honest some were with Java Sec Mgr, some with the tiles-documentation.war supplied in 1.1b2 - changing to the nightly build and (correctly!) applying the JSM property fixed that. Which version of tiles is this? we use struts-1.1-b1. i will change this to release struts-1.1-b2. thanx ma my problem wasn't struts-tiles.tld but an old logtags-1.0.jar from opensymphony.com with an corrupted taglib.tld inside. a little bit more output from tomcat (wich tld-file now parsed) had helped me more to find the right location. so this was an try and error action to find the error. regards ma Hue. Marco Machmer [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED]... hy, if i start tomcat 4.1.12 with struts used in my webapplication i get the following error on server console (server started with catalina.sh run) Oct 25, 2002 11:19:28 AM org.apache.commons.digester.Digester error SEVERE: Parse Error at line 1 column 9: Document root element taglib, must match DOCTYPE root null. org.xml.sax.SAXParseException: Document root element taglib, must match DOCTYPE root null. at org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(ErrorH an d lerWrapper.java:232) at org.apache.xerces.util.ErrorHandlerWrapper.error(ErrorHandlerWrapper.java :1 7 3) at org.apache.xerces.impl.XMLErrorReporter.reportError(XMLErrorReporter.java :3 6 2) with tomcat 4.0.3 my applicatin run's without problems. if i remove tiles.tdt from WEB-INF/tlds, then the server starts without any error. where is my problem? ma -- To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org -- *** Marco Machmer Phone : +49-2638-94 666 4 Fax : +49-2638-94 666 7 email : mailto:marco;morca.de www : http://www.Marco-Machmer.de Um ein tadelloses Mitglied einer Schafherde sein zu koennen, muss man vor allem ein Schaf sein. Albert Einstein -- To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org
RE: Huge action instance synchronization problem
As Andrew pointed out, you are probably using a class level (member) variable. Can you move this to the execute method and retest? Also, you should seriously consider what Sri has posted as well. 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: Dan Bunea [mailto:danbunea;linksystems.ro] Sent: Monday, October 28, 2002 9:18 AM To: 'Struts Users Mailing List' Subject: RE: Huge action instance synchronization problem Thank you, but what happens if I set the execute method from the action synchronized? I did that and it works fine. I have also run some tests to see if performance drops but it did not. -Original Message- From: Sri Sankaran [mailto:Sri.Sankaran;sas.com] Sent: Monday, October 28, 2002 4:13 PM To: Struts Users Mailing List Subject: RE: Huge action instance synchronization problem It is good practice to have a delegate class that handles all business logic. This will not only ensure that you don't run into problems such as you state but also de-couples your business logic from the Struts framework -- which *should* be used only for controlling your presentation. public class SomeAction extends Action { public void execute(...) { Delegate delegate = new Delegate(...); delegate.execute(...); } } The delegate is responsible for all business operations including (any) database calls. Also make sure that your action class doesn't have any instance variables and only stack-resident method scope variables. The delegate should have all the information that would be needed. This way sessions don't step on each other. Sri -Original Message- From: Dan Bunea [mailto:danbunea;linksystems.ro] Sent: Monday, October 28, 2002 3:14 AM To: [EMAIL PROTECTED] Cc: 'Craig R. McClanahan' Subject: Huge action instance synchronization problem My problem: I have a search action. When 2 (or more) users submit the search form simultaniously, because the seach usually takes about 1-2 seconds, the same action instance is rethrieved to complete the search and sessions are combined like this: the action makes the search for the first session but does not finish until the second search is performed and because the resultset is divided into pages and this divisation is stored into session, both pages with results are put in the second session, and the second user shall be dispalyed the correct results but the first shall have null pointer exception because in his session there is no object representing the divisation of the resultset on pages. The problem in my opinion is because the same action instance performs the same task for the 2 users and so the sessions are combined, which is a huge problem, because like this every method of an action (dispatch action) that takes a while to complete shall have the same problem. Please advise me how to solve this problem. Thank you , Dan Bunea PS Dear Craig , I am sorry to bother you but this problem is very urgent, as the project is in final stages and this is a potentially huge problem. I have read that each action is instantiated only once in the RequestProcessor and for each request the action is rethrieved and its methods executed, but I have also read that this is not synchronized. -- 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
[Tiles] Using Tiles Parameter in logic:equals
I'm trying to find a way to pass a parameter from a tiles definition into a JSP so I can use logic:equal to check the parameter and then render the appropriate 'chunk' of JSP. I can pass the parameter from my base definition to my tile by using tiles:put; when I use tiles:get to retrieve it I don't seem to be able to use it in my logic:equal tag to check it against a static value. Am I missing something obvious? Is there a more appropriate way of doing this? 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
is there a way to use Oracle JDBC Datasource
Hi, I'm new to struts, and looking for it to decide use it or not for our new Dev in J2ee MVC² Project. Our most imprtant requirement is to interact with Oracle (8i) Database so for powerfull Apps ( Large Corporate Intranet) we planned to use the Oracle JDBC Datasource and most particularly the OracleConnectionPoolDatasource I look in the code and all of the two ( OracleDatasource OracleConnectionPoolDatasource )implements javax.sql.Datasources but when I defined my datasource in struts-config.xml : data-sources data-source key=poolOracle type=oracle.jdbc.pool.OracleConnectionPoolDataSource set-property property=autoCommit value=false / set-property property=driver value=oracle.jdbc.driver.OracleDriver / set-property property=user value= / set-property property=password value=xxx / set-property property=url value=jdbc:oracle:thin:XXX:1521:XXX / set-property property=description value=Prest_DSI / set-property property=readOnly value=false / set-property property=inactivity-timeout value=30 / set-property property=maxCount value=10 / set-property property=minCount value=2/ /data-source /data-sources And Still get the same message when I running it in my web server: java.lang.ClassCastException: oracle.jdbc.pool.OracleConnectionPoolDataSource at org.apache.struts.action.ActionServlet.initApplicationDataSources(ActionServ let.java:936) at org.apache.struts.action.ActionServlet.init(ActionServlet.java:457) at javax.servlet.GenericServlet.init(GenericServlet.java:258) at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:91 6) at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:808) at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java: 3266) at org.apache.catalina.core.StandardContext.start(StandardContext.java:3395) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1123) at org.apache.catalina.core.StandardHost.start(StandardHost.java:614) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1123) at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:343) at org.apache.catalina.core.StandardService.start(StandardService.java:388) at org.apache.catalina.core.StandardServer.start(StandardServer.java:506) at org.apache.catalina.startup.Catalina.start(Catalina.java:781)at org.apache.catalina.startup.Catalina.execute(Catalina.java:681) at org.apache.catalina.startup.Catalina.process(Catalina.java:179) at java.lang.reflect.Method.invoke(Native Method) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:243) [ERROR] ActionServlet - -Initializing application data source poolOracle java.lang.ClassCastException: oracle.jdbc.pool.OracleConnectionPoolDataSourceStandardWrapper[/GEST_Presta tion:action]: Marking servlet action as unavailable StandardContext[/GEST_Prestation]: Servlet /GEST_Prestation threw load() exception: javax.servlet.UnavailableException: Initializing application data source poolOracle javax.servlet.UnavailableException: Initializing application data source poolOracle at org.apache.struts.action.ActionServlet.initApplicationDataSources(ActionServ let.java:946) at org.apache.struts.action.ActionServlet.init(ActionServlet.java:457) at javax.servlet.GenericServlet.init(GenericServlet.java:258) at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:91 6) at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:808) at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java: 3266) at org.apache.catalina.core.StandardContext.start(StandardContext.java:3395) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1123) at org.apache.catalina.core.StandardHost.start(StandardHost.java:614) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1123) at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:343) at org.apache.catalina.core.StandardService.start(StandardService.java:388) at org.apache.catalina.core.StandardServer.start(StandardServer.java:506) at org.apache.catalina.startup.Catalina.start(Catalina.java:781)at org.apache.catalina.startup.Catalina.execute(Catalina.java:681) at org.apache.catalina.startup.Catalina.process(Catalina.java:179) at java.lang.reflect.Method.invoke(Native Method) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:243) So Ireally need help if someone can or no How to do that. Thanks 'lot Yannick -- To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org
Re: Serialization question...
To be honest, I'm not sure. All cases I have needed to use serialization were such that all fields had to be serialized. So ... I can neither confirm nor deny that. It certainly sounds logical though. Gideon, Thomas wrote: Can't you also mark your members as transient if you don't want them serialized? So shouldn't a combination of Serializable and transient properties also meet the requirement for serializing the object itself? Just curious if anyone is even using the transient keyword... Thomas Gideon Sr. Software Developer B2eMarkets 301.230.2236 Tel. 301.230.2248 Fax. [EMAIL PROTECTED] www.B2eMarkets.com -- 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: Using html:Options tag
On Mon, 2002-10-28 at 09:31, Alok Garg wrote: Hello, I am facing a problem using html:options tag. The case: 1) I have a Hashtable map which contain an Id (java.lang.Integer) as the Key and Description (String) as the value. 2) I have to iterate this Hashtable and display the values in a select box. Please guide me with the above problem This worked for me: html:options collection=YOUR-HASHMAP-HERE property=value labelProperty=key/ I found that reading the source for taglibs is much more interesting and provides much more valuable info than reading the docs... Use the source... Umberto Thanks Alok -- Umberto Nicoletti [EMAIL PROTECTED] | Tel. +390415701366 We'll try to make different mistakes this time. - Larry Wall -- 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 can I do it? using validation without formset.
Because my fields are coming from the DB and I don't know the field's names, yet. I'm using struts syntax for example html:text property=value(fieldname)/ So in that way I can't use the descriptor (validation.xml). How can I do it thru the API? Or is there any other suggestions? -Original Message- From: David Graham [mailto:dgraham1980;hotmail.com] Sent: Monday, October 28, 2002 4:41 PM To: [EMAIL PROTECTED] Subject: Re: how can I do it? using validation without formset. Why do you want to do this? I'm not sure that you can because the validator needs to know what fields to validate. David From: Arik Levin ( Tikal ) [EMAIL PROTECTED] Reply-To: Struts Users Mailing List [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Subject: how can I do it? using validation without formset. Date: Mon, 28 Oct 2002 13:44:24 +0200 I want to use validation at struts 1.1b2, with no validation.xml descriptor. Can anyone have an example for this one? _ Protect your PC - get McAfee.com VirusScan Online http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963 -- 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: nested:iterate recursion inverts tree
Arron, Weblogic 5.1 sp11 is running JSP spec 1.1. It sounds like that is the root of my problem. I'll just 'manually' nest my jsp until we get upgraded to Weblogic 7. Then I'll come back and implement the recursion. Thanks for your time! Steve -Original Message- From: Arron Bates [mailto:struts-user;keyboardmonkey.com] Sent: Saturday, October 26, 2002 1:46 AM To: Struts Users Mailing List Subject: Re: nested:iterate recursion inverts tree So you ran the directory tree war (the end of the monkey-tree example), and the directory tree came out upside down?... If it did, I'd have to say it's how your container is evaluating the JSP. I would think that it's compiling all the objects and evaluating their output. But in doing so, it's committing their content to the response stream in the wrong order. The directory tutorial's been tried in many containers and comes out sweet. What JSP spec version is that version of WebLogic?... It's probably amazing that it can compile the true recursion at all. Most containers have to be on the later JSP spec. Arron. On Sat, 2002-10-26 at 04:28, Steve Hall wrote: I'm new to using nested tags. I've worked through the keyboard monkey tutorial and started experimenting with the nested tags on my own. I've run into something that perplexes me. My tree's are inverted when I use recursive calls to a jsp that iterates over the nested nodes. i.e.: - nested.jsp ... nested:root nested:iterate property=nodes nested:write property=nodeName/br jsp:include page=nested.jsp / /nested:iterate /nested:root ... - I would expect the page to display: root node1 node1.1 node1.2 node2 node2.1 node2.1.1 etc... The monkey tree tutorial and my experimentation displays the tree as: node2.1.1 node2.1 node2 node1.2 node1.1 node1 root Is this the expected behavior of the nested iterate tag when recursively displaying a Composite (tree)? Am I using the tags incorrectly? How do I get the JSP to display the tree root down? Is there something in my environment that is causing the JSP iteration to run before any printing to the outputstream is executed? Do I have to hard code all the iteration levels into my JSP to get the tree to display root down? Environment: Struts 1.1 b2 Weblogic 5.1 sp11 (don't ask :-/ ) jdk 1.3.1 sdk 1.2.1 Thanks for any light you can shed on the subject. Steve Hall Programmer Analyst Alterra Healthcare (414) 918 5636 [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 -- 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
Checkbox column and paging.
I have a JSP table that contains a checkbox column used for multiple selection, which returns the selected item(s) Id value to a String array in my ActionForm bean. Happily, this is working. However, my problem is with paging. I am using the Display Tags to display my table, with a Decorator to show my checkbox in each row. The selected Id values that pass to my form bean are only the values on the current page of my table. Other items I have selected in the previous and next pages are not remembered and passed to the form bean array field. I need a little help following through with this, could someone please point me in the right direction? Is there a way to collect all the values on each page before submitting the form, so that all of the selected values are saved in the array? Will this require some sort of custom manipulation (not experienced with this) of the paging tags? Thank you, Susan Bradeen -- To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org
[Nested Tags] Nested vs logic tags..
Greetings: I am almost exclusively using nested tags. Every now and then I run into a problem and have to switch over the corresponding logic or bean version. Can anyony tell me if this is a bug? I am using 1.1b2 I tried this with nested:equal but got a NullPointerException (listed below) nested:iterate property=meshList indexId=listIndex tr td %-- Show this only for the first item--% nested:equal name=listIndex value=0 /nested:equal but had to change the equals to: logic:equal name=listIndex value=0 /logic:equal 2002-10-28 09:52:49 jsp: init 2002-10-28 09:52:49 ApplicationDispatcher[/ar] Servlet.service() for servlet jsp threw exception java.lang.NullPointerException at org.apache.struts.taglib.nested.NestedPropertyHelper.getNestedProperty(NestedPropertyHelper.java:173) at org.apache.struts.taglib.nested.NestedPropertyHelper.getNestedProperty(NestedPropertyHelper.java:195) at org.apache.struts.taglib.nested.NestedPropertyHelper.setNestedProperties(NestedPropertyHelper.java:242) at org.apache.struts.taglib.nested.logic.NestedEqualTag.doStartTag(NestedEqualTag.java:91) at org.apache.jsp.CustomerMeshMainForm$jsp._jspService(CustomerMeshMainForm$jsp.java:475) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:107) -- To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org
javax.servlet.jsp.JspException: No getter method for property Username of bean org.apache.struts.taglib.html.BEAN
hi frnz, I'm a newbie to struts so my question can be a bit novice. I'm trying to use the frame work to build a small login screen. i'm deploying it in weblogic 7.0. the war file gets deployed and on calling the login.jsp it gives me an error:-- javax.servlet.jsp.JspException: No getter method for property Username of bean org.apache.struts.taglib.html.BEAN but in my login.jsp,loginaction.java and loginform.java the case sensitivity is maintained correctly for the Username property. have i missed out on some mapping in some xml or properties file?? wot can be the cause for the error?? its urgent so nie sort of help wud be gr8 for me. thnx. in advance regards Ananya -- 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] Using Tiles Parameter in logic:equals
Hi Jerry, I had the same problem before and this is the solution that I got using importAttribute: tiles:importAttribute name=myputparam/ bean:message name=myputparam/ You can also use tiles:useAttribute and assign it an id to use later. -Tim -Original Message- From: Jerry Jalenak [mailto:Jerry.Jalenak;LABONE.com] Sent: Monday, October 28, 2002 10:44 AM To: '[EMAIL PROTECTED]' Subject: [Tiles] Using Tiles Parameter in logic:equals I'm trying to find a way to pass a parameter from a tiles definition into a JSP so I can use logic:equal to check the parameter and then render the appropriate 'chunk' of JSP. I can pass the parameter from my base definition to my tile by using tiles:put; when I use tiles:get to retrieve it I don't seem to be able to use it in my logic:equal tag to check it against a static value. Am I missing something obvious? Is there a more appropriate way of doing this? 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 -- To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org
Re: Serialization question...
I don't see anything regarding serialization that talks about a possibility to mark members as transient. Would you happen to have references Thomas? Gideon, Thomas wrote: Can't you also mark your members as transient if you don't want them serialized? So shouldn't a combination of Serializable and transient properties also meet the requirement for serializing the object itself? Just curious if anyone is even using the transient keyword... Thomas Gideon Sr. Software Developer B2eMarkets 301.230.2236 Tel. 301.230.2248 Fax. [EMAIL PROTECTED] www.B2eMarkets.com -- 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: javax.servlet.jsp.JspException: No getter method for property Username ofbean org.apache.struts.taglib.html.BEAN
Make sure your variable is named username and it has a getter named getUsername and a setter setUsername. David From: Ananya Bhushan, Noida [EMAIL PROTECTED] Reply-To: Struts Users Mailing List [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: javax.servlet.jsp.JspException: No getter method for property Username of bean org.apache.struts.taglib.html.BEAN Date: Mon, 28 Oct 2002 21:14:11 +0530 hi frnz, I'm a newbie to struts so my question can be a bit novice. I'm trying to use the frame work to build a small login screen. i'm deploying it in weblogic 7.0. the war file gets deployed and on calling the login.jsp it gives me an error:-- javax.servlet.jsp.JspException: No getter method for property Username of bean org.apache.struts.taglib.html.BEAN but in my login.jsp,loginaction.java and loginform.java the case sensitivity is maintained correctly for the Username property. have i missed out on some mapping in some xml or properties file?? wot can be the cause for the error?? its urgent so nie sort of help wud be gr8 for me. thnx. in advance regards Ananya -- To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org _ Internet access plans that fit your lifestyle -- join MSN. http://resourcecenter.msn.com/access/plans/default.asp -- To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org
Re: Serialization question...
You can use the transient keyword in a class to mark un-serializable members so that the rest of the class is serializable. For example, if your class had a variable private Connection conn; your class would not be serializable because the sql Connection class isn't. So you do this: private transient Connection conn; David From: Eddie Bush [EMAIL PROTECTED] Reply-To: Struts Users Mailing List [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Subject: Re: Serialization question... Date: Mon, 28 Oct 2002 11:18:37 -0600 I don't see anything regarding serialization that talks about a possibility to mark members as transient. Would you happen to have references Thomas? Gideon, Thomas wrote: Can't you also mark your members as transient if you don't want them serialized? So shouldn't a combination of Serializable and transient properties also meet the requirement for serializing the object itself? Just curious if anyone is even using the transient keyword... Thomas Gideon Sr. Software Developer B2eMarkets 301.230.2236 Tel. 301.230.2248 Fax. [EMAIL PROTECTED] www.B2eMarkets.com -- 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 _ Broadband? Dial-up? Get reliable MSN Internet Access. http://resourcecenter.msn.com/access/plans/default.asp -- To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org
RE: JAXP version 1.1
My thanks to everyone who responded. I've got a copy now. Celeste -Original Message- From: Haseltine, Celeste [mailto:CHaseltine;magticket.com] Sent: Friday, October 25, 2002 3:13 PM To: 'Struts Users Mailing List' Subject: JAXP version 1.1 This is a little off topic, but does anyone know how I can get my hands on an older version of JAXP? We had to rebuild a server, and the newer JAXP 1.2 does not work with our existing Java code. I got my hands on a older version of crimson.jar, but I need the older versions of jaxp.jar and xalan.jar. We need to get up and running now, we can't afford the time to rewrite our older Java code to work with 1.2. I can't find it on the Sun site, nor by doing a search under google.com. Anyone have any suggestions as to where I can get my hands on JAXP 1.1? Celeste Haseltine, PE MTL Inc Dallas, TX -- 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: Serialization question...
Thanks for your edification, Mr. Graham ;-) I'd never had call to use that one before. David Graham wrote: You can use the transient keyword in a class to mark un-serializable members so that the rest of the class is serializable. For example, if your class had a variable private Connection conn; your class would not be serializable because the sql Connection class isn't. So you do this: private transient Connection conn; David -- 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: Serialization question...
It's in the Java Language Specification, section 8.3.1.3 but I ran across it myself in some book or other (couldn't remember which so I dug into the spec). http://java.sun.com/docs/books/jls/second_edition/html/classes.doc.html#7811 9 Thomas Gideon Sr. Software Developer B2eMarkets 301.230.2236 Tel. 301.230.2248 Fax. [EMAIL PROTECTED] www.B2eMarkets.com -Original Message- From: Eddie Bush [mailto:ekbush;swbell.net] Sent: Monday, October 28, 2002 12:19 PM To: Struts Users Mailing List Subject: Re: Serialization question... I don't see anything regarding serialization that talks about a possibility to mark members as transient. Would you happen to have references Thomas? Gideon, Thomas wrote: Can't you also mark your members as transient if you don't want them serialized? So shouldn't a combination of Serializable and transient properties also meet the requirement for serializing the object itself? Just curious if anyone is even using the transient keyword... Thomas Gideon Sr. Software Developer B2eMarkets 301.230.2236 Tel. 301.230.2248 Fax. [EMAIL PROTECTED] www.B2eMarkets.com -- 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: Struts 1.1b1 with WAS 3.5.4
Why can't struts use 1.1 while WAS uses 1.0? Also, why are you on beta 1? David From: CHARRIER Sébastien [EMAIL PROTECTED] Reply-To: Struts Users Mailing List [EMAIL PROTECTED] To: 'Struts Users Mailing List' [EMAIL PROTECTED] Subject: Struts 1.1b1 with WAS 3.5.4 Date: Mon, 28 Oct 2002 17:55:22 +0100 Hi, My Struts 1.1b1 application must be deployed on a Websphere Application Server 3.5.4 on Solaris. I know there is a problem with the XML parser: WAS use a parser compatible to JAXP 1.0 whereas Struts 1.1b1 use a parser compatible to JAXP 1.1. The problem is that my client doesn't allow me to change the admin.config file in WAS so I can't upgrade the xml parser of WAS. Is there any other solutions to make work Struts with a xml parser compatible to JAXP 1.0 ? - Sébastien CHARRIER ASTON - Consultant * 01.34.65.54.99 * 01.34.65.79.40 Mailto:scharrier;aston.fr _ 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
Re: Struts 1.0.2, Tomcat 4.1.12 Web-App start-up funny
I suggest you develop with tomcat 4.1.12 since you're deploying on that version. It will make your life easier with less surprises. You should check what object is stored under org.apache.struts.taglib.html.BEAN in the request. It may not be the bean you think it is. David From: Axtell, Neil [EMAIL PROTECTED] Reply-To: Struts Users Mailing List [EMAIL PROTECTED] To: '[EMAIL PROTECTED]' [EMAIL PROTECTED] Subject: Struts 1.0.2, Tomcat 4.1.12 Web-App start-up funny Date: Mon, 28 Oct 2002 17:23:21 - A plea for help to the great Struts User community. I'm in the process of deploying our first Struts-enabled Web-App onto a separate Staging Server. This is running Win 2K SP3, JDK 1.4.1 Tomcat 4.1.12. Everything works fine when I first deploy my WAR file and start Tomcat. It is unpacked correctly and the Web-App runs fine. If I stop and re-start Tomcat I get the following error message when I attempt to access an Admin Page using an HTML form with an associated Struts Form Bean :- javax.servlet.jsp.JspException: No getter method available for property archiveServer for bean under name org.apache.struts.taglib.html.BEAN at org.apache.struts.taglib.html.SelectTag.doStartTag(SelectTag.java:304) at org.apache.jsp.ResultArchiveAdmin_jsp._jspService(ResultArchiveAdmin_jsp.jav a:265) The relevant part of my Struts-config.xml is :- form-beans form-bean name=ResultArchiveAdminFormBean type=com.anritsu.eu.Expresso.Beans.ResultArchiveAdminFormBean/ /form-beans ... !-- Add Result Archive -- actionpath=/AddArchive type=com.anritsu.eu.Expresso.ActAddResultArchive name=ResultArchiveAdminFormBean scope=request validate=true input=/ResultArchiveAdmin.jsp forward name=success path=/ResultArchiveAdmin.jsp/ /action I think that this exception is telling me that the Struts TagLib could not find a matching getArchiveServer() method in the Form Bean. But why did it work the first time I ran up Tomcat? I have checked that the Bean does have a matching method. Is it significant that the exception does not mention the ResultArchiveAdminFormBean by name? This is a bit frustrating as the same WAR file runs fine on my development machine, but this is using JBuilder 6 Tomcat 4.0.1. I would prefer to use a later version of Tomcat for deployment. Obviously I must have missed something out from either the Struts-config.xml, web.xml or in the JSP for this page. As this happens the first time I attempt to access this page could it be a problem with an instance of the FormBean being created? I've not explicitly added a jsp:useBean ... statement into the JSP page as I thought that Struts would sort this all out for me. Do I need one? Any ideas would be gratefully received. Many thanks. Neil. Neil Axtell Principal Engineer (MMI/Web Technologies) ANRITSU LIMITED European Measurement Division - Engineering 200 Capability Green Luton, UK Tel: +44 (0) 1582 433347 Fax: +44 (0) 1582 433276 E-Mail: [EMAIL PROTECTED] mailto:Neil.Axtell;eu.anritsu.com - This email message, together with any attachments, is for the exclusive and confidential use of the addressee(s). If you have received this message in error, please notify the sender by email immediately, then delete the message and any copies. Any views or opinions presented herein are solely those of the author and do not necessarily represent those of the Anritsu group of companies. - -- To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org _ Choose an Internet access plan right for you -- try MSN! http://resourcecenter.msn.com/access/plans/default.asp -- To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org
RE: Struts 1.1b1 with WAS 3.5.4
Each application deployed on WAS has in its classpath the jar which contains the xml parser 1.0. The problem is that I can only append libraries to this classpath. I can't add at the begining of this classpath the xml parser 1.1 to make the applications use it. I know that a solution would be to use Struts 1.02 but it will take too much time now. Sebastien -Message d'origine- De : David Graham [mailto:dgraham1980;hotmail.com] Envoyé : lundi 28 octobre 2002 18:05 À : [EMAIL PROTECTED] Objet : Re: Struts 1.1b1 with WAS 3.5.4 Why can't struts use 1.1 while WAS uses 1.0? Also, why are you on beta 1? David From: CHARRIER Sébastien [EMAIL PROTECTED] Reply-To: Struts Users Mailing List [EMAIL PROTECTED] To: 'Struts Users Mailing List' [EMAIL PROTECTED] Subject: Struts 1.1b1 with WAS 3.5.4 Date: Mon, 28 Oct 2002 17:55:22 +0100 Hi, My Struts 1.1b1 application must be deployed on a Websphere Application Server 3.5.4 on Solaris. I know there is a problem with the XML parser: WAS use a parser compatible to JAXP 1.0 whereas Struts 1.1b1 use a parser compatible to JAXP 1.1. The problem is that my client doesn't allow me to change the admin.config file in WAS so I can't upgrade the xml parser of WAS. Is there any other solutions to make work Struts with a xml parser compatible to JAXP 1.0 ? - Sébastien CHARRIER ASTON - Consultant * 01.34.65.54.99 * 01.34.65.79.40 Mailto:scharrier;aston.fr _ 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
RE: Struts 1.1b1 with WAS 3.5.4
I don't know how to make struts work with a 1.0 parser. In this case, I would inform my client that the container they're using has this limitation and to work around it you need to alter the config file. David From: CHARRIER Sébastien [EMAIL PROTECTED] Reply-To: Struts Users Mailing List [EMAIL PROTECTED] To: 'Struts Users Mailing List' [EMAIL PROTECTED] Subject: RE: Struts 1.1b1 with WAS 3.5.4 Date: Mon, 28 Oct 2002 18:32:59 +0100 Each application deployed on WAS has in its classpath the jar which contains the xml parser 1.0. The problem is that I can only append libraries to this classpath. I can't add at the begining of this classpath the xml parser 1.1 to make the applications use it. I know that a solution would be to use Struts 1.02 but it will take too much time now. Sebastien -Message d'origine- De : David Graham [mailto:dgraham1980;hotmail.com] Envoyé : lundi 28 octobre 2002 18:05 À : [EMAIL PROTECTED] Objet : Re: Struts 1.1b1 with WAS 3.5.4 Why can't struts use 1.1 while WAS uses 1.0? Also, why are you on beta 1? David From: CHARRIER Sébastien [EMAIL PROTECTED] Reply-To: Struts Users Mailing List [EMAIL PROTECTED] To: 'Struts Users Mailing List' [EMAIL PROTECTED] Subject: Struts 1.1b1 with WAS 3.5.4 Date: Mon, 28 Oct 2002 17:55:22 +0100 Hi, My Struts 1.1b1 application must be deployed on a Websphere Application Server 3.5.4 on Solaris. I know there is a problem with the XML parser: WAS use a parser compatible to JAXP 1.0 whereas Struts 1.1b1 use a parser compatible to JAXP 1.1. The problem is that my client doesn't allow me to change the admin.config file in WAS so I can't upgrade the xml parser of WAS. Is there any other solutions to make work Struts with a xml parser compatible to JAXP 1.0 ? - Sébastien CHARRIER ASTON - Consultant * 01.34.65.54.99 * 01.34.65.79.40 Mailto:scharrier;aston.fr _ 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 _ 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
Can validator mask rule be made optional
Currently we are using the validator-rules.xml that comes with the Struts 1.1 distribution. We have several situations where we have fields we need to conform to a pattern _if_ the user enters data, but the fields are not required (ex: phone number, e-mail). We noticed that the mask validation rule and the email validation rule depend on required. Is there an easy way to accomplish making these optional (short of duplicating the entire rule and making an optionalMask by removing the required dependency...which is what we are doing now) validator name=mask classname=org.apache.struts.validator.FieldChecks method=validateMask methodParams=java.lang.Object, org.apache.commons.validator.ValidatorAction, org.apache.commons.validator.Field, org.apache.struts.action.ActionErrors, javax.servlet.http.HttpServletRequest depends=required ---REMOVE THIS REQUIRED msg=errors.invalid javascript.../javascript /validator A thought just occurred to me as I was typing this. I suppose we could rewrite the regular expression to accept empty string _or_ a valid phone pattern...duh. I suppose this is the preferred way to accomplish this. Here is the pattern we are using today: form-validation global constant constant-namephone/constant-name constant-value^\(?(\d{3})\)?[-| ]?(\d{3})[-| ]?(\d{4})$/constant-value /constant /global /form-validation I may be able to get this to work for the mask rule, but it doesn't solve the email rule which doesn't use an exernally specified regular expression. Does anyone else have a form with an optional e-mail? Thanks -- To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org
Re: Huge action instance synchronization problem
As others have pointed out, 99.9% of this kind of a problem comes from using class-level instance variables (also called member variables) to store information that is specific to a particular request. This fails because there is only one instance of the Action, so the instance variables are shared across multiple requests. Actions must be designed in a thread-safe manner. In particular, you should never use instance variables in an Action class, unless you SPECIFICALLY intend to share that variable across multiple users. Variables local to the perform() or execute() method are not shared, so that is where you should store things specific to a particular request. Craig On Mon, 28 Oct 2002, Dan Bunea wrote: Date: Mon, 28 Oct 2002 10:14:21 +0200 From: Dan Bunea [EMAIL PROTECTED] Reply-To: Struts Users Mailing List [EMAIL PROTECTED] To: [EMAIL PROTECTED] Cc: 'Craig R. McClanahan' [EMAIL PROTECTED] Subject: Huge action instance synchronization problem My problem: I have a search action. When 2 (or more) users submit the search form simultaniously, because the seach usually takes about 1-2 seconds, the same action instance is rethrieved to complete the search and sessions are combined like this: the action makes the search for the first session but does not finish until the second search is performed and because the resultset is divided into pages and this divisation is stored into session, both pages with results are put in the second session, and the second user shall be dispalyed the correct results but the first shall have null pointer exception because in his session there is no object representing the divisation of the resultset on pages. The problem in my opinion is because the same action instance performs the same task for the 2 users and so the sessions are combined, which is a huge problem, because like this every method of an action (dispatch action) that takes a while to complete shall have the same problem. Please advise me how to solve this problem. Thank you , Dan Bunea PS Dear Craig , I am sorry to bother you but this problem is very urgent, as the project is in final stages and this is a potentially huge problem. I have read that each action is instantiated only once in the RequestProcessor and for each request the action is rethrieved and its methods executed, but I have also read that this is not synchronized. -- 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 can I do it? using validation without formset.
If you do not know what the field names are before displaying the page, how could you possibly validate them? Are you storing the validation in the database as well? If so, it sounds like you need to develop your own custom validation. Sorry I can't help you further. FWIWgood luck. 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: Arik Levin ( Tikal ) [mailto:arikl;businesslayers.co.il] Sent: Monday, October 28, 2002 11:02 AM To: 'Struts Users Mailing List' Subject: RE: how can I do it? using validation without formset. Because my fields are coming from the DB and I don't know the field's names, yet. I'm using struts syntax for example html:text property=value(fieldname)/ So in that way I can't use the descriptor (validation.xml). How can I do it thru the API? Or is there any other suggestions? -Original Message- From: David Graham [mailto:dgraham1980;hotmail.com] Sent: Monday, October 28, 2002 4:41 PM To: [EMAIL PROTECTED] Subject: Re: how can I do it? using validation without formset. Why do you want to do this? I'm not sure that you can because the validator needs to know what fields to validate. David From: Arik Levin ( Tikal ) [EMAIL PROTECTED] Reply-To: Struts Users Mailing List [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Subject: how can I do it? using validation without formset. Date: Mon, 28 Oct 2002 13:44:24 +0200 I want to use validation at struts 1.1b2, with no validation.xml descriptor. Can anyone have an example for this one? _ Protect your PC - get McAfee.com VirusScan Online http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963 -- 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: Submit Using html:link and html:javascript
If anyone is interested, I figured this out. Of course this is a basic JavaScript problem so I understand not getting a response on the Struts list. Never the less, I feel that it pertains enough for a solution to be submitted. onSubmit is not called if you use JavaScript to submit a form. Rather, you must call it yourself. So an html:link that submits a form, and used the Struts Validator client side JavaScript might look like: html:link href=# onclick=javascript:if (document.forms[0].onsubmit())document.forms[0].submit() Submit bean:write name=project property=title / /html:link Kurt Madel Programmer, CSMi (703) 823-4300 ext. 170 -Original Message- From: Madel,Kurt [mailto:kmadel;csmi.com] Sent: Thursday, October 24, 2002 9:55 AM To: 'Struts Users Mailing List' Subject: Submit Using html:link and html:javascript This may seem somewhat trivial. Never the less, look and feel is very important to a web site. Before using Struts, we have always used hyperlinks to submit forms. I am able to submit a Struts html:form with an html:link tag, but it bypasses the client side validation created by the Validation plug-in. The client side validation works fine if I use an html:submit button. I would be greatly appreciative to hear if and how anyone has gotten the html:link and client side html:javascript tags to work together in submitting an html:form. I am using the struts.jar from the 10/22 nightly build. Thanks Kurt Madel Programmer, CSMi (703) 823-4300 ext. 170 -- 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: Submit Using html:link and html:javascript
I don't think it's a good idea to use hyperlinks for form submission but I'm glad you got it to work. David From: Madel,Kurt [EMAIL PROTECTED] Reply-To: Struts Users Mailing List [EMAIL PROTECTED] To: 'Struts Users Mailing List' [EMAIL PROTECTED] Subject: RE: Submit Using html:link and html:javascript Date: Mon, 28 Oct 2002 14:54:47 -0500 If anyone is interested, I figured this out. Of course this is a basic JavaScript problem so I understand not getting a response on the Struts list. Never the less, I feel that it pertains enough for a solution to be submitted. onSubmit is not called if you use JavaScript to submit a form. Rather, you must call it yourself. So an html:link that submits a form, and used the Struts Validator client side JavaScript might look like: html:link href=# onclick=javascript:if (document.forms[0].onsubmit())document.forms[0].submit() Submit bean:write name=project property=title / /html:link Kurt Madel Programmer, CSMi (703) 823-4300 ext. 170 -Original Message- From: Madel,Kurt [mailto:kmadel;csmi.com] Sent: Thursday, October 24, 2002 9:55 AM To: 'Struts Users Mailing List' Subject: Submit Using html:link and html:javascript This may seem somewhat trivial. Never the less, look and feel is very important to a web site. Before using Struts, we have always used hyperlinks to submit forms. I am able to submit a Struts html:form with an html:link tag, but it bypasses the client side validation created by the Validation plug-in. The client side validation works fine if I use an html:submit button. I would be greatly appreciative to hear if and how anyone has gotten the html:link and client side html:javascript tags to work together in submitting an html:form. I am using the struts.jar from the 10/22 nightly build. Thanks Kurt Madel Programmer, CSMi (703) 823-4300 ext. 170 -- 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 _ Unlimited Internet access -- and 2 months free! Try MSN. http://resourcecenter.msn.com/access/plans/2monthsfree.asp -- To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org
RE: Stop auto fill in html:password
Hi Billy, Sorry I might be providing an answer you already found. The email said that users enable this. That's partly true. You can also set AUTOCOMPLETE=off to never have it autocomplete. So the syntax would be input type=password autocomplete=off/ now u just have to translate it to html:input. -Tim :) -Original Message- From: Billy Ng [mailto:kwokng;earthlink.net] Sent: Saturday, October 26, 2002 7:06 PM To: Struts Users Mailing List Subject: Re: Stop auto fill in html:password I got the answer in the previous email. Please ignore this one. Billy Ng - Original Message - From: Billy Ng [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Saturday, October 26, 2002 3:00 PM Subject: Stop auto fill in html:password Hi folks, IE will auto fill the password if user enables it. Is there a way to clear the history in the html:password? Billy Ng -- 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: Submit Using html:link and html:javascript
Yes, I suppose so but the powers beyond me like the way they look. On the plus side, you can then use a link for cancel that href's an action. Also, this would work well if you wanted to use an image for submit purposes. Kurt Madel Programmer, CSMi (703) 823-4300 ext. 170 -Original Message- From: David Graham [mailto:dgraham1980;hotmail.com] Sent: Monday, October 28, 2002 3:03 PM To: [EMAIL PROTECTED] Subject: RE: Submit Using html:link and html:javascript I don't think it's a good idea to use hyperlinks for form submission but I'm glad you got it to work. David From: Madel,Kurt [EMAIL PROTECTED] Reply-To: Struts Users Mailing List [EMAIL PROTECTED] To: 'Struts Users Mailing List' [EMAIL PROTECTED] Subject: RE: Submit Using html:link and html:javascript Date: Mon, 28 Oct 2002 14:54:47 -0500 If anyone is interested, I figured this out. Of course this is a basic JavaScript problem so I understand not getting a response on the Struts list. Never the less, I feel that it pertains enough for a solution to be submitted. onSubmit is not called if you use JavaScript to submit a form. Rather, you must call it yourself. So an html:link that submits a form, and used the Struts Validator client side JavaScript might look like: html:link href=# onclick=javascript:if (document.forms[0].onsubmit())document.forms[0].submit() Submit bean:write name=project property=title / /html:link Kurt Madel Programmer, CSMi (703) 823-4300 ext. 170 -Original Message- From: Madel,Kurt [mailto:kmadel;csmi.com] Sent: Thursday, October 24, 2002 9:55 AM To: 'Struts Users Mailing List' Subject: Submit Using html:link and html:javascript This may seem somewhat trivial. Never the less, look and feel is very important to a web site. Before using Struts, we have always used hyperlinks to submit forms. I am able to submit a Struts html:form with an html:link tag, but it bypasses the client side validation created by the Validation plug-in. The client side validation works fine if I use an html:submit button. I would be greatly appreciative to hear if and how anyone has gotten the html:link and client side html:javascript tags to work together in submitting an html:form. I am using the struts.jar from the 10/22 nightly build. Thanks Kurt Madel Programmer, CSMi (703) 823-4300 ext. 170 -- 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 _ Unlimited Internet access -- and 2 months free! Try MSN. http://resourcecenter.msn.com/access/plans/2monthsfree.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
form and action in struts-config
Can anyone explain me why I get this problem... I have my action and form defined in the struts-config.xml.. Now in my jsp page when I enter a value in the text-box and try to see the value in my action using debugger, I don't see that value in my form and all i see is the reset value defined in the form bean. Somehow anyvalues I enter in my jsp pages aren't getting moved to the form and they my form just has the reset values defined initally. Can someone explain this to me.. Naga 860-686-1643 -Original Message- From: Madel,Kurt [mailto:kmadel;csmi.com] Sent: Monday, October 28, 2002 2:55 PM To: 'Struts Users Mailing List' Subject: RE: Submit Using html:link and html:javascript If anyone is interested, I figured this out. Of course this is a basic JavaScript problem so I understand not getting a response on the Struts list. Never the less, I feel that it pertains enough for a solution to be submitted. onSubmit is not called if you use JavaScript to submit a form. Rather, you must call it yourself. So an html:link that submits a form, and used the Struts Validator client side JavaScript might look like: html:link href=# onclick=javascript:if (document.forms[0].onsubmit())document.forms[0].submit() Submit bean:write name=project property=title / /html:link Kurt Madel Programmer, CSMi (703) 823-4300 ext. 170 -Original Message- From: Madel,Kurt [mailto:kmadel;csmi.com] Sent: Thursday, October 24, 2002 9:55 AM To: 'Struts Users Mailing List' Subject: Submit Using html:link and html:javascript This may seem somewhat trivial. Never the less, look and feel is very important to a web site. Before using Struts, we have always used hyperlinks to submit forms. I am able to submit a Struts html:form with an html:link tag, but it bypasses the client side validation created by the Validation plug-in. The client side validation works fine if I use an html:submit button. I would be greatly appreciative to hear if and how anyone has gotten the html:link and client side html:javascript tags to work together in submitting an html:form. I am using the struts.jar from the 10/22 nightly build. Thanks Kurt Madel Programmer, CSMi (703) 823-4300 ext. 170 -- 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 LEGAL NOTICE Unless expressly stated otherwise, this message is confidential and may be privileged. It is intended for the addressee(s) only. Access to this E-mail by anyone else is unauthorized. If you are not an addressee, any disclosure or copying of the contents of this E-mail or any action taken (or not taken) in reliance on it is unauthorized and may be unlawful. If you are not an addressee, please inform the sender immediately. -- To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org
prefill form with session data?
Hello, I need to set specific userdata read from a session in an ActionForm in the form's reset method. Could there be any conflicts with userdata from other users which use the form at the same time ? Thx berger -- To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org
[OT] Oracle Magazine Java Developer of the Year
The nov/dec issue of Oracle Magazine has several person of the year awards. The person picked as Java developer of the year is James Holmes for his work on Struts Console. Struts is also mentioned in several articles as a key framework component in the same issue. Brad -- To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org
RE: [Nested Tags] Nested vs logic tags..
Just a hunch-- have you tried specifying a 'name' for the nested:iterate tag? -Original Message- From: [EMAIL PROTECTED] [mailto:Jeff_Mychasiw;nlgroup.ca] Sent: Monday, October 28, 2002 8:03 AM To: [EMAIL PROTECTED] Subject: [Nested Tags] Nested vs logic tags.. Greetings: I am almost exclusively using nested tags. Every now and then I run into a problem and have to switch over the corresponding logic or bean version. Can anyony tell me if this is a bug? I am using 1.1b2 I tried this with nested:equal but got a NullPointerException (listed below) nested:iterate property=meshList indexId=listIndex tr td %-- Show this only for the first item--% nested:equal name=listIndex value=0 /nested:equal but had to change the equals to: logic:equal name=listIndex value=0 /logic:equal 2002-10-28 09:52:49 jsp: init 2002-10-28 09:52:49 ApplicationDispatcher[/ar] Servlet.service() for servlet jsp threw exception java.lang.NullPointerException at org.apache.struts.taglib.nested.NestedPropertyHelper.getNestedProperty(Neste dPropertyHelper.java:173) at org.apache.struts.taglib.nested.NestedPropertyHelper.getNestedProperty(Neste dPropertyHelper.java:195) at org.apache.struts.taglib.nested.NestedPropertyHelper.setNestedProperties(Nes tedPropertyHelper.java:242) at org.apache.struts.taglib.nested.logic.NestedEqualTag.doStartTag(NestedEqualT ag.java:91) at org.apache.jsp.CustomerMeshMainForm$jsp._jspService(CustomerMeshMainForm$jsp .java:475) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:107) -- To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org
RE: [OT] Oracle Magazine Java Developer of the Year
That's great, congrats James! Chris -Original Message- From: Bradley G Smith [mailto:bgsmith01;fs.fed.us] Sent: Monday, October 28, 2002 3:35 PM To: [EMAIL PROTECTED] Subject: [OT] Oracle Magazine Java Developer of the Year The nov/dec issue of Oracle Magazine has several person of the year awards. The person picked as Java developer of the year is James Holmes for his work on Struts Console. Struts is also mentioned in several articles as a key framework component in the same issue. Brad -- 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: Submit Using html:link and html:javascript
Is there a struts tags for an input image? Kurt Madel Programmer, CSMi (703) 823-4300 ext. 170 -Original Message- From: David Graham [mailto:dgraham1980;hotmail.com] Sent: Monday, October 28, 2002 3:44 PM To: [EMAIL PROTECTED] Subject: RE: Submit Using html:link and html:javascript You can use an input element for image submit buttons. You don't need a link around an image. David From: Madel,Kurt [EMAIL PROTECTED] Reply-To: Struts Users Mailing List [EMAIL PROTECTED] To: 'Struts Users Mailing List' [EMAIL PROTECTED] Subject: RE: Submit Using html:link and html:javascript Date: Mon, 28 Oct 2002 15:14:58 -0500 Yes, I suppose so but the powers beyond me like the way they look. On the plus side, you can then use a link for cancel that href's an action. Also, this would work well if you wanted to use an image for submit purposes. Kurt Madel Programmer, CSMi (703) 823-4300 ext. 170 -Original Message- From: David Graham [mailto:dgraham1980;hotmail.com] Sent: Monday, October 28, 2002 3:03 PM To: [EMAIL PROTECTED] Subject: RE: Submit Using html:link and html:javascript I don't think it's a good idea to use hyperlinks for form submission but I'm glad you got it to work. David From: Madel,Kurt [EMAIL PROTECTED] Reply-To: Struts Users Mailing List [EMAIL PROTECTED] To: 'Struts Users Mailing List' [EMAIL PROTECTED] Subject: RE: Submit Using html:link and html:javascript Date: Mon, 28 Oct 2002 14:54:47 -0500 If anyone is interested, I figured this out. Of course this is a basic JavaScript problem so I understand not getting a response on the Struts list. Never the less, I feel that it pertains enough for a solution to be submitted. onSubmit is not called if you use JavaScript to submit a form. Rather, you must call it yourself. So an html:link that submits a form, and used the Struts Validator client side JavaScript might look like: html:link href=# onclick=javascript:if (document.forms[0].onsubmit())document.forms[0].submit() Submit bean:write name=project property=title / /html:link Kurt Madel Programmer, CSMi (703) 823-4300 ext. 170 -Original Message- From: Madel,Kurt [mailto:kmadel;csmi.com] Sent: Thursday, October 24, 2002 9:55 AM To: 'Struts Users Mailing List' Subject: Submit Using html:link and html:javascript This may seem somewhat trivial. Never the less, look and feel is very important to a web site. Before using Struts, we have always used hyperlinks to submit forms. I am able to submit a Struts html:form with an html:link tag, but it bypasses the client side validation created by the Validation plug-in. The client side validation works fine if I use an html:submit button. I would be greatly appreciative to hear if and how anyone has gotten the html:link and client side html:javascript tags to work together in submitting an html:form. I am using the struts.jar from the 10/22 nightly build. Thanks Kurt Madel Programmer, CSMi (703) 823-4300 ext. 170 -- 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 _ Unlimited Internet access -- and 2 months free! Try MSN. http://resourcecenter.msn.com/access/plans/2monthsfree.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 _ Broadband? Dial-up? Get reliable MSN Internet Access. http://resourcecenter.msn.com/access/plans/default.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
RE: Submit Using html:link and html:javascript
http://jakarta.apache.org/struts/userGuide/struts-html.html#image In the future, check the users guide first. David From: Madel,Kurt [EMAIL PROTECTED] Reply-To: Struts Users Mailing List [EMAIL PROTECTED] To: 'Struts Users Mailing List' [EMAIL PROTECTED] Subject: RE: Submit Using html:link and html:javascript Date: Mon, 28 Oct 2002 15:51:21 -0500 Is there a struts tags for an input image? Kurt Madel Programmer, CSMi (703) 823-4300 ext. 170 -Original Message- From: David Graham [mailto:dgraham1980;hotmail.com] Sent: Monday, October 28, 2002 3:44 PM To: [EMAIL PROTECTED] Subject: RE: Submit Using html:link and html:javascript You can use an input element for image submit buttons. You don't need a link around an image. David From: Madel,Kurt [EMAIL PROTECTED] Reply-To: Struts Users Mailing List [EMAIL PROTECTED] To: 'Struts Users Mailing List' [EMAIL PROTECTED] Subject: RE: Submit Using html:link and html:javascript Date: Mon, 28 Oct 2002 15:14:58 -0500 Yes, I suppose so but the powers beyond me like the way they look. On the plus side, you can then use a link for cancel that href's an action. Also, this would work well if you wanted to use an image for submit purposes. Kurt Madel Programmer, CSMi (703) 823-4300 ext. 170 -Original Message- From: David Graham [mailto:dgraham1980;hotmail.com] Sent: Monday, October 28, 2002 3:03 PM To: [EMAIL PROTECTED] Subject: RE: Submit Using html:link and html:javascript I don't think it's a good idea to use hyperlinks for form submission but I'm glad you got it to work. David From: Madel,Kurt [EMAIL PROTECTED] Reply-To: Struts Users Mailing List [EMAIL PROTECTED] To: 'Struts Users Mailing List' [EMAIL PROTECTED] Subject: RE: Submit Using html:link and html:javascript Date: Mon, 28 Oct 2002 14:54:47 -0500 If anyone is interested, I figured this out. Of course this is a basic JavaScript problem so I understand not getting a response on the Struts list. Never the less, I feel that it pertains enough for a solution to be submitted. onSubmit is not called if you use JavaScript to submit a form. Rather, you must call it yourself. So an html:link that submits a form, and used the Struts Validator client side JavaScript might look like: html:link href=# onclick=javascript:if (document.forms[0].onsubmit())document.forms[0].submit() Submit bean:write name=project property=title / /html:link Kurt Madel Programmer, CSMi (703) 823-4300 ext. 170 -Original Message- From: Madel,Kurt [mailto:kmadel;csmi.com] Sent: Thursday, October 24, 2002 9:55 AM To: 'Struts Users Mailing List' Subject: Submit Using html:link and html:javascript This may seem somewhat trivial. Never the less, look and feel is very important to a web site. Before using Struts, we have always used hyperlinks to submit forms. I am able to submit a Struts html:form with an html:link tag, but it bypasses the client side validation created by the Validation plug-in. The client side validation works fine if I use an html:submit button. I would be greatly appreciative to hear if and how anyone has gotten the html:link and client side html:javascript tags to work together in submitting an html:form. I am using the struts.jar from the 10/22 nightly build. Thanks Kurt Madel Programmer, CSMi (703) 823-4300 ext. 170 -- 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 _ Unlimited Internet access -- and 2 months free! Try MSN. http://resourcecenter.msn.com/access/plans/2monthsfree.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 _ Broadband? Dial-up? Get reliable MSN Internet Access. http://resourcecenter.msn.com/access/plans/default.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 _ Unlimited Internet access -- and 2 months free! Try MSN. http://resourcecenter.msn.com/access/plans/2monthsfree.asp -- To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org For additional commands, e-mail:
RE: Submit Using html:link and html:javascript
Is there a struts tags for an input image? Assuming you mean a SUBMIT button with an image on it instead of text, here's what I'm using: html-el:submit property=submit onclick=setAction('Add Prospect'); styleClass=addButton titleKey=button.add.prospect value= / And here's the style that goes with it: .addButton { background-image:url(images/add.gif); background-position:center; background-repeat:no-repeat; background-color:lt grey } The setAction javascript is necessary because you can't have a value without the text appearing on the button. (Or, I couldn't figure out how.) So I put a value into the hidden 'action' form field and then use that in a LookupDispatchAction: function setAction(target) {document.forms[0].action.value=target;} It took a long time to piece all this together. Hope it helps someone else! -- Wendy Smoak Applications Systems Analyst, Sr. Arizona State University PA Information Resources Management
Struts Validator for multiple Selects
We have a multiple select that is required. The following works on server side, but not client side: form name=milestoneDetailForm field property=mspersonsIds[0] depends=required arg0 key=label.milestone.mspersonsIds/ /field /form If changed to the following, it is caught on the server side, but no message is printed: form name=milestoneDetailForm field property=mspersonsIds depends=required arg0 key=label.milestone.mspersonsIds/ /field /form Any ideas? Thanks Kurt Madel Programmer, CSMi (703) 823-4300 ext. 170 -- To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org
Re: [JSTL] c:out and DynaBeanClass
Note that DynaBeans aren't strictly JavaBeans (I believe), so it might be difficult to patch them into the JSTL. JSTL supports dynabeans transparently -- To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org
RE: [OT] Oracle Magazine Java Developer of the Year
Here's the link: http://otn.oracle.com/oramag/oracle/02-nov/o62awards.html#JAMES Assenza, Chris [EMAIL PROTECTED] on 10/28/2002 03:34:33 PM Please respond to Struts Users Mailing List [EMAIL PROTECTED] To:'Struts Users Mailing List' [EMAIL PROTECTED] cc: (bcc: Kevin Bedell/Systems/USHO/SunLife) Subject:RE: [OT] Oracle Magazine Java Developer of the Year That's great, congrats James! Chris -Original Message- From: Bradley G Smith [mailto:bgsmith01;fs.fed.us] Sent: Monday, October 28, 2002 3:35 PM To: [EMAIL PROTECTED] Subject: [OT] Oracle Magazine Java Developer of the Year The nov/dec issue of Oracle Magazine has several person of the year awards. The person picked as Java developer of the year is James Holmes for his work on Struts Console. Struts is also mentioned in several articles as a key framework component in the same issue. Brad -- 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 --- 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: Problem with multiple html(jsp) pages sharing one form (actionform)
Hi Derek, Sorry for not getting back sooner. if you are using the same action and jsp for your wizards, how are they qualified to be wizards? Whenever I need a wizard-like flow in my application, I use a single action and a single jsp to go from Step 1 to Step n. I can do this by passing around a token called step, which is a field on my form used only for the purpose of this wizard. Here's a bit of psuedo code... wizard.jsp -- taglib declarations html:form blah blah !-- Stuff you want on every page -- !-- Step 1 -- logic:equal name=wizardForm property=step value=1 Field 1:html:text property=field1/br Field 2:html:text property=field2/br Field 3:html:text property=field3/br Field 4:html:text property=field4/br Field 5:html:text property=field5/br /logic:equal !-- Step 2 -- logic:equal name=wizardForm property=step value=2 Field 6:html:text property=field6/br Field 7:html:text property=field7/br Field 8:html:text property=field8/br Field 9:html:text property=field9/br Field 10:html:text property=field10/br /logic:equal !-- Step 3 -- logic:equal name=wizardForm property=step value=3 Field 11:html:text property=field11/br Field 12:html:text property=field12/br Field 13:html:text property=field13/br Field 14:html:text property=field14/br Field 15:html:text property=field15/br /logic:equal /html:form So I handle the form submit and validation within my Action class (This give me the most control). By doing it this way, if I need to move field 6 thru 8 to Step 1, I can drag it up there within my text editor. (as opposed to cutting it from one jsp and pasting into another) Not to mention repeating the page headers footer and any other page data (style, javascript, etc) 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: Derek Lin [mailto:dereklin;hotmail.com] Sent: Monday, October 28, 2002 2:01 AM To: Struts Users Mailing List Subject: Re: Problem with multiple html(jsp) pages sharing one form (actionform) James, First of all, if you are using the same action and jsp for your wizards, how are they qualified to be wizards? Perhaps I am not getting what you mean. But a wizard would mean many different jsp's to me. But anyway, that is not very important at this point. I tried what you have suggested. All the data is gone. On top of that, I have did some debugging. This is what I get from the my RegistrationForm after I hit submit in step1: (As you can see the properties are set nicely) DynaActionForm[dynaClass=RegistrationForm,userPhoneType=,companyPa ssword2=,c ompanyEmailType=primary,companyPassword=,companyUsername=,creditca rdNumber=, companyPhone=1234567890,userEmailType=,companyName=u,companyZip=94 112,credit cardType=,userPhone=,creditcardExpDate=,userRole=admin,companyFax= u,companyS treet=u,[EMAIL PROTECTED],firstName=,companyCountry=US,company State=u,us erFax=,companyStreet2=u,userEmail=,companyAddressType=primary,comp anyProvinc e=,companyPhoneType=primary,companyCity=u,lastName=] Now, when I hit submit on step2, here is what I get: (The previous values are gone. Only new values are there. The reset method had to be called or a new instance of RegistrationForm was generated.) DynaActionForm[dynaClass=RegistrationForm,userPhoneType=,companyPa ssword2=12 3456,companyEmailType=primary,companyPassword=123456,companyUserna me=uyy,cre ditcardNumber=,companyPhone=,userEmailType=,companyName=,companyZi p=,creditc ardType=,userPhone=u,creditcardExpDate=,userRole=admin,companyFax= ,companySt reet=,companyEmail=,firstName=u,companyCountry=,companyState=,user Fax=u,comp anyStreet2=,userEmail=u,companyAddressType=primary,companyProvince =,companyP honeType=primary,companyCity=,lastName=u] One more thing is that, not sure if this is relevant, I am also using the struts validator to validate for form. And while I fix the JavaScript to only validate the existing formfileds, the struts validator (java) is throwing exceptions on my console (since the form values don't exist -- I only use a portion of the form here -- you get the picture, right?) These exceptions do cause the application to stop. My app goes on with no apparent problems. (At some point, I want to modify the validator to detect existing formfields only. Or is anyone working on that?) To sum this up. I think either the reset method is called or a new instance of my form is created. Do you have a example of a wizard working?--one that expands to two or more jsp's. If so, can you just copy and paste the code
RE: [JSTL] c:out and DynaBeanClass
-Original Message- From: flare [mailto:flare;flare.it] Sent: Monday, October 28, 2002 1:26 PM To: Struts Users Mailing List Subject: Re: [JSTL] c:out and DynaBeanClass Note that DynaBeans aren't strictly JavaBeans (I believe), so it might be difficult to patch them into the JSTL. JSTL supports dynabeans transparently Could you please supply a scenario and sample code that proves this? -- To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org
Token
When I need to control transactions, I am using Tokens. I call saveToken() in the Action that forward to a page A. my page A: html:form action=/teste.do input type=hidden name=method value=methodA/ input type=submit/ /html:form My Action teste.do is a DispatchAction, so my methodA will run!!! I call: if (isTokenValid(request, true)) {...} All run fine !!! My Question: The first thing that I said was that my Action call saveToken() and go to the page A... But my Action only need to do this: ... String forward = popupPromoMasterCard; saveToken(request); return mapping.findForward(forward); ... I would like to know if there are another way to save tokens, for example with taglib !!! So I could to use org.apache.struts.actions.ForwardAction... Thanks !!! _ MSN Messenger: converse com os seus amigos online. http://messenger.msn.com.br -- To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org
Re: [OT] Oracle Magazine Java Developer of the Year
Congrat, James! I love the console! Bradley G Smith wrote: The nov/dec issue of Oracle Magazine has several person of the year awards. The person picked as Java developer of the year is James Holmes for his work on Struts Console. Struts is also mentioned in several articles as a key framework component in the same issue. Brad -- To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org -- Vincent Stoessel Linux Systems Developer vincent xaymaca.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: Struts Validator for multiple Selects
Oh yeah, the jsp is: html:javascript formName=milestoneDetailForm dynamicJavascript=true/ html:form action=/addmilestone onsubmit=return validateMilestoneDetailForm(this); table class=form html:hidden property=mrevdate/ tr td align=left valign=center FONT class=labelBMilestone Description:/B/FONT /td td align=left valign=center html:textarea property=description rows=3 cols=80/html:errors property=description / /td /tr tr td align=left valign=center FONT class=labelBDOE Manager(s):/B/FONT /td td align=left valign=center html:select property=mspersonsIds size=4 multiple=true html:options collection=managerList property=id labelProperty=name / /html:selecthtml:errors property=mspersonsIds / /td /tr /table html:link href=# onclick=javascript:if (document.forms[0].onsubmit())document.forms[0].submit() Add /html:link /html:form Kurt Madel Programmer, CSMi (703) 823-4300 ext. 170 -Original Message- From: Madel,Kurt [mailto:kmadel;csmi.com] Sent: Monday, October 28, 2002 4:24 PM To: 'Struts Users Mailing List' Subject: Struts Validator for multiple Selects We have a multiple select that is required. The following works on server side, but not client side: form name=milestoneDetailForm field property=mspersonsIds[0] depends=required arg0 key=label.milestone.mspersonsIds/ /field /form If changed to the following, it is caught on the server side, but no message is printed: form name=milestoneDetailForm field property=mspersonsIds depends=required arg0 key=label.milestone.mspersonsIds/ /field /form Any ideas? Thanks Kurt Madel Programmer, CSMi (703) 823-4300 ext. 170 -- 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: [Nested Tags] Nested vs logic tags..
No I have not. I could be wrong but I am under the assumptiion that the name attribute is used to look for a bean. The documents state that the nested versions of the tags will work the same but allow you exclude specific references to parent tags. I have done this many times: logic:iterate name=myFormBean property=meshList id=myObject indexId=listIndex type=com.nlg.ar.SomeVo logic:equal name=listIndex value=0XXX/logic:iterate bean:write name=myObject property=legalName / /logic:iterate I like the nested version.. nested:iterate property=meshList indexId=listIndex nested:equal name=listIndex value=0XXX/nested:iterate nested:write property=legalName / /nested:iterate It is not the end of the world, but I in order to use the indexId I have to use the logic:equal (note the equal tag) nested:iterate property=meshList indexId=listIndex logic:equal name=listIndex value=0XXX/logic:iterate nested:write property=legalName / /nested:iterate Taylor, Jason [EMAIL PROTECTED] on 10/28/2002 02:38:33 PM Please respond to Struts Users Mailing List [EMAIL PROTECTED] To:'Struts Users Mailing List' [EMAIL PROTECTED] cc: Subject:RE: [Nested Tags] Nested vs logic tags.. Just a hunch-- have you tried specifying a 'name' for the nested:iterate tag? -Original Message- From: [EMAIL PROTECTED] [mailto:Jeff_Mychasiw;nlgroup.ca] Sent: Monday, October 28, 2002 8:03 AM To: [EMAIL PROTECTED] Subject: [Nested Tags] Nested vs logic tags.. Greetings: I am almost exclusively using nested tags. Every now and then I run into a problem and have to switch over the corresponding logic or bean version. Can anyony tell me if this is a bug? I am using 1.1b2 I tried this with nested:equal but got a NullPointerException (listed below) nested:iterate property=meshList indexId=listIndex tr td %-- Show this only for the first item--% nested:equal name=listIndex value=0 /nested:equal but had to change the equals to: logic:equal name=listIndex value=0 /logic:equal 2002-10-28 09:52:49 jsp: init 2002-10-28 09:52:49 ApplicationDispatcher[/ar] Servlet.service() for servlet jsp threw exception java.lang.NullPointerException at org.apache.struts.taglib.nested.NestedPropertyHelper.getNestedProperty(Neste dPropertyHelper.java:173) at org.apache.struts.taglib.nested.NestedPropertyHelper.getNestedProperty(Neste dPropertyHelper.java:195) at org.apache.struts.taglib.nested.NestedPropertyHelper.setNestedProperties(Nes tedPropertyHelper.java:242) at org.apache.struts.taglib.nested.logic.NestedEqualTag.doStartTag(NestedEqualT ag.java:91) at org.apache.jsp.CustomerMeshMainForm$jsp. _jspService(CustomerMeshMainForm$jsp .java:475) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:107) -- 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
does javascript have a place in mvc struts
Sorry this might be an elementary question, but im new to jsp and struts. I have done a lot of reading in the last few weeks. I realize that struts is the way to go in terms of following the mvc model. My one question at this time is in regards to form validation. By that i mean when a user enters information; lets say username password should the information be validated with the aid of javascript on the client side or is the concesus to leave such a task to beans on the server side??? Thank u all for your time * This message is intended for the use of the individual or entity to which it is addressed and may contain information that is confidential and privileged and exempt from disclosure under applicable law. If the reader of this message is not the intended recipient, you are hereby notified that any dissemination, distribution, or copying of this communication is strictly prohibited. If you have received this communication in error, please contact the sender immediately and delete it from your system. 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
RE: action mapping input
Okay, I misunderstood what John was saying and this is what I have: 1) forward failure is NOT the same as input which is required if validate=true 2) input CAN forward to a tiles definition. I looked at the original post and realized that it was pretty ambiguous. what i wanted to do (and it was successful) was: action path=/siteSelect type=SiteSelectAction name=siteSelectForm validate=true scope=request input=site.select.page forward name=success path=site.select.global/ /action where site.select.page was a tiles definition. Thanks, -Tim -Original Message- From: Chen, Gin [mailto:Gin_Chen;tvratings.com] Sent: Friday, October 18, 2002 3:19 PM To: 'Struts Users Mailing List' Subject: RE: action mapping input Okay, just to get this straight. So I define a failure forward and it will behave the same as validation error following the input tag? No additional coding required? Also, the reason that I wanted to use the input tag instead of another forward is that I want to use the 1.1b2 method getInputForward(). It would almost make sense that with the inclusion of this new method, the intent was for it to behave as if it were looking up a forward or global. No? -Tim -Original Message- From: John Nicholas [mailto:jakarta;mobosplash.com] Sent: Friday, October 18, 2002 2:45 PM To: Struts Users Mailing List Subject: Re: action mapping input Chen, Gin wrote: Hi all, I'm still new to struts and I cant find this in the documentation but, lets say that you have one of the struts-config from the docs. global-forwards type=org.apache.struts.action.ActionForward/ forward name=logon path=/logon.jsp redirect=false / /global-forwards action-mappings action path=/logon type=org.apache.struts.example.LogonAction name=logonForm scope=request input=/logon.jsp unknown=false validate=true / /action-mappings Rather than have input=/logon.jsp as in the snip can you have input=logon and have it use the path from the global-forwards? It just seems like it would make more sense since that means that you only have to change one location in case the location of the file ever has to change. The input attribute is used when validation of the form bean fails. if the validation in the form bean (or the validator) fails the action is never run so it couldn't use the forward. The controller is returning you to the input page. If a validation in the action fails (like a business logic failure)then you can use a failure forward. John Nicholas -- 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: does javascript have a place in mvc struts
I believe that there is not exactly a consensus. However, the Struts Validator makes it easy to incorporate both. Additionally, many will check the data again in the model layer before it is persisted (i.e. inserted into a database). On the model layer, I use O/R mapping that helps with data integrity in the model. Kurt Madel Programmer, CSMi (703) 823-4300 ext. 170 -Original Message- From: [EMAIL PROTECTED] [mailto:jmattucci;na.cokecce.com] Sent: Monday, October 28, 2002 5:36 PM To: Struts Users Mailing List Subject: does javascript have a place in mvc struts Sorry this might be an elementary question, but im new to jsp and struts. I have done a lot of reading in the last few weeks. I realize that struts is the way to go in terms of following the mvc model. My one question at this time is in regards to form validation. By that i mean when a user enters information; lets say username password should the information be validated with the aid of javascript on the client side or is the concesus to leave such a task to beans on the server side??? Thank u all for your time * This message is intended for the use of the individual or entity to which it is addressed and may contain information that is confidential and privileged and exempt from disclosure under applicable law. If the reader of this message is not the intended recipient, you are hereby notified that any dissemination, distribution, or copying of this communication is strictly prohibited. If you have received this communication in error, please contact the sender immediately and delete it from your system. 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 -- To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org
Using tiles and container managed security/form based login
[I have moved this branch of this thread to struts-users as it no longer belongs on struts-dev; was: RE: [SURVEY] HREF attribute for FormTag] Thanks, I should be able to use that advice to fix my problem. However I still don't understand why my approach doesn't work: I have CMS set up on /*. I put all my jsps under WEB-INF as per various FAQ advice. Tomcat needs an accessible logon.jsp so that stays outside (/logon.jsp). However, that just contains a logic:forward to a global forward to /WEB-INF/jsp/logon.jsp which contains the appropriate j_security_check form (in plain html). This works fine (although thinking about it, it is not good as it is a jsp forwarding to a jsp - even if it is the only one in my setup). I then tried replacing the /logon.jsp forward to /WEB-INF/jsp/logon.jsp to a forward to my new logon tile tile.cmsLogon. This does not work. However I am sure that the setup of this tile is correct (famous last words). I suspect it is something to do with how tile definitions are spliced into the forwards' namespace but have not had time to figure out enough of the Struts sources to be sure. I hadn't thought of forwarding to a proper action instead which could forward to a tile. Many thanks Alan Hal Deadman writes: I have a container managed security login page fragment that is a Tile and don't recall having any problem. Is the problem that you are trying to specify a tile as the form-login-page? My form is using HTML for the form tag and the username and password fields. When I specify the login page, I specify struts actions as follows to give me a little more control over what I display on the login jsp. The login.do action is then mapped to a Tile component that eventually contains a login.jsp. You can use the url parameters to determine in your action if you need to display a message to the user about their login attempt not working. login-config auth-methodFORM/auth-method realm-nameRpowerRealm/realm-name form-login-config form-login-page/login.do?type=attempt/form-login-page form-error-page/login.do?type=failed/form-error-page /form-login-config /login-config Cheers, Alan Craig Alan -- To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org
RE: does javascript have a place in mvc struts
Not an elementary question at all, and the answer is: It depends on the situation. ;) First, your business requirements dictate where validation is possible. If you are creating a service-type web application accessible via the Internet to many different kinds of users, then your business requirements may dictate that you must accomodate users who have JavaScript disabled. This means that you must always validate server-side even if you have shortcut validation client-side w/ JavaScript, which will be used *if* JS is enabled. Even if it is specified that JavaScript is required for the application, you must ensure that no illegal data slips through by doing server-side data checks, if necessary. Second, the general notion is that 'simple' validation like password-length/format, zip code length, phone number length/formats, etc., are best validated client-side with JavaScript. Anything that requires complex logic, business rule evaluation, or database access should be validated server-side. You should by no means transmit any sensitive information over HTTP for client-side validation, of course. What you really are trying to do is limit the number of requests your server has to process by using JavaScript to validate the easy stuff. One good rule-o'-thumb, I feel, is that if you have to transmit a lot of extra hidden information to do client-side validation with JS, then you should be doing it server-side instead. peace, Joe -Original Message- From: [EMAIL PROTECTED] [mailto:jmattucci;na.cokecce.com] Sent: Monday, October 28, 2002 2:36 PM To: Struts Users Mailing List Subject: does javascript have a place in mvc struts Sorry this might be an elementary question, but im new to jsp and struts. I have done a lot of reading in the last few weeks. I realize that struts is the way to go in terms of following the mvc model. My one question at this time is in regards to form validation. By that i mean when a user enters information; lets say username password should the information be validated with the aid of javascript on the client side or is the concesus to leave such a task to beans on the server side??? Thank u all for your time ** ** * This message is intended for the use of the individual or entity to which it is addressed and may contain information that is confidential and privileged and exempt from disclosure under applicable law. If the reader of this message is not the intended recipient, you are hereby notified that any dissemination, distribution, or copying of this communication is strictly prohibited. If you have received this communication in error, please contact the sender immediately and delete it from your system. 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 -- To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org
RE: does javascript have a place in mvc struts
You should absolutely, positively, perform validation on the server side regardless of what you might do on the client side. It is not appropriate for a server-side application to trust the client (which might be anything from a browser with JavaScript turned off to a malicious application trying to corrupt your database). That being said, performing validation on the client side as well is useful, because it can improve the quality of the user experience and reduce the turnaround time for errors. However, there will be some things that cannot be validated client side (compare is this the right number of digits for a credit card number to is this a valid credit card number), so you're going to need to plan on server side validation anyway. Craig McClanahan On Mon, 28 Oct 2002, Madel,Kurt wrote: Date: Mon, 28 Oct 2002 18:14:03 -0500 From: Madel,Kurt [EMAIL PROTECTED] Reply-To: Struts Users Mailing List [EMAIL PROTECTED] To: 'Struts Users Mailing List' [EMAIL PROTECTED] Subject: RE: does javascript have a place in mvc struts I believe that there is not exactly a consensus. However, the Struts Validator makes it easy to incorporate both. Additionally, many will check the data again in the model layer before it is persisted (i.e. inserted into a database). On the model layer, I use O/R mapping that helps with data integrity in the model. Kurt Madel Programmer, CSMi (703) 823-4300 ext. 170 -Original Message- From: [EMAIL PROTECTED] [mailto:jmattucci;na.cokecce.com] Sent: Monday, October 28, 2002 5:36 PM To: Struts Users Mailing List Subject: does javascript have a place in mvc struts Sorry this might be an elementary question, but im new to jsp and struts. I have done a lot of reading in the last few weeks. I realize that struts is the way to go in terms of following the mvc model. My one question at this time is in regards to form validation. By that i mean when a user enters information; lets say username password should the information be validated with the aid of javascript on the client side or is the concesus to leave such a task to beans on the server side??? Thank u all for your time * This message is intended for the use of the individual or entity to which it is addressed and may contain information that is confidential and privileged and exempt from disclosure under applicable law. If the reader of this message is not the intended recipient, you are hereby notified that any dissemination, distribution, or copying of this communication is strictly prohibited. If you have received this communication in error, please contact the sender immediately and delete it from your system. 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 -- 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: does javascript have a place in mvc struts
Sorry this might be an elementary question, but im new to jsp and struts. I have done a lot of reading in the last few weeks. I realize that struts is the way to go in terms of following the mvc model. My one question at this time is in regards to form validation. By that i mean when a user enters information; lets say username password should the information be validated with the aid of javascript on the client side or is the concesus to leave such a task to beans on the server side??? Thank u all for your time Consensus or not, I'd say the answer is emphatically yes. You certainly should not rely solely on javascript for validation, but javascript is a valid and useful part of the view layer, and as such, should be used for what it's good for, which is saving users the headache of waiting for a round-trip to the server to tell 'em they've messed up. Joe -- -- * Joe Germuska{ [EMAIL PROTECTED] } It's pitiful, sometimes, if they've got it bad. Their eyes get glazed, they go white, their hands tremble As I watch them I often feel that a dope peddler is a gentleman compared with the man who sells records. --Sam Goody, 1956 -- To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org
RE: [Nested Tags] Nested vs logic tags..
Just a hunch-- have you tried specifying a 'name' for the nested:iterate tag? The nested tags don't need it, and if it's provided they will ignore it. Why?... because all the tags are working off the same bean structure, and this is defined for us by the form tag. The nested tags will fetch this bean. Because of this, all the nested tags within the form bean don't need the name property to be set. From: [EMAIL PROTECTED] [mailto:Jeff_Mychasiw;nlgroup.ca] Greetings: I am almost exclusively using nested tags. Every now and then I run into a problem and have to switch over the corresponding logic or bean version. Can anyony tell me if this is a bug? I am using 1.1b2 I tried this with nested:equal but got a NullPointerException (listed below) nested:iterate property=meshList indexId=listIndex tr td %-- Show this only for the first item--% nested:equal name=listIndex value=0 /nested:equal Try remove the name property (for reasons explained above), and try aiming the property property at it. It looks like you're trying to get the current object of the iterate tag, so this may work... nested:iterate property=meshList tr td nested:equal property=this/ value=0 [...] /nested:equal /td /tr /nested:iterate ...the this/ or ./ simply refers to the current parent object level just like using ./ on a command line. If it's not the current object you're after, point the property at one of it's relative properties. See if that works. Arron. -- To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org
Re: Using tiles and container managed security/form based login
I am using logic:forward rather than jsp:forward. I had not checked it but had assumed (perhaps naively) that since that is part of struts, it would be tiles plugin aware. If it is not, then that would certainly explain my symptoms and your suggestion will fix it. Many thanks again. Alan I then tried replacing the /logon.jsp forward to /WEB-INF/jsp/logon.jsp to a forward to my new logon tile tile.cmsLogon. This does not work. However I am sure that the setup of this tile is correct (famous last words). I suspect it is something to do with how tile definitions are spliced into the forwards' namespace but have not had time to figure out enough of the Struts sources to be sure. Are you using jsp:forward to forward from the logon.jsp? If so, that tag doesn't know how to handle tiles. You need to send the request through the controller servlet, with tiles properly setup. Then the tiles plug-in intercepts the forward and checks to see if it's really a tile. --from struts-config.xml action path=/login type=org.eei.rpwr.common.ui.LoginAction forward name=success path=nav.login redirect=false / /action --from tiles-definitions.xml definition name=nav.login extends=standard put name=body value=nav.login.body / /definition definition name=nav.login.body path=/tiles/toplevel.jsp put name=content value=/login.jsp / /definition I hadn't thought of forwarding to a proper action instead which could forward to a tile. Many thanks Alan Hal Deadman writes: I have a container managed security login page fragment that is a Tile and don't recall having any problem. Is the problem that you are trying to specify a tile as the form-login-page? My form is using HTML for the form tag and the username and password fields. When I specify the login page, I specify struts actions as follows to give me a little more control over what I display on the login jsp. The login.do action is then mapped to a Tile component that eventually contains a login.jsp. You can use the url parameters to determine in your action if you need to display a message to the user about their login attempt not working. login-config auth-methodFORM/auth-method realm-nameRpowerRealm/realm-name form-login-config form-login-page/login.do?type=attempt/form-login-page form-error-page/login.do?type=failed/form-error-page /form-login-config /login-config Cheers, Alan Craig Alan -- To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org
error checking in Action
I need to do some extensive error checking, and need to move this into an action class. my question is when i identify an action, how i forward back to the previous page (the same way a form class would). is there a method to take care of this? or do i need to setup all the passed values in the request again and do an ActionForward to the appropriate page? thanks, 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: error checking in Action
Why do you need to move error checking into an action? Why not just let the form bean do it's job and validate itself? Have you looked at using the validator? Validation belongs in the form bean; actions' main job is to direct traffic and execute business layer methods. David From: Mark Silva [EMAIL PROTECTED] Reply-To: Struts Users Mailing List [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Subject: error checking in Action Date: Mon, 28 Oct 2002 16:54:39 -0800 I need to do some extensive error checking, and need to move this into an action class. my question is when i identify an action, how i forward back to the previous page (the same way a form class would). is there a method to take care of this? or do i need to setup all the passed values in the request again and do an ActionForward to the appropriate page? thanks, mark -- To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org _ Unlimited Internet access -- and 2 months free! Try MSN. http://resourcecenter.msn.com/access/plans/2monthsfree.asp -- To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org
html:cancel problem
Hi, I have problem with the html:cancel tag in STRUTS 1.02 I have an Action class that create an instance of a ActionForm, populate it with data and put it in the session (session.setAttribute). Then my action class redirect the request to a JSP page that display the data from the sessions actionForm. The problem occur when someone modify one of the fields in the JSP and then click the cancel button. The data in the session has been modified event if thats a cancel button. Is it normal? Can someone help me with that? Thank you! Nicolas
Maxlength validation returns null in error message
Hi all, I've looking at the struts-example.war in 1.1b2 and when running through the login.jsp page I keep getting the following username can not be greater than null characters. This happens via the JavaScript validation. I thought maybe it might be JavaScript related, but when I remove the onsubmit and let the server validate I end up with the same message. I think I found somewhere that this is an open error, but not sure where to check. Any direction here? Is there a simple fix? Is a fix in the works? Thanks, jb
RE: [OT] Oracle Magazine Java Developer of the Year
That's great!!! Congratulations!! 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: Vincent Stoessel [mailto:vincent;xaymaca.com] Sent: Monday, October 28, 2002 5:00 PM To: Struts Users Mailing List Subject: Re: [OT] Oracle Magazine Java Developer of the Year Congrat, James! I love the console! Bradley G Smith wrote: The nov/dec issue of Oracle Magazine has several person of the year awards. The person picked as Java developer of the year is James Holmes for his work on Struts Console. Struts is also mentioned in several articles as a key framework component in the same issue. Brad -- To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org -- Vincent Stoessel Linux Systems Developer vincent xaymaca.com -- 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: error checking in Action
I do all my validation in the action too - I need a lot of info from the b-tier about such things as which fields are mandatory when, etc... and it proved inconvienient (still quite possible - just required some ugly contortions - especially given some of the evil things Im doing in the RequestProcessor which you would rather not know about ;- ) to do it in the form. I rather like to keep my forms stupid too (ie: just a simple data structure with getters and setters.) and put code that does the work of validating, directing traffic, and calling the business objects together in the same class. Not so OOPy, but I find it saves time and makes it easier to locate and work on things. In fact most of my crud actions are subclasses of a common abstract (dispatch) action , which has an abstract validation method it calls and then returns the user to the form complete with actionErrors as normal if the validation fails. (Im cheating a bit , in that if my save method fails due to validation errors, rather than doing a forward back to the input (which is in fact that same action (Im not using JSPs but rather a homebaked rendering technique based around DOM - which needs an action to set up the renderers for the view)) I simply make a direct call to my update method...) If you are validating in the action , you can get the relative path(*) to return to if validation fails from mapping.getInput() which returns a string - the contents of which are the value of the input attribute in your action mapping in struts config. You could probably build an ActionFrward out of this and return it from the action. Since you would be forwarding (ie: make redirect=false) all the stuff in your request context will be preserved and sent back to the input - including the ActionForm populated from the request. The code struts uses to call validation in your actionForm and return to the input if it fails may (in 1.1) be found in the processValidate() method of the RequestProcessor. (*) Struts 1.1b2 appears to allow the input to be the name of a forward instead of a path now, but I havent had time to examine this new functionality yet. -Original Message- From: David Graham [mailto:dgraham1980;hotmail.com] Sent: Tuesday, October 29, 2002 09:05 To: [EMAIL PROTECTED] Subject: Re: error checking in Action Why do you need to move error checking into an action? Why not just let the form bean do it's job and validate itself? Have you looked at using the validator? Validation belongs in the form bean; actions' main job is to direct traffic and execute business layer methods. David From: Mark Silva [EMAIL PROTECTED] Reply-To: Struts Users Mailing List [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Subject: error checking in Action Date: Mon, 28 Oct 2002 16:54:39 -0800 I need to do some extensive error checking, and need to move this into an action class. my question is when i identify an action, how i forward back to the previous page (the same way a form class would). is there a method to take care of this? or do i need to setup all the passed values in the request again and do an ActionForward to the appropriate page? thanks, mark -- To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org _ Unlimited Internet access -- and 2 months free! Try MSN. http://resourcecenter.msn.com/access/plans/2monthsfree.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
RE: [OT] Oracle Magazine Java Developer of the Year
Great work James! Good on ya mate! :-) -Original Message- From: Bradley G Smith [mailto:bgsmith01;fs.fed.us] Sent: Tuesday, October 29, 2002 04:35 To: [EMAIL PROTECTED] Subject: [OT] Oracle Magazine Java Developer of the Year The nov/dec issue of Oracle Magazine has several person of the year awards. The person picked as Java developer of the year is James Holmes for his work on Struts Console. Struts is also mentioned in several articles as a key framework component in the same issue. Brad -- 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: error checking in Action
David Graham wrote: Why do you need to move error checking into an action? Why not just let the form bean do it's job and validate itself? Have you looked at using the validator? Validation belongs in the form bean; actions' main job is to direct traffic and execute business layer methods. David Agreed, For Generic type of validation the ActionForm is an appropiate place to do validation. To restate what David said, the ActionForm is designed to be passive, and have values info it needs passed to it. It should definately not make method calls to other Business Logic. To add to that,Any complex validation would take place in the Business Logic, with the Action being the go between loading and unloading the ActionForm and calling validation methods in the Business Logic. -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: Problem with multiple html(jsp) pages sharing one form (actionform)
James, Are you using the plugin validator to validate your form fields? I am using it. (see my form entry in my validation.xml at the end). Now If I only include a subset of form in one page, the validator will throw exceptions in the backgroud. Are you aware of this? Any workaround other than modifying the validator's source? Thanks, Derek form name=RegistrationForm field property=firstName depends=futurecargorequiredarg0 key=firstName//field field property=lastName depends=futurecargorequiredarg0 key=lastName//field field property=companyName depends=futurecargorequiredarg0 key=company//field field property=companyStreet depends=futurecargorequiredarg0 key=street//field field property=companyCity depends=futurecargorequiredarg0 key=city//field field property=companyState depends=futurecargorequiredarg0 key=state//field field property=companyZip depends=futurecargorequired,mask arg0 key=zip/ varvar-namemask/var-namevar-value${zip}/var-value/var /field field property=companyCountry depends=futurecargorequiredarg0 key=country//field field property=companyPhone depends=futurecargorequired,mask arg0 key=phone/ varvar-namemask/var-namevar-value${phone}/var-value/var /field field property=companyEmail depends=futurecargorequired,emailarg0 key=email//field field property=companyUsername depends=futurecargorequired,minlength arg0 key=username/ arg1 name=minlength key=${var:minlength} resource=false/ varvar-nameminlength/var-namevar-value3/var-value/var /field field property=companyPassword depends=futurecargorequired,minlength,mask arg0 key=password/ arg1 name=minlength key=${var:minlength} resource=false/ varvar-namemask/var-namevar-value^[0-9a-zA-Z][0-9a-zA-Z][0-9a-zA-Z][ 0-9a-zA-Z]*$/var-value/var varvar-nameminlength/var-namevar-value5/var-value/var /field field property=companyPassword2 depends=futurecargorequired,twofields arg0 key=password2/ arg1 key=password/ varvar-namesecondProperty/var-namevar-valuecompanyPassword/var-valu e/var /field /form - Original Message - From: James Mitchell [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Monday, October 28, 2002 1:36 PM Subject: RE: Problem with multiple html(jsp) pages sharing one form (actionform) Hi Derek, Sorry for not getting back sooner. if you are using the same action and jsp for your wizards, how are they qualified to be wizards? Whenever I need a wizard-like flow in my application, I use a single action and a single jsp to go from Step 1 to Step n. I can do this by passing around a token called step, which is a field on my form used only for the purpose of this wizard. Here's a bit of psuedo code... wizard.jsp -- taglib declarations html:form blah blah !-- Stuff you want on every page -- !-- Step 1 -- logic:equal name=wizardForm property=step value=1 Field 1:html:text property=field1/br Field 2:html:text property=field2/br Field 3:html:text property=field3/br Field 4:html:text property=field4/br Field 5:html:text property=field5/br /logic:equal !-- Step 2 -- logic:equal name=wizardForm property=step value=2 Field 6:html:text property=field6/br Field 7:html:text property=field7/br Field 8:html:text property=field8/br Field 9:html:text property=field9/br Field 10:html:text property=field10/br /logic:equal !-- Step 3 -- logic:equal name=wizardForm property=step value=3 Field 11:html:text property=field11/br Field 12:html:text property=field12/br Field 13:html:text property=field13/br Field 14:html:text property=field14/br Field 15:html:text property=field15/br /logic:equal /html:form So I handle the form submit and validation within my Action class (This give me the most control). By doing it this way, if I need to move field 6 thru 8 to Step 1, I can drag it up there within my text editor. (as opposed to cutting it from one jsp and pasting into another) Not to mention repeating the page headers footer and any other page data (style, javascript, etc) 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: Derek Lin [mailto:dereklin;hotmail.com] Sent: Monday, October 28, 2002 2:01 AM To: Struts Users Mailing List Subject: Re: Problem with multiple html(jsp) pages sharing one form
ExceptionHandler DispatchAction (1.1b1 vs b2)
Been trying to get my first struts ExceptionHandler to work today and just came across another good reason to make the jump from 1.1b1 to 1.1b2. Seems that exceptions thrown in a DispatchAction are handled correctly in 1.1b2 (ie: if possible thrown up where you can process them with an exception handler) while 1.1b1 always writes an error response out immediately using response.sendError() , thus preventing the exception bubbling up to where the RequestProcessor can pass it to your ExceptionHandler like it does for an Action. Many cheers to the struts devs for fixing this! :-) 1.1b1 Code: --- snip } catch (InvocationTargetException e) { String message = messages.getMessage(dispatch.error, mapping.getPath(), name); log.error(message, e); response.sendError(HttpServletResponse.SC_INTERNAL_SERVER_ERROR, message); return (null); } /snip 1.1b2 Code: --- snip } catch (InvocationTargetException e) { // Rethrow the target exception if possible so that the // exception handling machinery can deal with it Throwable t = e.getTargetException(); if (t instanceof Exception) { throw ((Exception) t); } else { String message = messages.getMessage(dispatch.error, mapping.getPath(), name); log.error(message, e); response.sendError (HttpServletResponse.SC_INTERNAL_SERVER_ERROR, message); return (null); } /snip btw whinge subject=coding.style I really can't stand this sun style java indenting thats used in the struts source. Its so random and unreadable and ugly. Trying to scan more than a few lines of it really gives me a headache. Id rather debug BF code (well ok I wouldnt but at least BF doesnt pretend to be readable...) When Im dictator for life everyone will have to use C style indenting and put their curlies back where they belong...sigh/ /whinge /btw -- To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org
Re: error checking in Action
Nice restatement Rob. That's exactly how I see the validation working. I know I'm in trouble when my action class gets too big :-). David From: Rob Leland [EMAIL PROTECTED] Reply-To: Struts Users Mailing List [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Subject: Re: error checking in Action Date: Tue, 29 Oct 2002 00:14:55 -0500 David Graham wrote: Why do you need to move error checking into an action? Why not just let the form bean do it's job and validate itself? Have you looked at using the validator? Validation belongs in the form bean; actions' main job is to direct traffic and execute business layer methods. David Agreed, For Generic type of validation the ActionForm is an appropiate place to do validation. To restate what David said, the ActionForm is designed to be passive, and have values info it needs passed to it. It should definately not make method calls to other Business Logic. To add to that,Any complex validation would take place in the Business Logic, with the Action being the go between loading and unloading the ActionForm and calling validation methods in the Business Logic. -Rob -- To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org _ Get faster connections -- switch to MSN Internet Access! http://resourcecenter.msn.com/access/plans/default.asp -- 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 multiple html(jsp) pages sharing one form (actionform)
No, not in the scenario I described earlier. 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: Derek Lin [mailto:dereklin;hotmail.com] Sent: Tuesday, October 29, 2002 1:22 AM To: Struts Users Mailing List Subject: Re: Problem with multiple html(jsp) pages sharing one form (actionform) James, Are you using the plugin validator to validate your form fields? I am using it. (see my form entry in my validation.xml at the end). Now If I only include a subset of form in one page, the validator will throw exceptions in the backgroud. Are you aware of this? Any workaround other than modifying the validator's source? Thanks, Derek form name=RegistrationForm field property=firstName depends=futurecargorequiredarg0 key=firstName//field field property=lastName depends=futurecargorequiredarg0 key=lastName//field field property=companyName depends=futurecargorequiredarg0 key=company//field field property=companyStreet depends=futurecargorequiredarg0 key=street//field field property=companyCity depends=futurecargorequiredarg0 key=city//field field property=companyState depends=futurecargorequiredarg0 key=state//field field property=companyZip depends=futurecargorequired,mask arg0 key=zip/ varvar-namemask/var-namevar-value${zip}/var-value/var /field field property=companyCountry depends=futurecargorequiredarg0 key=country//field field property=companyPhone depends=futurecargorequired,mask arg0 key=phone/ varvar-namemask/var-namevar-value${phone}/var-value/var /field field property=companyEmail depends=futurecargorequired,emailarg0 key=email//field field property=companyUsername depends=futurecargorequired,minlength arg0 key=username/ arg1 name=minlength key=${var:minlength} resource=false/ varvar-nameminlength/var-namevar-value3/var-value/var /field field property=companyPassword depends=futurecargorequired,minlength,mask arg0 key=password/ arg1 name=minlength key=${var:minlength} resource=false/ varvar-namemask/var-namevar-value^[0-9a-zA-Z][0-9a-zA-Z][0 -9a-zA-Z][ 0-9a-zA-Z]*$/var-value/var varvar-nameminlength/var-namevar-value5/var-value/var /field field property=companyPassword2 depends=futurecargorequired,twofields arg0 key=password2/ arg1 key=password/ varvar-namesecondProperty/var-namevar-valuecompanyPassword /var-valu e/var /field /form - Original Message - From: James Mitchell [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Monday, October 28, 2002 1:36 PM Subject: RE: Problem with multiple html(jsp) pages sharing one form (actionform) Hi Derek, Sorry for not getting back sooner. if you are using the same action and jsp for your wizards, how are they qualified to be wizards? Whenever I need a wizard-like flow in my application, I use a single action and a single jsp to go from Step 1 to Step n. I can do this by passing around a token called step, which is a field on my form used only for the purpose of this wizard. Here's a bit of psuedo code... wizard.jsp -- taglib declarations html:form blah blah !-- Stuff you want on every page -- !-- Step 1 -- logic:equal name=wizardForm property=step value=1 Field 1:html:text property=field1/br Field 2:html:text property=field2/br Field 3:html:text property=field3/br Field 4:html:text property=field4/br Field 5:html:text property=field5/br /logic:equal !-- Step 2 -- logic:equal name=wizardForm property=step value=2 Field 6:html:text property=field6/br Field 7:html:text property=field7/br Field 8:html:text property=field8/br Field 9:html:text property=field9/br Field 10:html:text property=field10/br /logic:equal !-- Step 3 -- logic:equal name=wizardForm property=step value=3 Field 11:html:text property=field11/br Field 12:html:text property=field12/br Field 13:html:text property=field13/br Field 14:html:text property=field14/br Field 15:html:text property=field15/br /logic:equal /html:form So I handle the form submit and validation within my Action class (This give me the most control). By doing it this way, if I need to move field 6 thru 8 to Step 1, I can drag it up there
what for are nested tags ?
? thx, marcus -- 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 make the LazyList Serializable?
I found the nested tag with LazyList is very useful for implementing nested structure form submission. I would like to know is there any simple method to make the LazyList Serializable so that I can store the form object into session? Thanks William
RE: what for are nested tags ?
http://www.google.com/search?hl=enie=UTF-8oe=UTF-8q=what+for+are+nested+t agsbtnG=Google+Search 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: Marcus Biel [mailto:Marcus.Biel;bmw.de] Sent: Tuesday, October 29, 2002 2:36 AM To: [EMAIL PROTECTED] Subject: what for are nested tags ? ? thx, marcus -- 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