RE: collections in forms((correction in Form code to make it work))
Hi, There was a problem in the sample FOrm Bean code I have given. The getEmployee (int Index){ }method should be modified as follows /* instead of if(index = beanList.size()){ beanList.add(new Employee()); } now I have made it while(index = beanList.size()){ beanList.add(new Employee()); } /*** public class EmployeeListForm extends ActionForm { public Employee getEmployee(int index){ while(index = beanList.size()){ beanList.add(new Employee()); } return (Employee)beanList.get(index); } } -Original Message- From: drew.zimber [mailto:[EMAIL PROTECTED]] Sent: Friday, December 06, 2002 5:36 PM To: drew.zimber; Sakhare, Shirishchandra; drew.zimber Subject: RE: collections in forms hi, Thank you for the explanation and sample code. Everything seems to make sense but i have implmented your example and cannot get it working. The biggest reason is because the jsp does not like your custom tag to display the values. could you take a look at it again and see if it is correct: JSP %@ page language=java% %@ taglib uri=/WEB-INF/struts-html.tld prefix=html % html:html html:form action=/ logic:iterate id=bean name=exampleListForm property=beanList indexId=i/ html:text name= property=%=\employee[\ + i \].name\% html:text name= property=%=\employee[\ + i \].salary\% /logic:iterate /html:form /html:html thank you! dz -Original Message- From: Drew Zimber [mailto:[EMAIL PROTECTED]] Sent: Thursday, December 05, 2002 4:55 PM To: 'Struts Users Mailing List' Subject: RE: collections in forms thanks for the reply...i was busy doing something else but i will get back to you tomorrow after some testing dz -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Thursday, December 05, 2002 9:59 AM To: [EMAIL PROTECTED]; [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Subject: RE: collections in forms Hi, If u are displaying the screen as text fields(using html:text tag),what ever u show on screen will be retained as all the data gets resubmitted back and struts repopulates teh form again with the data. But if u are showing a read only data on screen using bean:write tag,then the data will nto be retained as bean write tag does not include parameters in request.So in this case if u want to retain the data, u should also use html:hidden for each bean write u want to retain so that when the form is submitted, the data is resent back. I am giving some sample code...GO through it.Hope it helps. //Form Class import java.util.ArrayList; import java.util.List; import org.apache.struts.action.ActionForm; public class ExampleListForm extends ActionForm { //A list of Emp beans private List beanList = new ArrayList(); public List getBeanList(){ return beanList; } public void setBeanList(List list){ beanList = list; } //very imp. //give indexed access to the beans public Employee getEmployee(int index){ //very imp //when a jsp is submited , then while auto populating the form,this will ensure that // teh fporm is populated properly. if(index = beanList.size()){ beanList.add(new Employee()); } return (Employee)beanList.get(index); } public void setEmployee(int index,Employee emp){ beanList.set(index,emp); } } *** Bean class public class Employee { private String name; private String salary; /** * Returns the name. * @return String */ public String getName() { return name; } /** * Returns the salary. * @return String */ public String getSalary() { return salary; } /** * Sets the name. * @param name The name to set */ public void setName(String name) { this.name = name; } /** * Sets the salary. * @param salary The salary to set */ public void setSalary(String salary) { this.salary = salary; } } JSP %@ page language=java% %@ taglib uri=/WEB-INF/struts-html.tld prefix=html % html:html html:form action=/ logic:iterate id=bean name=exampleListForm property=beanList indexId=i/ html:text name= property=%=\employee[\ + i \].name\% html:text name= property=%=\employee[\ + i
RE: Re: Best Practices for Logging?
I had not checked this.Had taken what log4j documentation says about performance verbatim... BTW,I didnt get your comment about ** In particular, under a Tag library for Tomcat 4.0.X [where tags are not reused] * Are the tags reused on other servers? And what do u mean by reused?Do u mean Tag instance or something? My understanding of Tags is that they are like handlers...So the compiled servlet for jsp calls this handlers various methods on tag when it comes across the tag. regards, Shirish -Original Message- From: rimovm [mailto:[EMAIL PROTECTED]] Sent: Monday, December 09, 2002 9:01 PM To: struts-user Cc: rimovm Subject: RE: Re: Best Practices for Logging? At 10:49 AM 12/9/2002 +0100, you wrote: Just some addition to this logging discussion. If u are using log4j , then in any case,there wil be 1 instance per class and not per object.BEcause logger instances are named entities and they are cached.So if u ask for the same logger again(same class name I mean), u will retrieve same instance.New instance will not be created.I dont know how other logger implementations used in commons logging work.So u dont add any performance advantage by making them static. Hi Shirish and all, Actually, I have to disagree here. Yes it is true that the Log4j Log manager only holds one instance of the logger class, but I've done some profiling and found that Logger.getLogger(String) can take significantly more CPU cycles than just referring to your static instance. In particular, under a Tag library for Tomcat 4.0.X [where tags are not reused], this was resulting in significant overhead. [IIRC about 10-15% of the CPU time.] Of course, using static variables can cause class reloading problems.. so it is kind of a six of one, half-dozen of the other situation. What you end up doing in the long run is your choice... but people do need to know that constructing logs DOES take CPU time. -Mike -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: JSTL x STRUTS bean display
I have a arraylist containing a collection of beans, something like : List list = new ArrayList (); list.add(bean1_1); list.add(bean1_2); request.setAttribute (BEAN1_LIST, list); c:forEach var=item items=${requestScope.BEAN1_LIST} c:out value=${item.Field1}/ c:out value=${item.Field2}/ /c:forEach -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Design Question regarding navigation menu
I could not follow your question. A good practices that I use is to have centralized navigation in XML, using Struts menu from sf.net. So the question is: in StrutsMenu, how do you highlight the currently selected menu item? Another question about StrutsMenu: is it possible to get a string that represents the current path to the currently selected menu item: something like 'Main Part1 Subpart1 Item3'... This e-mail is intended only for the above addressee. It may contain privileged information. If you are not the addressee you must not copy, distribute, disclose or use any of the information in it. If you have received it in error please delete it and immediately notify the sender. Security Notice: all e-mail, sent to or from this address, may be accessed by someone other than the recipient, for system management and security reasons. This access is controlled under Regulation of Investigatory Powers Act 2000, Lawful Business Practises. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Query on modular applications
Thanks David, I downloaded the latest nightly build (jakarta-struts-20021209.zip). It also did not work. When I try to access one of the jsp files, I get the following error: javax.servlet.jsp.JspException: Missing message for key It would seem as if the resource.moduleA file is not being loaded correctly. Any ideas would a great help. Thanks, David Graham wrote: You should first try using the latest nightly build because there have been several important bug fixes related to modules since beta 2. David From: Michael Cunningham [EMAIL PROTECTED] Reply-To: Struts Users Mailing List [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: Query on modular applications Date: Mon, 09 Dec 2002 17:42:08 + Hello, We are looking for some help building a modular application. We are using Struts 1.1B2. We have had issues with not finding our message resources. Here is snippets of our struts-config and web.xml files. web.xml - init-param param-nameconfig/param-name param-value/WEB-INF/struts-config.xml/param-value /init-param init-param param-nameconfig/moduleA/param-name param-valueWEB-INF/struts-config-moduleA.xml/param-value /init-param - Our default struts-config.xml is: Default struts-config.xml -- ?xml version=1.0 encoding=ISO-8859-1 ? !DOCTYPE struts-config PUBLIC -//Apache Software Foundation//DTD Struts Configuration 1.1//EN http://jakarta.apache.org/struts/dtds/struts-config_1_1.dtd; struts-config /struts-config - Our struts-config-moduleA.xml file is: struts-config-moduleA.xml -- ?xml version=1.0 encoding=ISO-8859-1 ? !DOCTYPE struts-config PUBLIC -//Apache Software Foundation//DTD Struts Configuration 1.1//EN http://jakarta.apache.org/struts/dtds/struts-config_1_1.dtd; struts-config !-- == Form Bean Definitions === -- form-beans form-bean name=loginForm type=com.ui.moduleA.LoginForm/ /form-beans !-- == Global Forward Definitions == -- global-forwards forward name=moduleA/login path=login.jsp/ forward name=critical path=critical.jsp/ /global-forwards !-- == Action Mapping Definitions == -- action-mappings action path=login type=com.ui.moduleA.LoginAction name=loginForm scope=request input=/moduleA/login.jsp forward name=success path=/moduleA/loggedin.jsp/ /action /action-mappings controller processorClass=com.ui.moduleA.ModuleARequestProcessor/ message-resources parameter=resource.moduleA / /struts-config - Anyone who has built a modular application, can you please give us any pointers as to how to build a modular application. We are continuously getting problems not being able to find any of the action classes, resource files in any of the struts-config module files. Thanks, -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] _ STOP MORE SPAM with the new MSN 8 and get 2 months FREE* http://join.msn.com/?page=features/junkmail -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Loosing form data when chaining actions
Hi, I defined 2 actions in session scope referring the same form. The first action sets some properties in the form and then forwards the request to the second action. The second action sets some more properties and then forwards to a JSP page which contains the html form. The problem is only the data set by the last action remains... This makes me think the form-bean is not shared between actions. I understand this can be desired behaviour. Any insight would be appreciated. thanks! This is exactly why action chaining is not recommended. When you forward from one action to another, the effect is as if a new request has been made. As a result, Struts will call the form bean's reset() method, and then the form bean will be repopulated from the request parameters. Any changes made to the form bean will be lost. Please note that this is not a Struts-related issue. This behaviour is well defined by the Java Servlets spec. This is still a trouble to me to read that, and then try to understand how forms-on-multiple-pages are handled. Anyway, what's the work to add a reset=on/off attribute to the action-mapping to control the reset call ? Would it be a major change? This e-mail is intended only for the above addressee. It may contain privileged information. If you are not the addressee you must not copy, distribute, disclose or use any of the information in it. If you have received it in error please delete it and immediately notify the sender. Security Notice: all e-mail, sent to or from this address, may be accessed by someone other than the recipient, for system management and security reasons. This access is controlled under Regulation of Investigatory Powers Act 2000, Lawful Business Practises. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
bean:write ' , , ' characters
I have a bean property that returns an html tag, but bean:write substitute the , , characters with lt; , gt; etc. If this is the normal behaviour of the tag, how can I disable it? -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: bean:write ' , , ' characters
Use filter=false to turn off this behaviour -Original Message- From: Duma Rolando [mailto:[EMAIL PROTECTED]] Sent: 10 December 2002 11:37 To: Struts Users Mailing List Subject: bean:write ' , , ' characters I have a bean property that returns an html tag, but bean:write substitute the , , characters with lt; , gt; etc. If this is the normal behaviour of the tag, how can I disable it? -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] This e-mail and any attachment is for authorised use by the intended recipient(s) only. It may contain proprietary material, confidential information and/or be subject to legal privilege. It should not be copied, disclosed to, retained or used by, any other party. If you are not an intended recipient then please promptly delete this e-mail and any attachment and all copies and inform the sender. Thank you. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
dynamically disable a input field.
Greetings i want to disable some input elements but only if a bean property is not set: e.g. logic:equal name=OrganizationSession property=isProvider value=0 here i want to set a variable to be used than in each input element. e.g. something like disabled=disabled /logic:equal in the inputs than i would like to use the above setted variable. somthing like : html:text name=CatalogProfileDataForm property=catalogID disabled=value of the above variable named disabled/ is this possible? can somebody help? any other suggestions? thx in advance mit freundlichen Grüßen Georg XL. Mouratidis Web Application Developer Heiler|Software AG Mittlerer Pfad 9 D-70499 Stuttgart Tel: 0711-139 84-265 Fax: 0711-866 63 01 Email: [EMAIL PROTECTED] Connecting Buyer and Supplier http://www.heiler.com -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Locale and html:text
Hi, Does anyone have an idea about formatting an html:text input field with the user's Locale? I need to initialize the field value with a Date from a Bean according to the Request Locale. Thanks, Renato Aganippe
RE: html:file Problems
Hi, i dont' use the validator plugin. i dont know how to do. i have set the validate attribute in struts-config.xml to true. in the validate method inside my form i check the value and the length of the input element. if there is an error i create an ActionError. public ActionErrors validate(ActionMapping mapping, HttpServletRequest request) { ActionErrors errors = new ActionErrors(); if ((uploadFile == null) || (uploadFile.getFileName() == null) || uploadFile.getFileName().length() == 0) errors.add(uploadFile, new ActionError(catalogimport.error.uploadfile.required)); //System.out.println(name= + uploadFile.getFileName()); return errors; } -Original Message- From: Richmond Te [mailto:[EMAIL PROTECTED]] Sent: Dienstag, 10. Dezember 2002 04:45 To: Struts Users Mailing List Subject: RE: html:file Problems what happens when you click on submit and there is no file? i am having trouble with validating this via the struts validator plugin.. --- Mouratidis, Georg [EMAIL PROTECTED] wrote: No i have String. i changed it into FormFile and it works. i also inserted import org.apache.struts.upload.FormFile; thank you -Original Message- From: Gemes Tibor [mailto:[EMAIL PROTECTED]] Sent: Montag, 9. Dezember 2002 13:10 To: Struts Users Mailing List Subject: Re: html:file Problems 2002. december 9. 12:51 dátummal Mouratidis, Georg ezt írtad: Greetings, i have a html:file tag. When i cklick to submit the form the following error appears: What do you have in the ActionForm? Is the corresponding property's type FormFile? Hth, Tib -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] __ Do you Yahoo!? Yahoo! Mail Plus - Powerful. Affordable. Sign up now. http://mailplus.yahoo.com -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: dynamically disable a input field.
Hi, I had similar functionality.But I will advice u not to use html:text disable=true/ because it does not work with Netscape. So instead i used logic:equal tag and bean write. logic:equal name=OrganizationSession property=isProvider value=true html:text name= property=/ /logic:equal logic:notEqual name=OrganizationSession property=isProvider value=true bean:write name= property=/ //Also use html:hidden if u stil want to pass the parameter in request html:hidden name= property=/ /logic:notEqual hope this helps.. regards, Shirish -Original Message- From: GMouratidis [mailto:[EMAIL PROTECTED]] Sent: Tuesday, December 10, 2002 12:40 PM To: struts-user Cc: GMouratidis Subject: dynamically disable a input field. Greetings i want to disable some input elements but only if a bean property is not set: e.g. logic:equal name=OrganizationSession property=isProvider value=0 here i want to set a variable to be used than in each input element. e.g. something like disabled=disabled /logic:equal in the inputs than i would like to use the above setted variable. somthing like : html:text name=CatalogProfileDataForm property=catalogID disabled=value of the above variable named disabled/ is this possible? can somebody help? any other suggestions? thx in advance mit freundlichen Grüßen Georg XL. Mouratidis Web Application Developer Heiler|Software AG Mittlerer Pfad 9 D-70499 Stuttgart Tel: 0711-139 84-265 Fax: 0711-866 63 01 Email: [EMAIL PROTECTED] Connecting Buyer and Supplier http://www.heiler.com -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: dynamically disable a input field.
A couple of choices: Actually put the html:text inside the logic and use an else clause. Use struts-EL for the disabled attribute calculation ${OrganizationSession.isProvider==0?disabled:enabled} Edgar -Original Message- From: Mouratidis, Georg [mailto:[EMAIL PROTECTED]] Sent: Tuesday, December 10, 2002 6:40 AM To: '[EMAIL PROTECTED]' Subject: dynamically disable a input field. Greetings i want to disable some input elements but only if a bean property is not set: e.g. logic:equal name=OrganizationSession property=isProvider value=0 here i want to set a variable to be used than in each input element. e.g. something like disabled=disabled /logic:equal in the inputs than i would like to use the above setted variable. somthing like : html:text name=CatalogProfileDataForm property=catalogID disabled=value of the above variable named disabled/ is this possible? can somebody help? any other suggestions? thx in advance mit freundlichen Grüßen Georg XL. Mouratidis Web Application Developer Heiler|Software AG Mittlerer Pfad 9 D-70499 Stuttgart Tel: 0711-139 84-265 Fax: 0711-866 63 01 Email: [EMAIL PROTECTED] Connecting Buyer and Supplier http://www.heiler.com -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Initializing application
Hi, I want to initialize my application with some application variables. What is the best way to do this? My approach so far has been to call the init() method in an unmapped servlet. So everytime the server statrs up they are loaded into memory. The only thing is that I am not sure how to set an application or session variable in the init method of a servlet. How can I do this? Is there a better way to do this? Thanks Jordan -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: dynamically disable a input field.
the disadvange is that i have to do it for 25 inputfields. 25x logic:equal.../logic:equal 25x logic:notEqual.../logic:notEqual is this the only way you know? thx georg -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Dienstag, 10. Dezember 2002 12:51 To: [EMAIL PROTECTED] Subject: RE: dynamically disable a input field. Hi, I had similar functionality.But I will advice u not to use html:text disable=true/ because it does not work with Netscape. So instead i used logic:equal tag and bean write. logic:equal name=OrganizationSession property=isProvider value=true html:text name= property=/ /logic:equal logic:notEqual name=OrganizationSession property=isProvider value=true bean:write name= property=/ //Also use html:hidden if u stil want to pass the parameter in request html:hidden name= property=/ /logic:notEqual hope this helps.. regards, Shirish -Original Message- From: GMouratidis [mailto:[EMAIL PROTECTED]] Sent: Tuesday, December 10, 2002 12:40 PM To: struts-user Cc: GMouratidis Subject: dynamically disable a input field. Greetings i want to disable some input elements but only if a bean property is not set: e.g. logic:equal name=OrganizationSession property=isProvider value=0 here i want to set a variable to be used than in each input element. e.g. something like disabled=disabled /logic:equal in the inputs than i would like to use the above setted variable. somthing like : html:text name=CatalogProfileDataForm property=catalogID disabled=value of the above variable named disabled/ is this possible? can somebody help? any other suggestions? thx in advance mit freundlichen Grüßen Georg XL. Mouratidis Web Application Developer Heiler|Software AG Mittlerer Pfad 9 D-70499 Stuttgart Tel: 0711-139 84-265 Fax: 0711-866 63 01 Email: [EMAIL PROTECTED] Connecting Buyer and Supplier http://www.heiler.com -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: dynamically disable a input field.
Hi edgar, i had never used struts-EL. does this work with struts 1.02 or do i have to user 1.1? Where can i found any sources/infos thx -Original Message- From: Edgar P. Dollin [mailto:[EMAIL PROTECTED]] Sent: Dienstag, 10. Dezember 2002 13:03 To: 'Struts Users Mailing List' Subject: RE: dynamically disable a input field. A couple of choices: Actually put the html:text inside the logic and use an else clause. Use struts-EL for the disabled attribute calculation ${OrganizationSession.isProvider==0?disabled:enabled} Edgar -Original Message- From: Mouratidis, Georg [mailto:[EMAIL PROTECTED]] Sent: Tuesday, December 10, 2002 6:40 AM To: '[EMAIL PROTECTED]' Subject: dynamically disable a input field. Greetings i want to disable some input elements but only if a bean property is not set: e.g. logic:equal name=OrganizationSession property=isProvider value=0 here i want to set a variable to be used than in each input element. e.g. something like disabled=disabled /logic:equal in the inputs than i would like to use the above setted variable. somthing like : html:text name=CatalogProfileDataForm property=catalogID disabled=value of the above variable named disabled/ is this possible? can somebody help? any other suggestions? thx in advance mit freundlichen Grüßen Georg XL. Mouratidis Web Application Developer Heiler|Software AG Mittlerer Pfad 9 D-70499 Stuttgart Tel: 0711-139 84-265 Fax: 0711-866 63 01 Email: [EMAIL PROTECTED] Connecting Buyer and Supplier http://www.heiler.com -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: dynamically disable a input field.
If u dont want to wory about netscape then i think u can go the other way.And i Am talking about netscape 4.77. So in the other case u can use logic equla in just one place as u said. %!String isDisbled=false% logic:equal name=OrganizationSession property=isProvider value=0 %isDisbled= false;% /logic:equal and then in ur html:text just use this html:text name= property= disbled=%=isDisbled% then u dont need to do this 25 times as u said. -Original Message- From: GMouratidis [mailto:[EMAIL PROTECTED]] Sent: Tuesday, December 10, 2002 12:56 PM To: struts-user Cc: GMouratidis Subject: RE: dynamically disable a input field. the disadvange is that i have to do it for 25 inputfields. 25x logic:equal.../logic:equal 25x logic:notEqual.../logic:notEqual is this the only way you know? thx georg -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Dienstag, 10. Dezember 2002 12:51 To: [EMAIL PROTECTED] Subject: RE: dynamically disable a input field. Hi, I had similar functionality.But I will advice u not to use html:text disable=true/ because it does not work with Netscape. So instead i used logic:equal tag and bean write. logic:equal name=OrganizationSession property=isProvider value=true html:text name= property=/ /logic:equal logic:notEqual name=OrganizationSession property=isProvider value=true bean:write name= property=/ //Also use html:hidden if u stil want to pass the parameter in request html:hidden name= property=/ /logic:notEqual hope this helps.. regards, Shirish -Original Message- From: GMouratidis [mailto:[EMAIL PROTECTED]] Sent: Tuesday, December 10, 2002 12:40 PM To: struts-user Cc: GMouratidis Subject: dynamically disable a input field. Greetings i want to disable some input elements but only if a bean property is not set: e.g. logic:equal name=OrganizationSession property=isProvider value=0 here i want to set a variable to be used than in each input element. e.g. something like disabled=disabled /logic:equal in the inputs than i would like to use the above setted variable. somthing like : html:text name=CatalogProfileDataForm property=catalogID disabled=value of the above variable named disabled/ is this possible? can somebody help? any other suggestions? thx in advance mit freundlichen Grüßen Georg XL. Mouratidis Web Application Developer Heiler|Software AG Mittlerer Pfad 9 D-70499 Stuttgart Tel: 0711-139 84-265 Fax: 0711-866 63 01 Email: [EMAIL PROTECTED] Connecting Buyer and Supplier http://www.heiler.com -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: dynamically disable a input field.
hi shirishchandra ( i hope this is your forename ) thx alot. i think i will go this way. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Dienstag, 10. Dezember 2002 13:05 To: [EMAIL PROTECTED] Subject: RE: dynamically disable a input field. If u dont want to wory about netscape then i think u can go the other way.And i Am talking about netscape 4.77. So in the other case u can use logic equla in just one place as u said. %!String isDisbled=false% logic:equal name=OrganizationSession property=isProvider value=0 %isDisbled= false;% /logic:equal and then in ur html:text just use this html:text name= property= disbled=%=isDisbled% then u dont need to do this 25 times as u said. -Original Message- From: GMouratidis [mailto:[EMAIL PROTECTED]] Sent: Tuesday, December 10, 2002 12:56 PM To: struts-user Cc: GMouratidis Subject: RE: dynamically disable a input field. the disadvange is that i have to do it for 25 inputfields. 25x logic:equal.../logic:equal 25x logic:notEqual.../logic:notEqual is this the only way you know? thx georg -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Dienstag, 10. Dezember 2002 12:51 To: [EMAIL PROTECTED] Subject: RE: dynamically disable a input field. Hi, I had similar functionality.But I will advice u not to use html:text disable=true/ because it does not work with Netscape. So instead i used logic:equal tag and bean write. logic:equal name=OrganizationSession property=isProvider value=true html:text name= property=/ /logic:equal logic:notEqual name=OrganizationSession property=isProvider value=true bean:write name= property=/ //Also use html:hidden if u stil want to pass the parameter in request html:hidden name= property=/ /logic:notEqual hope this helps.. regards, Shirish -Original Message- From: GMouratidis [mailto:[EMAIL PROTECTED]] Sent: Tuesday, December 10, 2002 12:40 PM To: struts-user Cc: GMouratidis Subject: dynamically disable a input field. Greetings i want to disable some input elements but only if a bean property is not set: e.g. logic:equal name=OrganizationSession property=isProvider value=0 here i want to set a variable to be used than in each input element. e.g. something like disabled=disabled /logic:equal in the inputs than i would like to use the above setted variable. somthing like : html:text name=CatalogProfileDataForm property=catalogID disabled=value of the above variable named disabled/ is this possible? can somebody help? any other suggestions? thx in advance mit freundlichen Grüßen Georg XL. Mouratidis Web Application Developer Heiler|Software AG Mittlerer Pfad 9 D-70499 Stuttgart Tel: 0711-139 84-265 Fax: 0711-866 63 01 Email: [EMAIL PROTECTED] Connecting Buyer and Supplier http://www.heiler.com -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Modules and Tiles: Problem
Hi, Cedric - Original Message - From: Cedric Dumoulin [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Monday, December 09, 2002 10:19 PM Subject: Re: Modules and Tiles: Problem Hi, Is there any errors regarding Tiles in the Tomcat console (you may need to enable logging for Tiles) ? Cedric I didn't see any errors in the Tomcat console. I enabled logging for Tiles. I just have downloaded new version (jakarta-struts-20021209) and I don't have this problem. Previous version was jakarta-struts-20021114. Andrew Kuzmin wrote: I have two modules: A) struts-config.xml: plug-in className=org.apache.struts.tiles.TilesPlugin set-property property=definitions-config value=/WEB-INF/conf/tiles-defs.xml, /WEB-INF/conf/tiles-defs-personalize.xml/ set-property property=moduleAware value=true / /plug-in B) struts-config-personalize.xml: action-mappings action path=/Courses type=XXX.actions.CoursesActions forward name=success path=personalize.courses.default / /action /action-mappings plug-in className=org.apache.struts.tiles.TilesPlugin set-property property=definitions-config value=/WEB-INF/conf/tiles-defs.xml, /WEB-INF/conf/tiles-defs-personalize.xml / set-property property=moduleAware value=true / /plug-in When i attempt to invoke http://XXX/personalize/Courses.do i have Error 404 and on Tomcat console i see : DEBUG [Thread-14] (RequestUtils.java:1446) - Get module name for path /personali ze/Courses.do DEBUG [Thread-14] (RequestUtils.java:1468) - Module name found: /personalize INFO [Thread-14] (RequestProcessor.java:225) - Processing a 'GET' for path '/Co urses' DEBUG [Thread-14] (RequestProcessor.java:305) - Looking for Action instance for class XXX.actions.CoursesActions DEBUG [Thread-14] (RequestProcessor.java:314) - Returning existing Action inst ance DEBUG [Thread-14] (RequestProcessor.java:428) - processForwardConfig(ForwardConf ig[name=success,path=personalize.courses.default,redirect=false,contextRela t ive= false]) But i am expecting TilesRequestProcessor. -- Andrew Kuzmin -- Andrew Kuzmin -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: dynamically disable a input field.
hi, i did it your way but now i have problems with the focus attribut in the html:form tag. if the element is disable i cant set the focus. of course not. i try so many things to set the attribute dynamically but i didn't solve it. can you help again please? thx in advance -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Dienstag, 10. Dezember 2002 13:05 To: [EMAIL PROTECTED] Subject: RE: dynamically disable a input field. If u dont want to wory about netscape then i think u can go the other way.And i Am talking about netscape 4.77. So in the other case u can use logic equla in just one place as u said. %!String isDisbled=false% logic:equal name=OrganizationSession property=isProvider value=0 %isDisbled= false;% /logic:equal and then in ur html:text just use this html:text name= property= disbled=%=isDisbled% then u dont need to do this 25 times as u said. -Original Message- From: GMouratidis [mailto:[EMAIL PROTECTED]] Sent: Tuesday, December 10, 2002 12:56 PM To: struts-user Cc: GMouratidis Subject: RE: dynamically disable a input field. the disadvange is that i have to do it for 25 inputfields. 25x logic:equal.../logic:equal 25x logic:notEqual.../logic:notEqual is this the only way you know? thx georg -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Dienstag, 10. Dezember 2002 12:51 To: [EMAIL PROTECTED] Subject: RE: dynamically disable a input field. Hi, I had similar functionality.But I will advice u not to use html:text disable=true/ because it does not work with Netscape. So instead i used logic:equal tag and bean write. logic:equal name=OrganizationSession property=isProvider value=true html:text name= property=/ /logic:equal logic:notEqual name=OrganizationSession property=isProvider value=true bean:write name= property=/ //Also use html:hidden if u stil want to pass the parameter in request html:hidden name= property=/ /logic:notEqual hope this helps.. regards, Shirish -Original Message- From: GMouratidis [mailto:[EMAIL PROTECTED]] Sent: Tuesday, December 10, 2002 12:40 PM To: struts-user Cc: GMouratidis Subject: dynamically disable a input field. Greetings i want to disable some input elements but only if a bean property is not set: e.g. logic:equal name=OrganizationSession property=isProvider value=0 here i want to set a variable to be used than in each input element. e.g. something like disabled=disabled /logic:equal in the inputs than i would like to use the above setted variable. somthing like : html:text name=CatalogProfileDataForm property=catalogID disabled=value of the above variable named disabled/ is this possible? can somebody help? any other suggestions? thx in advance mit freundlichen Grüßen Georg XL. Mouratidis Web Application Developer Heiler|Software AG Mittlerer Pfad 9 D-70499 Stuttgart Tel: 0711-139 84-265 Fax: 0711-866 63 01 Email: [EMAIL PROTECTED] Connecting Buyer and Supplier http://www.heiler.com -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: dynamically disable a input field.
hi, now i can answer my own question. i did it using javascript in onload(); thx to all for helping -Original Message- From: Mouratidis, Georg Sent: Dienstag, 10. Dezember 2002 14:31 To: Struts Users Mailing List Subject: RE: dynamically disable a input field. hi, i did it your way but now i have problems with the focus attribut in the html:form tag. if the element is disable i cant set the focus. of course not. i try so many things to set the attribute dynamically but i didn't solve it. can you help again please? thx in advance -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Dienstag, 10. Dezember 2002 13:05 To: [EMAIL PROTECTED] Subject: RE: dynamically disable a input field. If u dont want to wory about netscape then i think u can go the other way.And i Am talking about netscape 4.77. So in the other case u can use logic equla in just one place as u said. %!String isDisbled=false% logic:equal name=OrganizationSession property=isProvider value=0 %isDisbled= false;% /logic:equal and then in ur html:text just use this html:text name= property= disbled=%=isDisbled% then u dont need to do this 25 times as u said. -Original Message- From: GMouratidis [mailto:[EMAIL PROTECTED]] Sent: Tuesday, December 10, 2002 12:56 PM To: struts-user Cc: GMouratidis Subject: RE: dynamically disable a input field. the disadvange is that i have to do it for 25 inputfields. 25x logic:equal.../logic:equal 25x logic:notEqual.../logic:notEqual is this the only way you know? thx georg -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Dienstag, 10. Dezember 2002 12:51 To: [EMAIL PROTECTED] Subject: RE: dynamically disable a input field. Hi, I had similar functionality.But I will advice u not to use html:text disable=true/ because it does not work with Netscape. So instead i used logic:equal tag and bean write. logic:equal name=OrganizationSession property=isProvider value=true html:text name= property=/ /logic:equal logic:notEqual name=OrganizationSession property=isProvider value=true bean:write name= property=/ //Also use html:hidden if u stil want to pass the parameter in request html:hidden name= property=/ /logic:notEqual hope this helps.. regards, Shirish -Original Message- From: GMouratidis [mailto:[EMAIL PROTECTED]] Sent: Tuesday, December 10, 2002 12:40 PM To: struts-user Cc: GMouratidis Subject: dynamically disable a input field. Greetings i want to disable some input elements but only if a bean property is not set: e.g. logic:equal name=OrganizationSession property=isProvider value=0 here i want to set a variable to be used than in each input element. e.g. something like disabled=disabled /logic:equal in the inputs than i would like to use the above setted variable. somthing like : html:text name=CatalogProfileDataForm property=catalogID disabled=value of the above variable named disabled/ is this possible? can somebody help? any other suggestions? thx in advance mit freundlichen Grüßen Georg XL. Mouratidis Web Application Developer Heiler|Software AG Mittlerer Pfad 9 D-70499 Stuttgart Tel: 0711-139 84-265 Fax: 0711-866 63 01 Email: [EMAIL PROTECTED] Connecting Buyer and Supplier http://www.heiler.com -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: JSTL x STRUTS bean display
I have a arraylist containing a collection of beans, something like : List list = new ArrayList (); list.add(bean1_1); list.add(bean1_2); request.setAttribute (BEAN1_LIST, list); c:forEach var=item items=${requestScope.BEAN1_LIST} c:out value=${item.Field1}/ c:out value=${item.Field2}/ /c:forEach This does not work. I tried this before. Has to be something else. Joao, -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: JSTL x STRUTS bean display
In a secret place: http://jakarta.apache.org/struts/resources you can find a link to this (www.basicPortal.com) http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/basicportal/basicportal_07/portlets/proj/TasksLstPortlet.jsp?rev=1.4content-type=text/vnd.viewcvs-markup Here is another hiden place, where you can find that this was already answered like 4 times: http://www.mail-archive.com/struts-user%40jakarta.apache.org/ .V ps: (new e-mail is vc at baseBeans.com, not [EMAIL PROTECTED]) Joao Araujo wrote: I have a arraylist containing a collection of beans, something like : List list = new ArrayList (); list.add(bean1_1); list.add(bean1_2); request.setAttribute (BEAN1_LIST, list); c:forEach var=item items=${requestScope.BEAN1_LIST} c:out value=${item.Field1}/ c:out value=${item.Field2}/ /c:forEach This does not work. I tried this before. Has to be something else. Joao, -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
LookupDispatchAction onchange
Is it possible to use an onchange event on a text input field to submit the form to a LookupDispatchAction? I have numerous buttons on the JSP page which submit the form to my LookupDispatchAction, and work depending on what the value of the action is, but i would like to also call my LookupDispatchAction from an onchange event of a text field? Anyone done this? This message contains information that may be privileged or confidential and is the property of the Cap Gemini Ernst Young Group. It is intended only for the person to whom it is addressed. If you are not the intended recipient, you are not authorized to read, print, retain, copy, disseminate, distribute, or use this message or any part thereof. If you receive this message in error, please notify the sender immediately and delete all copies of this message . -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Can DynaActionForm contain DynaActionForm?
All of the DynaActionForm examples I've seen contain simple Java types or regular JavaBeans. Can a DynaActionForm contain another DynaActionForm? Something like this: form-beans form-bean name=com.blah.LocaleForm type=org.apache.struts.action.DynaActionForm dynamic=true form-property name=selectedLocale type=com.blah.LocaleBean/ form-property name=locales type=java.util.Collection/ /form-bean form-bean name=com.blah.LocaleBean type=org.apache.struts.action.DynaActionForm dynamic=true form-property name=localeString type=java.lang.String/ form-property name=flagSrc type=java.lang.String/ /form-bean /form-beans Where LocaleForm is a DynaActionForm having a property LocaleBean which is also a DynaActionForm. Is this possible? -Jerome -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: JSTL x STRUTS bean display
Try changing: c:out value=${item.Field1}/ - c:out value=${item.field1}/ and: c:out value=${item.Field2}/ - c:out value=${item.field2}/ Quoting V. Cekvenich [EMAIL PROTECTED]: In a secret place: http://jakarta.apache.org/struts/resources you can find a link to this (www.basicPortal.com) http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/basicportal/basicportal_07/portlets/proj/TasksLstPortlet.jsp?rev=1.4content-type=text/vnd.viewcvs-markup Here is another hiden place, where you can find that this was already answered like 4 times: http://www.mail-archive.com/struts-user%40jakarta.apache.org/ .V ps: (new e-mail is vc at baseBeans.com, not [EMAIL PROTECTED]) Joao Araujo wrote: I have a arraylist containing a collection of beans, something like : List list = new ArrayList (); list.add(bean1_1); list.add(bean1_2); request.setAttribute (BEAN1_LIST, list); c:forEach var=item items=${requestScope.BEAN1_LIST} c:out value=${item.Field1}/ c:out value=${item.Field2}/ /c:forEach This does not work. I tried this before. Has to be something else. Joao, -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- Kris Schneider mailto:[EMAIL PROTECTED] D.O.Tech http://www.dotech.com/ -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: LookupDispatchAction onchange
Should be possible. You may need to do something like appending a parameter to your forms action url with a bit of javascript to simulate whats submitted by a button. Can't remember the details for LookupDispatchAction since I havent used it, but heres some js that will play with your forms action and append a parameter named 'method' with value defined by useMethod. Adapt as required. (nb: its modified from a similar script (which works with DispatchAction rather than LookupDispatchAction) of mine for the purposes of this reply and thus untested!) snip function submitBlah(useMethod) { document.forms[0].action = appendParameter(document.forms[0].action,'method',useMethod); document.forms[0].submit(); } } function appendParameter(url, parameter, value) { var delimeter = url.indexOf('?') == -1 ? '?' : ''; return url + delimeter + parameter + '=' + value; } /snip Having said all that I should point out that you might be able achieve a similar effect using an appropriate hidden field too. Much simpler (though doesnt work too well with multipart forms submitting to a DispatchAction). If you try that be careful you dont submit 2 values for your property when a button is clicked. btw: Just looking at the javadocs for LDA. I see they use 'action' as the name of their example parameter. Bad idea naming anything on a form 'action'. It will shadow the form.action property (which means above script wont work for one thing). Same reason that naming a button 'submit' will lead you into trouble when you later try to add a call to javascripts form.submit() method... -Original Message- From: Cook, Graham [mailto:[EMAIL PROTECTED]] Sent: Tuesday, December 10, 2002 22:27 To: '[EMAIL PROTECTED]' Subject: LookupDispatchAction onchange Is it possible to use an onchange event on a text input field to submit the form to a LookupDispatchAction? I have numerous buttons on the JSP page which submit the form to my LookupDispatchAction, and work depending on what the value of the action is, but i would like to also call my LookupDispatchAction from an onchange event of a text field? Anyone done this? This message contains information that may be privileged or confidential and is the property of the Cap Gemini Ernst Young Group. It is intended only for the person to whom it is addressed. If you are not the intended recipient, you are not authorized to read, print, retain, copy, disseminate, distribute, or use this message or any part thereof. If you receive this message in error, please notify the sender immediately and delete all copies of this message . -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: JSTL x STRUTS bean display
Not quite sure I understand why the basicPortal link is a good example of looping. Here's the (reformatted) snippet: c:forEach var=row items=${requestScope.formBean} tr tdlic:out value=${requestScope.formBean.taskName}//td td c:url value=/do/port/tasks var=url c:param name=ID value=${requestScope.formBean.id}/ /c:url a href ='c:out value=${url}/' c:out value=${requestScope.formBean.shortCode}/ /a /td tdc:out value=${requestScope.formBean.taskType}//td tdc:out value=${requestScope.formBean.responsibleMail}//td /tr /c:forEach Shouldn't all the requestScope.formBean references within the loop get changed to row? Obviously, this page is taken out of context from the entire app, so maybe I'm missing something... Quoting V. Cekvenich [EMAIL PROTECTED]: In a secret place: http://jakarta.apache.org/struts/resources you can find a link to this (www.basicPortal.com) http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/basicportal/basicportal_07/portlets/proj/TasksLstPortlet.jsp?rev=1.4content-type=text/vnd.viewcvs-markup Here is another hiden place, where you can find that this was already answered like 4 times: http://www.mail-archive.com/struts-user%40jakarta.apache.org/ .V ps: (new e-mail is vc at baseBeans.com, not [EMAIL PROTECTED]) Joao Araujo wrote: I have a arraylist containing a collection of beans, something like : List list = new ArrayList (); list.add(bean1_1); list.add(bean1_2); request.setAttribute (BEAN1_LIST, list); c:forEach var=item items=${requestScope.BEAN1_LIST} c:out value=${item.Field1}/ c:out value=${item.Field2}/ /c:forEach This does not work. I tried this before. Has to be something else. Joao, -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- Kris Schneider mailto:[EMAIL PROTECTED] D.O.Tech http://www.dotech.com/ -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Odd logging message
Hey all, Since I upgraded to Struts 1.1b I have been getting the following messages in my standard output: processActionForward(/secure/index.jsp, false) '/secure/index.jsp' - processed as uri Does anyone know why these messages show up? Also does anyone know how to turn them off short of commenting them out and recompiling. Thanks in advance, Graham Graham Lounder Java Developer Spatial Components Division CARIS 264 Rookwood Ave Fredericton NB E3B-2M2 Office 506 462-4263 Fax506 459-3849 [EMAIL PROTECTED] http://www.spatialcomponents.com -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Odd logging message
That looks like a Tiles message which are controlled with the commons logging properties. David From: Graham Lounder [EMAIL PROTECTED] Reply-To: Struts Users Mailing List [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Subject: Odd logging message Date: Tue, 10 Dec 2002 10:54:33 -0400 Hey all, Since I upgraded to Struts 1.1b I have been getting the following messages in my standard output: processActionForward(/secure/index.jsp, false) '/secure/index.jsp' - processed as uri Does anyone know why these messages show up? Also does anyone know how to turn them off short of commenting them out and recompiling. Thanks in advance, Graham Graham Lounder Java Developer Spatial Components Division CARIS 264 Rookwood Ave Fredericton NB E3B-2M2 Office 506 462-4263 Fax506 459-3849 [EMAIL PROTECTED] http://www.spatialcomponents.com -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] _ The new MSN 8: advanced junk mail protection and 2 months FREE* http://join.msn.com/?page=features/junkmail -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Initializing application
You can define context-params in your web.xml file that will be application init variables. You could also setup a servlet to be loaded when the container starts and put the code in the init() method. See the javadocs on the servlet.init() method it's pretty easy to get ahold of the ServletContext. David From: Jordan Thomas [EMAIL PROTECTED] Reply-To: Struts Users Mailing List [EMAIL PROTECTED] To: Struts-User [EMAIL PROTECTED] Subject: Initializing application Date: Tue, 10 Dec 2002 12:54:27 +0100 Hi, I want to initialize my application with some application variables. What is the best way to do this? My approach so far has been to call the init() method in an unmapped servlet. So everytime the server statrs up they are loaded into memory. The only thing is that I am not sure how to set an application or session variable in the init method of a servlet. How can I do this? Is there a better way to do this? Thanks Jordan -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] _ The new MSN 8: smart spam protection and 2 months FREE* http://join.msn.com/?page=features/junkmail -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Odd logging message
I would assume it was a commons logging message but the message is not formatted that same as my other logging messages which makes me think its a System.out.println message. Here is a larger snippet to show you what I mean: // START SNIPPET --- DEBUG TimerFilter - /nsprd/secure/map/generate.do: Requested By loundernt DEBUG MapGenerateAction - Init Time: 0.0 DEBUG MapGenerateAction - Action Time: 0.0 DEBUG MapGenerateAction - Layer Time: 0.08 DEBUG MapController - refresh() Time: 184.455 seconds processActionForward(/secure/map/map.jsp, false) '/secure/map/map.jsp' - processed as uri DEBUG TimerFilter - /nsprd/secure/map/generate.do: Time 184.706 seconds // END SNIPPET -- Any more ideas? Graham -Original Message- From: David Graham [mailto:[EMAIL PROTECTED]] Sent: December 10, 2002 11:13 AM To: [EMAIL PROTECTED] Subject: Re: Odd logging message That looks like a Tiles message which are controlled with the commons logging properties. David From: Graham Lounder [EMAIL PROTECTED] Reply-To: Struts Users Mailing List [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Subject: Odd logging message Date: Tue, 10 Dec 2002 10:54:33 -0400 Hey all, Since I upgraded to Struts 1.1b I have been getting the following messages in my standard output: processActionForward(/secure/index.jsp, false) '/secure/index.jsp' - processed as uri Does anyone know why these messages show up? Also does anyone know how to turn them off short of commenting them out and recompiling. Thanks in advance, Graham Graham Lounder Java Developer Spatial Components Division CARIS 264 Rookwood Ave Fredericton NB E3B-2M2 Office 506 462-4263 Fax506 459-3849 [EMAIL PROTECTED] http://www.spatialcomponents.com -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] _ The new MSN 8: advanced junk mail protection and 2 months FREE* http://join.msn.com/?page=features/junkmail -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: LookupDispatchAction onchange
If I remember correctly the LookupDispatchAction does a reverse lookup on your resource bundle in order to determine which method to call in the class. Example: if you have a key in your ApplicationResources.properties called: textfield.changed=submit form then you would obviously need something like the following in the getKeyMethodMap: map.put(textfield.changed, textFieldChangedMethod); So when your text field changes, you will need to submit the parameter you configured for your LookupDispatchAction in struts-config.xml with the a value of 'submit form' What the action should do is do a reverse lookup on the ApplicationResources file and look for a value of 'submit form'. 'submit form' is associated with the key textfield.changed and it will cause the textFieldChangedMethod to be called in your class. Also, make sure you follow Andrew's suggestion about not using 'action' as the parameter name. This has the potential to cause your form to behave in a very weird manner. It caused me lots of headaches in the past until I figured out it was the parameter name I used was 'action'. If you need any more help on this let me know. Take care -Original Message- From: Andrew Hill [mailto:[EMAIL PROTECTED]] Sent: Tuesday, December 10, 2002 9:54 AM To: Struts Users Mailing List Subject: RE: LookupDispatchAction onchange Should be possible. You may need to do something like appending a parameter to your forms action url with a bit of javascript to simulate whats submitted by a button. Can't remember the details for LookupDispatchAction since I havent used it, but heres some js that will play with your forms action and append a parameter named 'method' with value defined by useMethod. Adapt as required. (nb: its modified from a similar script (which works with DispatchAction rather than LookupDispatchAction) of mine for the purposes of this reply and thus untested!) snip function submitBlah(useMethod) { document.forms[0].action = appendParameter(document.forms[0].action,'method',useMethod); document.forms[0].submit(); } } function appendParameter(url, parameter, value) { var delimeter = url.indexOf('?') == -1 ? '?' : ''; return url + delimeter + parameter + '=' + value; } /snip Having said all that I should point out that you might be able achieve a similar effect using an appropriate hidden field too. Much simpler (though doesnt work too well with multipart forms submitting to a DispatchAction). If you try that be careful you dont submit 2 values for your property when a button is clicked. btw: Just looking at the javadocs for LDA. I see they use 'action' as the name of their example parameter. Bad idea naming anything on a form 'action'. It will shadow the form.action property (which means above script wont work for one thing). Same reason that naming a button 'submit' will lead you into trouble when you later try to add a call to javascripts form.submit() method... -Original Message- From: Cook, Graham [mailto:[EMAIL PROTECTED]] Sent: Tuesday, December 10, 2002 22:27 To: '[EMAIL PROTECTED]' Subject: LookupDispatchAction onchange Is it possible to use an onchange event on a text input field to submit the form to a LookupDispatchAction? I have numerous buttons on the JSP page which submit the form to my LookupDispatchAction, and work depending on what the value of the action is, but i would like to also call my LookupDispatchAction from an onchange event of a text field? Anyone done this? This message contains information that may be privileged or confidential and is the property of the Cap Gemini Ernst Young Group. It is intended only for the person to whom it is addressed. If you are not the intended recipient, you are not authorized to read, print, retain, copy, disseminate, distribute, or use this message or any part thereof. If you receive this message in error, please notify the sender immediately and delete all copies of this message . -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Application Modules and Path Prefix Mapping: eventually/already supported?
In all the things I've read about the new application modules feature in 1.1, there is always a caveat like this only works with extention mapping (*.do) not path prefix mapping (/do/*). But now that I'm looking at upgrading my 1.0 path mapped application to 1.1 (and wanting to use modules), I realize that I've never been clear whether this caveat was a bug that was going to be addressed, or whether it was a design decision that was going to stay. So, Will 1.1 (final) support application modules using path prefix mapping? And, if yes, do the nightly builds support it already? Thanks, Bill Tomlinson -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
possible limited supports for inheritance in struts?
Hello, all, Sorry for re-post. I believer this is a problem worthywhile of attention. I posted this message yesterday, but basically no answers. I have an ActionForm, which includes a field/getter/setter of subclass. The subclass inherits superField field/getter/setter from its superclass. In my JSP page, I try to access the superField. But it is complained no getter method for subclass.superField in the ActionForm. See p.s. for related codes. Does anybody have any clue? Is it a limitation of Struts, ActionForm or only the nested tags? Is it possibly caused by Real Time Type Identification/Reflection? Is it possibly caused by serializable? Thanks. Denis p.s. related codes 1) JSP: nested:form action='/myquestion' nested:nest property='scheduleVO' nested:text property='description'/ ... 2) ActionForm: ... private ScheduleVO scheduleVO; //The reference is in the type of ScheduleVO instead of ScheduleBean public ScheduleVO getScheduleVO() { return this.scheduleVO; } public void setScheduleVO(ScheduleVO scheduleVO) { this.scheduleVO = scheduleVO; } ... 3) ScheduleVO: public class ScheduleVO extends ScheduleBean { ... } 4) ScheduleBean, which is in the same package with ScheduleVO: class ScheduleBean implements Serializable {//the class is in the scope of package ... String description; // i tried both package/private level access modifiers public String getDescription() { return this.description; } public void setDescription(String description) { this.description = description; } . } p.s.2 In order to narrow down the problem, I did some comparision experiments: 1) Replace superField with subclassLocalField, which is a local filed in the subclass. Everything works fine. 2) Replace superField with superField2. Not working as expected. Be sure nothing related to typo. 3) Copy superField field/getter/setter from superclass into the subclass. Everything works fine. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: bean:write ' , , ' characters
It's pretty easy to find out in the user's guide: http://jakarta.apache.org/struts/userGuide/struts-bean.html#write David From: Duma Rolando [EMAIL PROTECTED] Reply-To: Struts Users Mailing List [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Subject: bean:write ' , , ' characters Date: Tue, 10 Dec 2002 12:37:20 +0100 I have a bean property that returns an html tag, but bean:write substitute the , , characters with lt; , gt; etc. If this is the normal behaviour of the tag, how can I disable it? -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] _ Add photos to your e-mail with MSN 8. Get 2 months FREE*. http://join.msn.com/?page=features/featuredemail -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Initializing application
Another idea would be to make use of a struts plugin. These are actually very simple to write! Just implement PlugIn and its init() method and add to struts-config and bobs yer uncle. btw: the signature of the init method changed between 1.1b1 and 1.1b2. If you do the following trick your Plugin should work in both environments (I havent tested it though!): public void init(ApplicationConfig config) throws ServletException { try { ActionServlet servlet = (ActionServlet)PropertyUtils.getProperty(config,servlet); init(servlet,config); } catch(Throwable t) { throw new ServletException(Error in init(config) method,t); } } public void init(ActionServlet servlet, ApplicationConfig config) throws ServletException { // your code here } (Why I dont just use getServlet() escapes my memory. Maybe the later version doesnt have a getServlet() in the config object?) To add to your struts config (right down near the end of it): plug-in className=com.mypackage.MyPlugIn set-property property=bob value=a job/ /plug-in the set-property tags are optional, but you can use them to pass parameters to your plugin (in which you would define a setBob() method) -Original Message- From: David Graham [mailto:[EMAIL PROTECTED]] Sent: Tuesday, December 10, 2002 23:16 To: [EMAIL PROTECTED] Subject: Re: Initializing application You can define context-params in your web.xml file that will be application init variables. You could also setup a servlet to be loaded when the container starts and put the code in the init() method. See the javadocs on the servlet.init() method it's pretty easy to get ahold of the ServletContext. David From: Jordan Thomas [EMAIL PROTECTED] Reply-To: Struts Users Mailing List [EMAIL PROTECTED] To: Struts-User [EMAIL PROTECTED] Subject: Initializing application Date: Tue, 10 Dec 2002 12:54:27 +0100 Hi, I want to initialize my application with some application variables. What is the best way to do this? My approach so far has been to call the init() method in an unmapped servlet. So everytime the server statrs up they are loaded into memory. The only thing is that I am not sure how to set an application or session variable in the init method of a servlet. How can I do this? Is there a better way to do this? Thanks Jordan -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] _ The new MSN 8: smart spam protection and 2 months FREE* http://join.msn.com/?page=features/junkmail -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Initializing application
Oh yeh. Almost forgot. Plugins are called when your webapp is initialised (before anyone can access it) and are executed serially in the order you listed them in your struts-config. -Original Message- From: Andrew Hill [mailto:[EMAIL PROTECTED]] Sent: Tuesday, December 10, 2002 23:36 To: Struts Users Mailing List Subject: RE: Initializing application Another idea would be to make use of a struts plugin. These are actually very simple to write! Just implement PlugIn and its init() method and add to struts-config and bobs yer uncle. btw: the signature of the init method changed between 1.1b1 and 1.1b2. If you do the following trick your Plugin should work in both environments (I havent tested it though!): public void init(ApplicationConfig config) throws ServletException { try { ActionServlet servlet = (ActionServlet)PropertyUtils.getProperty(config,servlet); init(servlet,config); } catch(Throwable t) { throw new ServletException(Error in init(config) method,t); } } public void init(ActionServlet servlet, ApplicationConfig config) throws ServletException { // your code here } (Why I dont just use getServlet() escapes my memory. Maybe the later version doesnt have a getServlet() in the config object?) To add to your struts config (right down near the end of it): plug-in className=com.mypackage.MyPlugIn set-property property=bob value=a job/ /plug-in the set-property tags are optional, but you can use them to pass parameters to your plugin (in which you would define a setBob() method) -Original Message- From: David Graham [mailto:[EMAIL PROTECTED]] Sent: Tuesday, December 10, 2002 23:16 To: [EMAIL PROTECTED] Subject: Re: Initializing application You can define context-params in your web.xml file that will be application init variables. You could also setup a servlet to be loaded when the container starts and put the code in the init() method. See the javadocs on the servlet.init() method it's pretty easy to get ahold of the ServletContext. David From: Jordan Thomas [EMAIL PROTECTED] Reply-To: Struts Users Mailing List [EMAIL PROTECTED] To: Struts-User [EMAIL PROTECTED] Subject: Initializing application Date: Tue, 10 Dec 2002 12:54:27 +0100 Hi, I want to initialize my application with some application variables. What is the best way to do this? My approach so far has been to call the init() method in an unmapped servlet. So everytime the server statrs up they are loaded into memory. The only thing is that I am not sure how to set an application or session variable in the init method of a servlet. How can I do this? Is there a better way to do this? Thanks Jordan -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] _ The new MSN 8: smart spam protection and 2 months FREE* http://join.msn.com/?page=features/junkmail -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: possible limited supports for inheritance in struts?
2002. december 10. 16:26 dátummal Denis Wang ezt írtad: I have an ActionForm, which includes a field/getter/setter of subclass. The subclass inherits superField field/getter/setter from its superclass. In my JSP page, I try to access the superField. But it is complained no getter method for subclass.superField in the ActionForm. See p.s. for related codes. I use inheritance frequently however not with nested taglib. So I suppose the problem is (if any) with the nested taglib. Hth, Tib -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Application Modules and Path Prefix Mapping: eventually/already s upported?
2002. december 10. 16:29 dátummal Bill Tomlinson ezt írtad: In all the things I've read about the new application modules feature in 1.1, there is always a caveat like this only works with extention mapping (*.do) not path prefix mapping (/do/*). I reckon you wouldn't be able to make difference wheter it is a prefix mapping or a module reference in case of using modules. Tib -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: possible limited supports for inheritance in struts?
may i see you sample codes? thanks. denis -Original Message- From: Gemes Tibor [mailto:[EMAIL PROTECTED]] Sent: Tuesday, December 10, 2002 10:37 AM To: Struts Users Mailing List Subject: Re: possible limited supports for inheritance in struts? 2002. december 10. 16:26 dátummal Denis Wang ezt írtad: I have an ActionForm, which includes a field/getter/setter of subclass. The subclass inherits superField field/getter/setter from its superclass. In my JSP page, I try to access the superField. But it is complained no getter method for subclass.superField in the ActionForm. See p.s. for related codes. I use inheritance frequently however not with nested taglib. So I suppose the problem is (if any) with the nested taglib. Hth, Tib -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: LookupDispatchAction onchange
Thanks Andrew Juan, thats very helpful. Its is a shame that I have to use JavaScript to achieve a submit from a text field. The other buttons on the screen use the html:submit tag, html:submit property=doaction bean:message key=button.savedetails/ /html:submit obviously theres no Javascript there, shame there isnt some way of doing this with a tag rather than having javascript code to do the submit. Thanks you for your help. -Original Message- From: Alvarado, Juan (c) [mailto:[EMAIL PROTECTED]] Sent: 10 December 2002 15:25 To: 'Struts Users Mailing List' Subject: RE: LookupDispatchAction onchange If I remember correctly the LookupDispatchAction does a reverse lookup on your resource bundle in order to determine which method to call in the class. Example: if you have a key in your ApplicationResources.properties called: textfield.changed=submit form then you would obviously need something like the following in the getKeyMethodMap: map.put(textfield.changed, textFieldChangedMethod); So when your text field changes, you will need to submit the parameter you configured for your LookupDispatchAction in struts-config.xml with the a value of 'submit form' What the action should do is do a reverse lookup on the ApplicationResources file and look for a value of 'submit form'. 'submit form' is associated with the key textfield.changed and it will cause the textFieldChangedMethod to be called in your class. Also, make sure you follow Andrew's suggestion about not using 'action' as the parameter name. This has the potential to cause your form to behave in a very weird manner. It caused me lots of headaches in the past until I figured out it was the parameter name I used was 'action'. If you need any more help on this let me know. Take care -Original Message- From: Andrew Hill [mailto:[EMAIL PROTECTED]] Sent: Tuesday, December 10, 2002 9:54 AM To: Struts Users Mailing List Subject: RE: LookupDispatchAction onchange Should be possible. You may need to do something like appending a parameter to your forms action url with a bit of javascript to simulate whats submitted by a button. Can't remember the details for LookupDispatchAction since I havent used it, but heres some js that will play with your forms action and append a parameter named 'method' with value defined by useMethod. Adapt as required. (nb: its modified from a similar script (which works with DispatchAction rather than LookupDispatchAction) of mine for the purposes of this reply and thus untested!) snip function submitBlah(useMethod) { document.forms[0].action = appendParameter(document.forms[0].action,'method',useMethod); document.forms[0].submit(); } } function appendParameter(url, parameter, value) { var delimeter = url.indexOf('?') == -1 ? '?' : ''; return url + delimeter + parameter + '=' + value; } /snip Having said all that I should point out that you might be able achieve a similar effect using an appropriate hidden field too. Much simpler (though doesnt work too well with multipart forms submitting to a DispatchAction). If you try that be careful you dont submit 2 values for your property when a button is clicked. btw: Just looking at the javadocs for LDA. I see they use 'action' as the name of their example parameter. Bad idea naming anything on a form 'action'. It will shadow the form.action property (which means above script wont work for one thing). Same reason that naming a button 'submit' will lead you into trouble when you later try to add a call to javascripts form.submit() method... -Original Message- From: Cook, Graham [mailto:[EMAIL PROTECTED]] Sent: Tuesday, December 10, 2002 22:27 To: '[EMAIL PROTECTED]' Subject: LookupDispatchAction onchange Is it possible to use an onchange event on a text input field to submit the form to a LookupDispatchAction? I have numerous buttons on the JSP page which submit the form to my LookupDispatchAction, and work depending on what the value of the action is, but i would like to also call my LookupDispatchAction from an onchange event of a text field? Anyone done this? This message contains information that may be privileged or confidential and is the property of the Cap Gemini Ernst Young Group. It is intended only for the person to whom it is addressed. If you are not the intended recipient, you are not authorized to read, print, retain, copy, disseminate, distribute, or use this message or any part thereof. If you receive this message in error, please notify the sender immediately and delete all copies of this message . -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL
RE: LookupDispatchAction onchange
The LookupDispatchAction was designed with the intention of not having to use javascript to work with multiple submit buttons in one form. Since what you need is a submit from an onChange event in a text field which is a somewhat not often seen operation (at least from my experiences), you have no choice but to do the javascript in this case. Just our of curiosity, what requirement in your application do you have that needs the form to be submitted when a text field changes??? -Original Message- From: Cook, Graham [mailto:[EMAIL PROTECTED]] Sent: Tuesday, December 10, 2002 10:50 AM To: 'Struts Users Mailing List' Subject: RE: LookupDispatchAction onchange Thanks Andrew Juan, thats very helpful. Its is a shame that I have to use JavaScript to achieve a submit from a text field. The other buttons on the screen use the html:submit tag, html:submit property=doaction bean:message key=button.savedetails/ /html:submit obviously theres no Javascript there, shame there isnt some way of doing this with a tag rather than having javascript code to do the submit. Thanks you for your help. -Original Message- From: Alvarado, Juan (c) [mailto:[EMAIL PROTECTED]] Sent: 10 December 2002 15:25 To: 'Struts Users Mailing List' Subject: RE: LookupDispatchAction onchange If I remember correctly the LookupDispatchAction does a reverse lookup on your resource bundle in order to determine which method to call in the class. Example: if you have a key in your ApplicationResources.properties called: textfield.changed=submit form then you would obviously need something like the following in the getKeyMethodMap: map.put(textfield.changed, textFieldChangedMethod); So when your text field changes, you will need to submit the parameter you configured for your LookupDispatchAction in struts-config.xml with the a value of 'submit form' What the action should do is do a reverse lookup on the ApplicationResources file and look for a value of 'submit form'. 'submit form' is associated with the key textfield.changed and it will cause the textFieldChangedMethod to be called in your class. Also, make sure you follow Andrew's suggestion about not using 'action' as the parameter name. This has the potential to cause your form to behave in a very weird manner. It caused me lots of headaches in the past until I figured out it was the parameter name I used was 'action'. If you need any more help on this let me know. Take care -Original Message- From: Andrew Hill [mailto:[EMAIL PROTECTED]] Sent: Tuesday, December 10, 2002 9:54 AM To: Struts Users Mailing List Subject: RE: LookupDispatchAction onchange Should be possible. You may need to do something like appending a parameter to your forms action url with a bit of javascript to simulate whats submitted by a button. Can't remember the details for LookupDispatchAction since I havent used it, but heres some js that will play with your forms action and append a parameter named 'method' with value defined by useMethod. Adapt as required. (nb: its modified from a similar script (which works with DispatchAction rather than LookupDispatchAction) of mine for the purposes of this reply and thus untested!) snip function submitBlah(useMethod) { document.forms[0].action = appendParameter(document.forms[0].action,'method',useMethod); document.forms[0].submit(); } } function appendParameter(url, parameter, value) { var delimeter = url.indexOf('?') == -1 ? '?' : ''; return url + delimeter + parameter + '=' + value; } /snip Having said all that I should point out that you might be able achieve a similar effect using an appropriate hidden field too. Much simpler (though doesnt work too well with multipart forms submitting to a DispatchAction). If you try that be careful you dont submit 2 values for your property when a button is clicked. btw: Just looking at the javadocs for LDA. I see they use 'action' as the name of their example parameter. Bad idea naming anything on a form 'action'. It will shadow the form.action property (which means above script wont work for one thing). Same reason that naming a button 'submit' will lead you into trouble when you later try to add a call to javascripts form.submit() method... -Original Message- From: Cook, Graham [mailto:[EMAIL PROTECTED]] Sent: Tuesday, December 10, 2002 22:27 To: '[EMAIL PROTECTED]' Subject: LookupDispatchAction onchange Is it possible to use an onchange event on a text input field to submit the form to a LookupDispatchAction? I have numerous buttons on the JSP page which submit the form to my LookupDispatchAction, and work depending on what the value of the action is, but i would like to also call my LookupDispatchAction from an onchange event of a text field? Anyone done this? This message contains information that may be privileged or confidential and is the property of
Re: Xdoclet and Struts
Thanks for your feedback. If we use xdoclet and struts, is it possible for me NOT to edit/create the struts-config file for both struts 1.0 and 1.1? It kind of beat the purpose of using xdoclet if we need to manually add/change the struts-cofig file after it is generated by xdoclet. Thank you. - Original Message - From: Emil Korladinov [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Friday, December 06, 2002 3:33 AM Subject: Re: Xdoclet and Struts --- Jack R. [EMAIL PROTECTED] wrote: Is it a good practice to use xdoclet to generate Struts config file? Or it is not a good idea at all? I know there are GUI tool to edit struts config file. But I would think it will be easier to have the struts config file auto generate by xdoclet tag in my struts Form, Action files. Thanks for any suggestion. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] __ Do you Yahoo!? Yahoo! Mail Plus - Powerful. Affordable. Sign up now. http://mailplus.yahoo.com -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Struts Child Windows
-Original Message- From: Cook, Graham [mailto:[EMAIL PROTECTED]] Sent: Donnerstag, 5. Dezember 2002 14:00 To: [EMAIL PROTECTED] Subject: Struts Child Windows What is the correct way in Struts to open a child window (from a JSP), which calls an Action, retrieves a input field value from the parent window and displays results in the child window. You can not open a window from the server. if you want to open a window you can only do it on the client. With JavaScript. e.g. a href=javascript: var win = window.open ( 'youraction.do?yourvalues', WindowName, properties );get my list/a -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: JSTL x STRUTS bean display
c:forEach var=item items=${BEAN1_LIST} c:out value=${item.Field1}/ c:out value=${item.Field2}/ /c:forEach -Original Message- From: Joao Araujo [mailto:[EMAIL PROTECTED]] Sent: dinsdag 10 december 2002 14:49 To: Struts Users Mailing List Subject: Re: JSTL x STRUTS bean display I have a arraylist containing a collection of beans, something like : List list = new ArrayList (); list.add(bean1_1); list.add(bean1_2); request.setAttribute (BEAN1_LIST, list); c:forEach var=item items=${requestScope.BEAN1_LIST} c:out value=${item.Field1}/ c:out value=${item.Field2}/ /c:forEach This does not work. I tried this before. Has to be something else. Joao, -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Initializing application
Thanks guys, I've got it all working. cheers Jordan :O) -Original Message- From: Andrew Hill [mailto:[EMAIL PROTECTED]] Sent: Tuesday, 10 December 2002 4:40 PM To: Struts Users Mailing List Subject: RE: Initializing application Oh yeh. Almost forgot. Plugins are called when your webapp is initialised (before anyone can access it) and are executed serially in the order you listed them in your struts-config. -Original Message- From: Andrew Hill [mailto:[EMAIL PROTECTED]] Sent: Tuesday, December 10, 2002 23:36 To: Struts Users Mailing List Subject: RE: Initializing application Another idea would be to make use of a struts plugin. These are actually very simple to write! Just implement PlugIn and its init() method and add to struts-config and bobs yer uncle. btw: the signature of the init method changed between 1.1b1 and 1.1b2. If you do the following trick your Plugin should work in both environments (I havent tested it though!): public void init(ApplicationConfig config) throws ServletException { try { ActionServlet servlet = (ActionServlet)PropertyUtils.getProperty(config,servlet); init(servlet,config); } catch(Throwable t) { throw new ServletException(Error in init(config) method,t); } } public void init(ActionServlet servlet, ApplicationConfig config) throws ServletException { // your code here } (Why I dont just use getServlet() escapes my memory. Maybe the later version doesnt have a getServlet() in the config object?) To add to your struts config (right down near the end of it): plug-in className=com.mypackage.MyPlugIn set-property property=bob value=a job/ /plug-in the set-property tags are optional, but you can use them to pass parameters to your plugin (in which you would define a setBob() method) -Original Message- From: David Graham [mailto:[EMAIL PROTECTED]] Sent: Tuesday, December 10, 2002 23:16 To: [EMAIL PROTECTED] Subject: Re: Initializing application You can define context-params in your web.xml file that will be application init variables. You could also setup a servlet to be loaded when the container starts and put the code in the init() method. See the javadocs on the servlet.init() method it's pretty easy to get ahold of the ServletContext. David From: Jordan Thomas [EMAIL PROTECTED] Reply-To: Struts Users Mailing List [EMAIL PROTECTED] To: Struts-User [EMAIL PROTECTED] Subject: Initializing application Date: Tue, 10 Dec 2002 12:54:27 +0100 Hi, I want to initialize my application with some application variables. What is the best way to do this? My approach so far has been to call the init() method in an unmapped servlet. So everytime the server statrs up they are loaded into memory. The only thing is that I am not sure how to set an application or session variable in the init method of a servlet. How can I do this? Is there a better way to do this? Thanks Jordan -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] _ The new MSN 8: smart spam protection and 2 months FREE* http://join.msn.com/?page=features/junkmail -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: LookupDispatchAction onchange
Originally, I had a customer number and customer name fields on a jsp and a button:- customer number ___ {SEARCH} customer name __ when the user types in a customer number and clicks the SEARCH button, the LookupDispatchAction was called, fetched the values from the database ( if a match was found ) and called the form again with both fields populated. ( if no match was found then the input page gets called with ActionErrors ) What I wanted to do was to get rid of the SEARCH button, and have an onchange event to perform this search! -Original Message- From: Alvarado, Juan (c) [mailto:[EMAIL PROTECTED]] Sent: 10 December 2002 16:05 To: 'Struts Users Mailing List' Subject: RE: LookupDispatchAction onchange The LookupDispatchAction was designed with the intention of not having to use javascript to work with multiple submit buttons in one form. Since what you need is a submit from an onChange event in a text field which is a somewhat not often seen operation (at least from my experiences), you have no choice but to do the javascript in this case. Just our of curiosity, what requirement in your application do you have that needs the form to be submitted when a text field changes??? -Original Message- From: Cook, Graham [mailto:[EMAIL PROTECTED]] Sent: Tuesday, December 10, 2002 10:50 AM To: 'Struts Users Mailing List' Subject: RE: LookupDispatchAction onchange Thanks Andrew Juan, thats very helpful. Its is a shame that I have to use JavaScript to achieve a submit from a text field. The other buttons on the screen use the html:submit tag, html:submit property=doaction bean:message key=button.savedetails/ /html:submit obviously theres no Javascript there, shame there isnt some way of doing this with a tag rather than having javascript code to do the submit. Thanks you for your help. -Original Message- From: Alvarado, Juan (c) [mailto:[EMAIL PROTECTED]] Sent: 10 December 2002 15:25 To: 'Struts Users Mailing List' Subject: RE: LookupDispatchAction onchange If I remember correctly the LookupDispatchAction does a reverse lookup on your resource bundle in order to determine which method to call in the class. Example: if you have a key in your ApplicationResources.properties called: textfield.changed=submit form then you would obviously need something like the following in the getKeyMethodMap: map.put(textfield.changed, textFieldChangedMethod); So when your text field changes, you will need to submit the parameter you configured for your LookupDispatchAction in struts-config.xml with the a value of 'submit form' What the action should do is do a reverse lookup on the ApplicationResources file and look for a value of 'submit form'. 'submit form' is associated with the key textfield.changed and it will cause the textFieldChangedMethod to be called in your class. Also, make sure you follow Andrew's suggestion about not using 'action' as the parameter name. This has the potential to cause your form to behave in a very weird manner. It caused me lots of headaches in the past until I figured out it was the parameter name I used was 'action'. If you need any more help on this let me know. Take care -Original Message- From: Andrew Hill [mailto:[EMAIL PROTECTED]] Sent: Tuesday, December 10, 2002 9:54 AM To: Struts Users Mailing List Subject: RE: LookupDispatchAction onchange Should be possible. You may need to do something like appending a parameter to your forms action url with a bit of javascript to simulate whats submitted by a button. Can't remember the details for LookupDispatchAction since I havent used it, but heres some js that will play with your forms action and append a parameter named 'method' with value defined by useMethod. Adapt as required. (nb: its modified from a similar script (which works with DispatchAction rather than LookupDispatchAction) of mine for the purposes of this reply and thus untested!) snip function submitBlah(useMethod) { document.forms[0].action = appendParameter(document.forms[0].action,'method',useMethod); document.forms[0].submit(); } } function appendParameter(url, parameter, value) { var delimeter = url.indexOf('?') == -1 ? '?' : ''; return url + delimeter + parameter + '=' + value; } /snip Having said all that I should point out that you might be able achieve a similar effect using an appropriate hidden field too. Much simpler (though doesnt work too well with multipart forms submitting to a DispatchAction). If you try that be careful you dont submit 2 values for your property when a button is clicked. btw: Just looking at the javadocs for LDA. I see they use 'action' as the name of their example parameter. Bad idea naming anything on a form 'action'. It will shadow the form.action property (which means above script wont work for one thing). Same reason that naming a button 'submit' will lead you into trouble when you later try to add a call to javascripts
DynaActionForm problem - IllegalArgumentException: No bean specified
Oh Struts masters, I get an exception when Struts populates my DynaActionForm from request parameters. With DEBUG logging on I see the following: INFO org.apache.struts.action.RequestProcessor - Processing a 'POST' for path '/changeLocale' DEBUG org.apache.struts.util.RequestUtils - Looking for ActionForm bean instance in scope 'session' under attribute key 'localeForm' DEBUG org.apache.struts.util.RequestUtils - Recycling existing DynaActionForm instance of type 'localeForm' DEBUG org.apache.struts.util.RequestUtils - -- DynaActionForm[dynaClass=localeForm,locales={en_US,es_MX},selectedLocale=en_ US] DEBUG org.apache.struts.action.RequestProcessor - Storing ActionForm bean instance in scope 'session' under attribute key 'localeForm' DEBUG org.apache.struts.action.RequestProcessor - Populating bean properties from this request DEBUG org.apache.commons.beanutils.BeanUtils - BeanUtils.populate(DynaActionForm[dynaClass=localeForm,locales=NULL,select edLocale=NULL], {selectedLocale.localeString=[Ljava.lang.String;@d0}) DEBUG org.apache.commons.beanutils.BeanUtils - setProperty(DynaActionForm[dynaClass=localeForm,locales=NULL,selectedLocal e=NULL], selectedLocale.localeString, [es_MX]) DEBUG org.apache.commons.beanutils.BeanUtils - Target bean = null DEBUG org.apache.commons.beanutils.BeanUtils - Target name = localeString Looks like RequestUtils is getting the correct DynaActionForm from the session (logs 2,3,4). But then I don't understand why the BeanUtils logs show the properties to be NULL (logs 7,8,9). My DynaActionForm contains two properties. One is a JavaBean and the other is a Collection of JavaBeans. form-bean name=localeForm type=org.apache.struts.action.DynaActionForm dynamic=true form-property name=selectedLocale type=com.blah.LocaleBean/ form-property name=locales type=java.util.Collection/ /form-bean The element type of property locales is also com.blah.LocaleBean. com.blah.LocaleBean is very simple. It contains only one property called localeString which is a java.lang.String. Am I doing something wrong??? Environment: Struts 1.1b2 BeanUtils 1.5 (also tried 1.3) Tomcat 4.0.6 -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: DynaActionForm problem - IllegalArgumentException: No bean specified
I don't believe DynaActionForm supports java.util.Collection. Please correct me if I'm wrong. Thanks -Original Message- From: Jerome Jacobsen [mailto:[EMAIL PROTECTED]] Sent: Tuesday, December 10, 2002 11:27 AM To: Struts User Subject: DynaActionForm problem - IllegalArgumentException: No bean specified Oh Struts masters, I get an exception when Struts populates my DynaActionForm from request parameters. With DEBUG logging on I see the following: INFO org.apache.struts.action.RequestProcessor - Processing a 'POST' for path '/changeLocale' DEBUG org.apache.struts.util.RequestUtils - Looking for ActionForm bean instance in scope 'session' under attribute key 'localeForm' DEBUG org.apache.struts.util.RequestUtils - Recycling existing DynaActionForm instance of type 'localeForm' DEBUG org.apache.struts.util.RequestUtils - -- DynaActionForm[dynaClass=localeForm,locales={en_US,es_MX},selectedLocale=en_ US] DEBUG org.apache.struts.action.RequestProcessor - Storing ActionForm bean instance in scope 'session' under attribute key 'localeForm' DEBUG org.apache.struts.action.RequestProcessor - Populating bean properties from this request DEBUG org.apache.commons.beanutils.BeanUtils - BeanUtils.populate(DynaActionForm[dynaClass=localeForm,locales=NULL,select edLocale=NULL], {selectedLocale.localeString=[Ljava.lang.String;@d0}) DEBUG org.apache.commons.beanutils.BeanUtils - setProperty(DynaActionForm[dynaClass=localeForm,locales=NULL,selectedLocal e=NULL], selectedLocale.localeString, [es_MX]) DEBUG org.apache.commons.beanutils.BeanUtils - Target bean = null DEBUG org.apache.commons.beanutils.BeanUtils - Target name = localeString Looks like RequestUtils is getting the correct DynaActionForm from the session (logs 2,3,4). But then I don't understand why the BeanUtils logs show the properties to be NULL (logs 7,8,9). My DynaActionForm contains two properties. One is a JavaBean and the other is a Collection of JavaBeans. form-bean name=localeForm type=org.apache.struts.action.DynaActionForm dynamic=true form-property name=selectedLocale type=com.blah.LocaleBean/ form-property name=locales type=java.util.Collection/ /form-bean The element type of property locales is also com.blah.LocaleBean. com.blah.LocaleBean is very simple. It contains only one property called localeString which is a java.lang.String. Am I doing something wrong??? Environment: Struts 1.1b2 BeanUtils 1.5 (also tried 1.3) Tomcat 4.0.6 -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: possible limited supports for inheritance in struts?
Denis: I too use inheritance just fine but I do not use nested tags. Try implementing Serializable in ScheduleVO as well. Just a wild guess. If that doesn't work simply try to get a field from the superclass using something other than the nested tags to see if the tags are a problem. Vinh -Original Message- From: Denis Wang [mailto:[EMAIL PROTECTED]] Sent: Tuesday, December 10, 2002 10:26 AM To: Struts Users Mailing List Cc: [EMAIL PROTECTED] Subject: possible limited supports for inheritance in struts? Hello, all, Sorry for re-post. I believer this is a problem worthywhile of attention. I posted this message yesterday, but basically no answers. I have an ActionForm, which includes a field/getter/setter of subclass. The subclass inherits superField field/getter/setter from its superclass. In my JSP page, I try to access the superField. But it is complained no getter method for subclass.superField in the ActionForm. See p.s. for related codes. Does anybody have any clue? Is it a limitation of Struts, ActionForm or only the nested tags? Is it possibly caused by Real Time Type Identification/Reflection? Is it possibly caused by serializable? Thanks. Denis p.s. related codes 1) JSP: nested:form action='/myquestion' nested:nest property='scheduleVO' nested:text property='description'/ ... 2) ActionForm: ... private ScheduleVO scheduleVO; //The reference is in the type of ScheduleVO instead of ScheduleBean public ScheduleVO getScheduleVO() { return this.scheduleVO; } public void setScheduleVO(ScheduleVO scheduleVO) { this.scheduleVO = scheduleVO; } ... 3) ScheduleVO: public class ScheduleVO extends ScheduleBean { ... } 4) ScheduleBean, which is in the same package with ScheduleVO: class ScheduleBean implements Serializable {//the class is in the scope of package ... String description; // i tried both package/private level access modifiers public String getDescription() { return this.description; } public void setDescription(String description) { this.description = description; } . } p.s.2 In order to narrow down the problem, I did some comparision experiments: 1) Replace superField with subclassLocalField, which is a local filed in the subclass. Everything works fine. 2) Replace superField with superField2. Not working as expected. Be sure nothing related to typo. 3) Copy superField field/getter/setter from superclass into the subclass. Everything works fine. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
ExceptionInInitializerError
This question concerns both Struts and Oracle 9i Application Server. I have an application that uses Struts 1.0.2 It is developed and tested on JDeveloper (9.0.2) It is deployed to Oracle 9iAS (9.0.3) OC4J J2EE container The application runs correctly when deployed on JDeveloper's internal OC4J container. However, when I generate and deploy the .war file to an instance of OC4J running on 9iAS. I get this error: java.lang.ExceptionInInitializerError: java.lang.NullPointerException at org.apache.struts.util.MessageResources.getMessageResources(MessageResources.java:551) at org.apache.struts.taglib.html.HtmlTag.clinit(HtmlTag.java:94) at java.lang.Class.forName0(Native Method) I have checked that the struts.jar is present in WEB-INF/lib and that ApplicationResources.properties is in WEB-INF/classes. /** Gustavo C. Lopez Tetra Tech, Inc. 10306 Eaton Place, Suite 340 Fairfax, VA 22030 @Voice: (703) 385-6000 x335 @Fax: (703) 385-6007 @Email: [EMAIL PROTECTED] @Url: http://www.ttwater.com */ -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: JSTL x STRUTS bean display
All that does is change the way that the BEAN1_LIST attribute is located. In your example, it's effectively pageContext.findAttribute(BEAN1_LIST). In the original, it's request.getAttribute(BEAN1_LIST). Either should work just fine. I think the real problem is that item.Field1 and item.Field2 should use a lower-case f to reference the properties. Quoting Frank Renaers [EMAIL PROTECTED]: c:forEach var=item items=${BEAN1_LIST} c:out value=${item.Field1}/ c:out value=${item.Field2}/ /c:forEach -Original Message- From: Joao Araujo [mailto:[EMAIL PROTECTED]] Sent: dinsdag 10 december 2002 14:49 To: Struts Users Mailing List Subject: Re: JSTL x STRUTS bean display I have a arraylist containing a collection of beans, something like : List list = new ArrayList (); list.add(bean1_1); list.add(bean1_2); request.setAttribute (BEAN1_LIST, list); c:forEach var=item items=${requestScope.BEAN1_LIST} c:out value=${item.Field1}/ c:out value=${item.Field2}/ /c:forEach This does not work. I tried this before. Has to be something else. Joao, -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- Kris Schneider mailto:[EMAIL PROTECTED] D.O.Tech http://www.dotech.com/ -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: possible limited supports for inheritance in struts?
One more thing... Why is the ActionForm using type ScheduleVO instead of ScheduleBean? You may want to try returning ScheduleBean. Vinh -Original Message- From: Denis Wang [mailto:[EMAIL PROTECTED]] Sent: Tuesday, December 10, 2002 10:26 AM To: Struts Users Mailing List Cc: [EMAIL PROTECTED] Subject: possible limited supports for inheritance in struts? Hello, all, Sorry for re-post. I believer this is a problem worthywhile of attention. I posted this message yesterday, but basically no answers. I have an ActionForm, which includes a field/getter/setter of subclass. The subclass inherits superField field/getter/setter from its superclass. In my JSP page, I try to access the superField. But it is complained no getter method for subclass.superField in the ActionForm. See p.s. for related codes. Does anybody have any clue? Is it a limitation of Struts, ActionForm or only the nested tags? Is it possibly caused by Real Time Type Identification/Reflection? Is it possibly caused by serializable? Thanks. Denis p.s. related codes 1) JSP: nested:form action='/myquestion' nested:nest property='scheduleVO' nested:text property='description'/ ... 2) ActionForm: ... private ScheduleVO scheduleVO; //The reference is in the type of ScheduleVO instead of ScheduleBean public ScheduleVO getScheduleVO() { return this.scheduleVO; } public void setScheduleVO(ScheduleVO scheduleVO) { this.scheduleVO = scheduleVO; } ... 3) ScheduleVO: public class ScheduleVO extends ScheduleBean { ... } 4) ScheduleBean, which is in the same package with ScheduleVO: class ScheduleBean implements Serializable {//the class is in the scope of package ... String description; // i tried both package/private level access modifiers public String getDescription() { return this.description; } public void setDescription(String description) { this.description = description; } . } p.s.2 In order to narrow down the problem, I did some comparision experiments: 1) Replace superField with subclassLocalField, which is a local filed in the subclass. Everything works fine. 2) Replace superField with superField2. Not working as expected. Be sure nothing related to typo. 3) Copy superField field/getter/setter from superclass into the subclass. Everything works fine. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: possible limited supports for inheritance in struts?
Thanks for your reply. ActionForm needs access to ScheduleVO.subclassFields, which are not present in ScheduleBean. Would you please forward your jsp code, which does not use nested tage? Thanks. Denis -Original Message- From: Vinh Tran [mailto:[EMAIL PROTECTED]] Sent: Tuesday, December 10, 2002 11:55 AM To: Struts Users Mailing List Subject: RE: possible limited supports for inheritance in struts? One more thing... Why is the ActionForm using type ScheduleVO instead of ScheduleBean? You may want to try returning ScheduleBean. Vinh -Original Message- From: Denis Wang [mailto:[EMAIL PROTECTED]] Sent: Tuesday, December 10, 2002 10:26 AM To: Struts Users Mailing List Cc: [EMAIL PROTECTED] Subject: possible limited supports for inheritance in struts? Hello, all, Sorry for re-post. I believer this is a problem worthywhile of attention. I posted this message yesterday, but basically no answers. I have an ActionForm, which includes a field/getter/setter of subclass. The subclass inherits superField field/getter/setter from its superclass. In my JSP page, I try to access the superField. But it is complained no getter method for subclass.superField in the ActionForm. See p.s. for related codes. Does anybody have any clue? Is it a limitation of Struts, ActionForm or only the nested tags? Is it possibly caused by Real Time Type Identification/Reflection? Is it possibly caused by serializable? Thanks. Denis p.s. related codes 1) JSP: nested:form action='/myquestion' nested:nest property='scheduleVO' nested:text property='description'/ ... 2) ActionForm: ... private ScheduleVO scheduleVO; //The reference is in the type of ScheduleVO instead of ScheduleBean public ScheduleVO getScheduleVO() { return this.scheduleVO; } public void setScheduleVO(ScheduleVO scheduleVO) { this.scheduleVO = scheduleVO; } ... 3) ScheduleVO: public class ScheduleVO extends ScheduleBean { ... } 4) ScheduleBean, which is in the same package with ScheduleVO: class ScheduleBean implements Serializable {//the class is in the scope of package ... String description; // i tried both package/private level access modifiers public String getDescription() { return this.description; } public void setDescription(String description) { this.description = description; } . } p.s.2 In order to narrow down the problem, I did some comparision experiments: 1) Replace superField with subclassLocalField, which is a local filed in the subclass. Everything works fine. 2) Replace superField with superField2. Not working as expected. Be sure nothing related to typo. 3) Copy superField field/getter/setter from superclass into the subclass. Everything works fine. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Prepopulating DynaActionForm which has an indexed property
Hi, How can I prepopulate an DynaValidator/DynaAction form which has an indexed property? this is my form definition form-bean name=myForm type=org.apache.struts.action.DynaActionForm dynamic=true form-property name=firstName type=java.lang.string[]/ form-property name=companyID type=java.lang.string/ /form-bean Action class: DynaBean newForm = DynaActionFormClass.getDynaActionFormClass(myForm).newInstance (); for (int i= 0; i employee.numberofPersons() ; ++ i) newForm.set(firstName, i , employee.firstName(); newForm.set(companyID, 12345); request.setAttribute(InfoForm, newForm); The code breaks because it does not know the size of the firstName[] indexed property. I could have done this by using an initial property and set the size but the size changes dynamically. How can I set the size of the firstName property in the action class code (just before populating the property) TIA, srinivas _ Protect your PC - get McAfee.com VirusScan Online http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963 -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Loosing form data when chaining actions
ROSSEL Olivier wrote: Hi, I defined 2 actions in session scope referring the same form. The first action sets some properties in the form and then forwards the request to the second action. The second action sets some more properties and then forwards to a JSP page which contains the html form. The problem is only the data set by the last action remains... This makes me think the form-bean is not shared between actions. I understand this can be desired behaviour. Any insight would be appreciated. thanks! This is exactly why action chaining is not recommended. When you forward from one action to another, the effect is as if a new request has been made. As a result, Struts will call the form bean's reset() method, and then the form bean will be repopulated from the request parameters. Any changes made to the form bean will be lost. Please note that this is not a Struts-related issue. This behaviour is well defined by the Java Servlets spec. This is still a trouble to me to read that, and then try to understand how forms-on-multiple-pages are handled. Anyway, what's the work to add a reset=on/off attribute to the action-mapping to control the reset call ? Would it be a major change? This e-mail is intended only for the above addressee. It may contain privileged information. If you are not the addressee you must not copy, distribute, disclose or use any of the information in it. If you have received it in error please delete it and immediately notify the sender. Security Notice: all e-mail, sent to or from this address, may be accessed by someone other than the recipient, for system management and security reasons. This access is controlled under Regulation of Investigatory Powers Act 2000, Lawful Business Practises. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] I think you might be confused as to how a forward is handled within the framework. If you look at it from a high level: using your own configuration (whatever it is): http-request - Container - Struts - [your action class] (returns success) / Struts -' (calls forward /whatever.do) / Container -' | `- Struts - [your action class] You can see how Struts doesn't know that the forward was not a new request. HTH -- James Mitchell -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: possible limited supports for inheritance in struts?
There is nothing magical about the JSP but below is an excerpt. Just so you know I return the type of the base class and I access the fields in my subclass just fine. Iterate through a collection of myVO objects... bean:define id=mymap name=myclass property=myMap/ logic:iterate id=vo name=mymap property=myVO bean:write name=vo property=subclassField/ bean:write name=vo property=baseclassField/ /logic:iterate -Original Message- From: Denis Wang [mailto:[EMAIL PROTECTED]] Sent: Tuesday, December 10, 2002 12:01 PM To: Struts Users Mailing List; [EMAIL PROTECTED] Subject: RE: possible limited supports for inheritance in struts? Thanks for your reply. ActionForm needs access to ScheduleVO.subclassFields, which are not present in ScheduleBean. Would you please forward your jsp code, which does not use nested tage? Thanks. Denis -Original Message- From: Vinh Tran [mailto:[EMAIL PROTECTED]] Sent: Tuesday, December 10, 2002 11:55 AM To: Struts Users Mailing List Subject: RE: possible limited supports for inheritance in struts? One more thing... Why is the ActionForm using type ScheduleVO instead of ScheduleBean? You may want to try returning ScheduleBean. Vinh -Original Message- From: Denis Wang [mailto:[EMAIL PROTECTED]] Sent: Tuesday, December 10, 2002 10:26 AM To: Struts Users Mailing List Cc: [EMAIL PROTECTED] Subject: possible limited supports for inheritance in struts? Hello, all, Sorry for re-post. I believer this is a problem worthywhile of attention. I posted this message yesterday, but basically no answers. I have an ActionForm, which includes a field/getter/setter of subclass. The subclass inherits superField field/getter/setter from its superclass. In my JSP page, I try to access the superField. But it is complained no getter method for subclass.superField in the ActionForm. See p.s. for related codes. Does anybody have any clue? Is it a limitation of Struts, ActionForm or only the nested tags? Is it possibly caused by Real Time Type Identification/Reflection? Is it possibly caused by serializable? Thanks. Denis p.s. related codes 1) JSP: nested:form action='/myquestion' nested:nest property='scheduleVO' nested:text property='description'/ ... 2) ActionForm: ... private ScheduleVO scheduleVO; //The reference is in the type of ScheduleVO instead of ScheduleBean public ScheduleVO getScheduleVO() { return this.scheduleVO; } public void setScheduleVO(ScheduleVO scheduleVO) { this.scheduleVO = scheduleVO; } ... 3) ScheduleVO: public class ScheduleVO extends ScheduleBean { ... } 4) ScheduleBean, which is in the same package with ScheduleVO: class ScheduleBean implements Serializable {//the class is in the scope of package ... String description; // i tried both package/private level access modifiers public String getDescription() { return this.description; } public void setDescription(String description) { this.description = description; } . } p.s.2 In order to narrow down the problem, I did some comparision experiments: 1) Replace superField with subclassLocalField, which is a local filed in the subclass. Everything works fine. 2) Replace superField with superField2. Not working as expected. Be sure nothing related to typo. 3) Copy superField field/getter/setter from superclass into the subclass. Everything works fine. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Using the key of a HashMap in an html:option tag ?
have you tried this? html:option name=element value=key -Original Message- From: Rick Reumann [mailto:[EMAIL PROTECTED]] Sent: Tuesday, December 10, 2002 12:26 PM To: Struts List Subject: Using the key of a HashMap in an html:option tag ? I have a case where I'm getting returned a HashMap that has an id as the key and an EmployeeBean as the value. For now I'm trying to get a select box with the options created from this map and the key is the value. The only part I'm having trouble with is using the key as the value of the option tag: html:select styleClass=field property=assignedTo logic:iterate id=element name=employees html:option value=%= key value here ??? % bean:write name=element property=value.firstName/ bean:write name=element property=value.lastName/ /html:option /logic:iterate /html:select I can't use the simple method of html:options collection=employees property=key labelProperty=value/ Since the value in this case is a bean and I need to make the value from two of it's properties. I've tried all different ways to get a handle to the key but am having no luck the way I set it up. What am I doing wrong? Thanks, -- Rick mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Loosing form data when chaining actions
I have encountered this problem before. Try this: Within your first Action set the get the values that are not being passed from the request object. Then before forwarding to the next Action set these values explicitly in the request objects attributes. -Original Message- From: ROSSEL Olivier [mailto:[EMAIL PROTECTED]] Sent: Tuesday, December 10, 2002 12:43 PM To: 'Struts Users Mailing List' Subject: RE: Loosing form data when chaining actions Hi, I defined 2 actions in session scope referring the same form. The first action sets some properties in the form and then forwards the request to the second action. The second action sets some more properties and then forwards to a JSP page which contains the html form. The problem is only the data set by the last action remains... This makes me think the form-bean is not shared between actions. I understand this can be desired behaviour. Any insight would be appreciated. thanks! This is exactly why action chaining is not recommended. When you forward from one action to another, the effect is as if a new request has been made. As a result, Struts will call the form bean's reset() method, and then the form bean will be repopulated from the request parameters. Any changes made to the form bean will be lost. Please note that this is not a Struts-related issue. This behaviour is well defined by the Java Servlets spec. This is still a trouble to me to read that, and then try to understand how forms-on-multiple-pages are handled. Anyway, what's the work to add a reset=on/off attribute to the action-mapping to control the reset call ? Would it be a major change? This e-mail is intended only for the above addressee. It may contain privileged information. If you are not the addressee you must not copy, distribute, disclose or use any of the information in it. If you have received it in error please delete it and immediately notify the sender. Security Notice: all e-mail, sent to or from this address, may be accessed by someone other than the recipient, for system management and security reasons. This access is controlled under Regulation of Investigatory Powers Act 2000, Lawful Business Practises. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] I think you might be confused as to how a forward is handled within the framework. If you look at it from a high level: using your own configuration (whatever it is): http-request - Container - Struts - [your action class] (returns success) / Struts -' (calls forward /whatever.do) / Container -' | `- Struts - [your action class] You can see how Struts doesn't know that the forward was not a new request. It does not know so it ALWAYS reset(). Well, how do you handle a 2-pages form ? action path=/One form=foobar validate=true input=One.jsp forward path=/Two.do/ /action action path=/Two form=foobar validate=true input=Two.jsp forward path=/Success.do/ /action action path=/Populate forward path=/One/ /action One.jsp ... html:form action=/Populate ... Two.jsp ... html:form action=/Populate ... ? If it reset() all the time, you will always stop at One.do ... I would have prefered to disable reset() for those actions. This e-mail is intended only for the above addressee. It may contain privileged information. If you are not the addressee you must not copy, distribute, disclose or use any of the information in it. If you have received it in error please delete it and immediately notify the sender. Security Notice: all e-mail, sent to or from this address, may be accessed by someone other than the recipient, for system management and security reasons. This access is controlled under Regulation of Investigatory Powers Act 2000, Lawful Business Practises. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Loosing form data when chaining actions
I have encountered this problem before. Try this: Within your first Action set the get the values that are not being passed from the request object. Then before forwarding to the next Action set these values explicitly in the request objects attributes. My current method is to use a subclass of Form with a programmable reset(). In my action, I either enable the reset() (via a togglable boolean inside the FormBean) or disable it. It is something very near the reset=on/off in the struts-config.xml I discussed earlier. This e-mail is intended only for the above addressee. It may contain privileged information. If you are not the addressee you must not copy, distribute, disclose or use any of the information in it. If you have received it in error please delete it and immediately notify the sender. Security Notice: all e-mail, sent to or from this address, may be accessed by someone other than the recipient, for system management and security reasons. This access is controlled under Regulation of Investigatory Powers Act 2000, Lawful Business Practises. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: JSTL x STRUTS bean display
All that does is change the way that the BEAN1_LIST attribute is located. In your example, it's effectively pageContext.findAttribute(BEAN1_LIST). In the original, it's request.getAttribute(BEAN1_LIST). Either should work just fine. I think the real problem is that item.Field1 and item.Field2 should use a lower-case f to reference the properties. Thank you. Working. Quoting Frank Renaers [EMAIL PROTECTED]: c:forEach var=item items=${BEAN1_LIST} c:out value=${item.Field1}/ c:out value=${item.Field2}/ /c:forEach -Original Message- From: Joao Araujo [mailto:[EMAIL PROTECTED]] Sent: dinsdag 10 december 2002 14:49 To: Struts Users Mailing List Subject: Re: JSTL x STRUTS bean display I have a arraylist containing a collection of beans, something like : List list = new ArrayList (); list.add(bean1_1); list.add(bean1_2); request.setAttribute (BEAN1_LIST, list); c:forEach var=item items=${requestScope.BEAN1_LIST} c:out value=${item.Field1}/ c:out value=${item.Field2}/ /c:forEach This does not work. I tried this before. Has to be something else. Joao, -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- Kris Schneider mailto:[EMAIL PROTECTED] D.O.Tech http://www.dotech.com/ -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: possible limited supports for inheritance in struts?
Cool!!! This is the solution to this problme. Thanks a lot for Sri and all people trying to help. I always find this mailing list amazingly helpful. Denis -Original Message- From: Sri Sankaran [mailto:[EMAIL PROTECTED]] Sent: Tuesday, December 10, 2002 1:19 PM To: Struts Users Mailing List Subject: RE: possible limited supports for inheritance in struts? The problem has to do with the fact that ScheduleBean has package-level visibility. I am sure if you dig through the JavaBeans spec it'll warn you against that. I was able to reproduce your reported error when the parent class has package-level visibility. However, when the class is made public, there are no errors. BTW -- You'll see the same behavior even with the html:text -- I've checked it out. Sri -Original Message- From: Denis Wang [mailto:[EMAIL PROTECTED]] Sent: Tuesday, December 10, 2002 10:26 AM To: Struts Users Mailing List Cc: [EMAIL PROTECTED] Subject: possible limited supports for inheritance in struts? Hello, all, Sorry for re-post. I believer this is a problem worthywhile of attention. I posted this message yesterday, but basically no answers. I have an ActionForm, which includes a field/getter/setter of subclass. The subclass inherits superField field/getter/setter from its superclass. In my JSP page, I try to access the superField. But it is complained no getter method for subclass.superField in the ActionForm. See p.s. for related codes. Does anybody have any clue? Is it a limitation of Struts, ActionForm or only the nested tags? Is it possibly caused by Real Time Type Identification/Reflection? Is it possibly caused by serializable? Thanks. Denis p.s. related codes 1) JSP: nested:form action='/myquestion' nested:nest property='scheduleVO' nested:text property='description'/ ... 2) ActionForm: ... private ScheduleVO scheduleVO; //The reference is in the type of ScheduleVO instead of ScheduleBean public ScheduleVO getScheduleVO() { return this.scheduleVO; } public void setScheduleVO(ScheduleVO scheduleVO) { this.scheduleVO = scheduleVO; } ... 3) ScheduleVO: public class ScheduleVO extends ScheduleBean { ... } 4) ScheduleBean, which is in the same package with ScheduleVO: class ScheduleBean implements Serializable {//the class is in the scope of package ... String description; // i tried both package/private level access modifiers public String getDescription() { return this.description; } public void setDescription(String description) { this.description = description; } . } p.s.2 In order to narrow down the problem, I did some comparision experiments: 1) Replace superField with subclassLocalField, which is a local filed in the subclass. Everything works fine. 2) Replace superField with superField2. Not working as expected. Be sure nothing related to typo. 3) Copy superField field/getter/setter from superclass into the subclass. Everything works fine. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re[2]: Using the key of a HashMap in an html:option tag ?
On Tuesday, December 10, 2002, 12:39:26 PM, Vinh wrote: VT have you tried this? VT html:option name=element value=key Tried that, but name is an invalid attribute of html:option. I must be missing something simple here. There has to be a way to get the value of the key set as the option value property. Thanks, -- Rick mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Struts SLL extension - Really lost
Sounds like you are missing this line in the struts-config.xml (just before all the action definitions): action-mappings type=org.apache.struts.config.SecureActionConfig Once you add that, the ClassCastException should go away. If you have any more problems, let me know. Steve -Original Message- From: Steve Vanspall [mailto:[EMAIL PROTECTED]] Sent: Monday, December 09, 2002 7:20 PM To: Ditlinger, Steve Subject: RE: Struts SLL extension - Really lost Hi there, Thanks for your reply. I i remove the pageScheme tag and comment out all the set-property tags in struts-config.xml, the same thing happens. I have pinpointed the problem, in think. the following line throws a ClassCastException SecureActionConfig secureMapping = (SecureActionConfig)appConfig.findActionConfig(linkTo); does this help? -Original Message- From: Ditlinger, Steve [mailto:[EMAIL PROTECTED]] Sent: Tuesday, 10 December 2002 1:47 PM To: '[EMAIL PROTECTED]' Cc: Cooper,Max Subject: FW: Struts SLL extension - Really lost Hi Steve: Sorry to hear you are having trouble. Let's go one step at a time, brother. What happens if you remove the pageScheme tag from the login.jsp? If it works now, maybe you are losing request parameters. If you remove the all of the secure settings from the struts-config.xml, does the app work? If so, perhaps there is a problem with the struts-config. Without the pageScheme and the secure parameters set, the app is essentially unchanged logically from your original app. Let me know what happens. We'll figure this out. Steve -Original Message- From: Max Cooper [mailto:[EMAIL PROTECTED]] Sent: Monday, December 09, 2002 6:12 PM To: Ditlinger, Steve Subject: Fw: Struts SLL extension - Really lost Forwarded by me to you, from the struts-user list... - Original Message - From: Steve Vanspall [EMAIL PROTECTED] To: Struts User Mailing List [EMAIL PROTECTED] Sent: Monday, December 09, 2002 5:36 PM Subject: Struts SLL extension - Really lost Hi there, I have installed the Struts/SSL Extension for strits 1.1-b2. I am running Tomcat 4.1.12 I have set up the server.xml, by uncommenting the SSL information. I have also done the keytool command at the command prompt. I have edited my action, so that, for now sercure is set to true. I have edited my login page so that it has the page the pageSheme tag with security set to true. I have also edited the form tags to be secure form tags. Basically, how my app works, is that every page has a checkLogin Tag. if no-one is loogedd in, it returns SKIP_PAGE and does pageContext.forward(login.jsp); with the exception of the tag changes, this is exactly how my code was before. Now it doesn't work. The app throws a JasperException without any kind of message included. Can anyone guide me through this problem? Thanks in advance Steve -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Application Modules and Path Prefix Mapping: eventually/already s upported?
From: Gemes Tibor [mailto:[EMAIL PROTECTED]] 2002. december 10. 16:29 dátummal Bill Tomlinson ezt írtad: In all the things I've read about the new application modules feature in 1.1, there is always a caveat like this only works with extention mapping (*.do) not path prefix mapping (/do/*). I reckon you wouldn't be able to make difference wheter it is a prefix mapping or a module reference in case of using modules. Yes, Tib, I do appreciate the technical reasons for intially supporting only extension mapping (difficulty in differentiating between prefix map and module name). However, these technical reasons can be overcome. What I was trying to get was an indication whether someone was planning to tackle this problem before the 1.1 final release. I'm looking for this information so that I can plan the 1.1 upgrade of my application. (if someone is adding module path prefix support then I can use modules, if not then I have three choices: 1. no modules 2. convert application to extension mapping or 3. try to fix the problem myself) -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Lists, actions and links
Vellosa I think i understand what you're saying here, but when you have a jsp with the iterate tags in do you (a) link to the jsp or (b) call an action that forwards to the page with the iterate tags in? However what you were saying about having one db access object and passing that back... Passing it directly back to the jsp or via an action servlet? I've done this via an action servlet to prevent site builders having to get involved with instantiating beans (with useBean or otherwise), i'd be happier about using the struts bean tags for this but have only got this working using the standard jsp tags. One of my largest constraints is providing a consistant api for front end developers (i cant mix and match tags). Cheers mark On 9-12-2002 11:41, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: The way I would do this would be to have a Data Access Object (DAO) class that does your database access. The method would return a collection of Value Object. This collection can be passed back to your page, then you can use the iterator tag to work through the list. from:Mark [EMAIL PROTECTED] date:Mon, 09 Dec 2002 10:23:55 to: [EMAIL PROTECTED] subject: Re: Lists, actions and links Hello I've having trouble working out which is the best way of iterating though a result set , I can and have done this is several ways. 1. Imagine i have a class that querys a db and returns a result set. I pass the result set as a datastructure to my action class and all is well .. But I have to call the action to produce the list on my page. E.g. MyModelClassThatAsksTheDBForResults ListJismAction have an action listjism.do and link to this 2. or I have a bean that gets the resultset, via another class or in the bean, I instantiate the bean using the useBean jsp syntax and then iterate through using the gets defined in my bean. I don't have to have a list action, but there's something that smells about this (i'm not sure what). E.g. ListJismBean and have a normal link to listjism.jsp that uses a mix of standard jsp and struts. I know that the later is probably faster, but I'm not worried about that. I'll worry about that once my app all works (albeit slowly). An additional question is should i be only calling actions for every page or not, i read different views on this which has confused me. It seems that centralising all the links in action that can be adminstered from config.xml would only be more maintainable if and only if everything is in there. Many thanks in advance mark -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] http://www.amazon.co.uk/exec/obidos/redirect-home?tag=velloscouk-21placement= home_multi.gifsite=amazon -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Using the key of a HashMap in an html:option tag ?
Maybe something like this: html:select styleClass=field property=assignedTo logic:iterate id=element name=employees html:option value=%= element.getKey() % bean:write name=element property=value.firstName/ bean:write name=element property=value.lastName/ /html:option /logic:iterate /html:select You may have to cast element: %= ((java.util.Map.Entry)element).getKey() % Can't recall if you can directly access element in a JSP expression, so if not, try: %= ((java.util.Map.Entry)pageContext.getAttribute('element')).getKey() % Quoting Rick Reumann [EMAIL PROTECTED]: I have a case where I'm getting returned a HashMap that has an id as the key and an EmployeeBean as the value. For now I'm trying to get a select box with the options created from this map and the key is the value. The only part I'm having trouble with is using the key as the value of the option tag: html:select styleClass=field property=assignedTo logic:iterate id=element name=employees html:option value=%= key value here ??? % bean:write name=element property=value.firstName/ bean:write name=element property=value.lastName/ /html:option /logic:iterate /html:select I can't use the simple method of html:options collection=employees property=key labelProperty=value/ Since the value in this case is a bean and I need to make the value from two of it's properties. I've tried all different ways to get a handle to the key but am having no luck the way I set it up. What am I doing wrong? Thanks, -- Rick mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- Kris Schneider mailto:[EMAIL PROTECTED] D.O.Tech http://www.dotech.com/ -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Help! Need Struts-El Library Compatible With Struts 1.1 B2
Hohlen, John wrote: P.S. If anyone has the 11/7 release of Struts-EL, I'd love it if they could send it to me. http://www.maz.org/struts/ -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Application Modules and Path Prefix Mapping: eventually/already s upported?
AFAIK, no one is working on adding the prefix mapping module support for 1.1. If you find a way to implement it without breaking backwards compatibility, the Struts team would be delighted to see the patch. David From: Bill Tomlinson [EMAIL PROTECTED] Reply-To: Struts Users Mailing List [EMAIL PROTECTED] To: 'Struts Users Mailing List' [EMAIL PROTECTED] Subject: RE: Application Modules and Path Prefix Mapping: eventually/already s upported? Date: Tue, 10 Dec 2002 14:09:08 -0500 From: Gemes Tibor [mailto:[EMAIL PROTECTED]] 2002. december 10. 16:29 dátummal Bill Tomlinson ezt írtad: In all the things I've read about the new application modules feature in 1.1, there is always a caveat like this only works with extention mapping (*.do) not path prefix mapping (/do/*). I reckon you wouldn't be able to make difference wheter it is a prefix mapping or a module reference in case of using modules. Yes, Tib, I do appreciate the technical reasons for intially supporting only extension mapping (difficulty in differentiating between prefix map and module name). However, these technical reasons can be overcome. What I was trying to get was an indication whether someone was planning to tackle this problem before the 1.1 final release. I'm looking for this information so that I can plan the 1.1 upgrade of my application. (if someone is adding module path prefix support then I can use modules, if not then I have three choices: 1. no modules 2. convert application to extension mapping or 3. try to fix the problem myself) -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] _ MSN 8 helps eliminate e-mail viruses. Get 2 months FREE*. http://join.msn.com/?page=features/virus -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Form Bean with Lists client updates
I have a form bean with an List(i.e. Lines) of Value Objects with the normal get/set method for the List only. Every thing works fine when i display the data to the client. I have some thing like this: - Form Bean - public class myForm extends ActionForm { private List lines = null; public List getLines() { return lines; } public void setLines(List lines){ this.lines= lines; } } -- JSP Source -- logic:iterate name=myForm property=lines id=line tr tdhtml:text name=line property=firstName size=10 maxlength=15//td My problem is trying to retrieve user changes when the form is submitted the variable firstName in my VO is null when it should contain the users in put. I guess i need to add extra methods to the form bean in order to populate my VO's correctly if so what format should they be?? _ Protect your PC - get McAfee.com VirusScan Online http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963 -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Form Bean with Lists client updates
Hi Pat, With the way you're using the html:text tag, you would need a getter and setter for firstName if you're using a regular ActionForm. You might want to try using a Map-backed (or List-backed) ActionForm to do your sets and gets. Take a look at this - I think the examples make usage pretty clear: http://jakarta.apache.org/struts/userGuide/building_controller.html#map_acti on_form_classes Justin - Original Message - From: Pat Quinn [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, December 10, 2002 3:04 PM Subject: Form Bean with Lists client updates I have a form bean with an List(i.e. Lines) of Value Objects with the normal get/set method for the List only. Every thing works fine when i display the data to the client. I have some thing like this: - Form Bean - public class myForm extends ActionForm { private List lines = null; public List getLines() { return lines; } public void setLines(List lines){ this.lines= lines; } } -- JSP Source -- logic:iterate name=myForm property=lines id=line tr tdhtml:text name=line property=firstName size=10 maxlength=15//td My problem is trying to retrieve user changes when the form is submitted the variable firstName in my VO is null when it should contain the users in put. I guess i need to add extra methods to the form bean in order to populate my VO's correctly if so what format should they be?? _ Protect your PC - get McAfee.com VirusScan Online http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963 -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re[2]: Using the key of a HashMap in an html:option tag ?
On Tuesday, December 10, 2002, 2:21:36 PM, Kris wrote: KS You may have to cast element: KS %= ((java.util.Map.Entry)element).getKey() % Thanks Kris! Yes that's exactly what I had to do (mostly). I say mostly, because so many times I've been bitten in the butt by this and I'm not sure why it works this way but... for some reason I often can't just use the scriplet: %= to force a String conversion, when inside of a tag. I forget I have to do: % String.valueOf( ) %. So in the above I think I tried something like you mentioned but then realized it only works for me when I do: value=% String.valueOf( ((java.util.Map.Entry)element).getKey() ) % Appreciate you coming up with the solution. I was pulling my hair out over this. -- Rick mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: struts-blank: A strange problem
Hello, The application.properties file is in the wrong directory in the 1.1b2 distribution. Move it from /WEB-INF/java/resources to /WEB-INF/resources. Jonas -Original Message- From: BERTINO FULVIO [mailto:[EMAIL PROTECTED]] Sent: den 10 december 2002 08:51 To: '[EMAIL PROTECTED]' Subject: struts-blank: A strange problem Copying the struts-blank.war file in the webapps folder of a just installed version of tomcat 4.0.6 or 4.1.12, I've found the following message: -- exception org.apache.jasper.JasperException: Missing message for key welcome.title at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java :248) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:289) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:240) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatche r.java:684) at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispat cher.java:432) at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatch er.java:356) at org.apache.struts.actions.ForwardAction.execute(ForwardAction.java:158) at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProc essor.java:446) at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:26 6) at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1292) at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:492) at javax.servlet.http.HttpServlet.service(HttpServlet.java:740) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applicati onFilterChain.java:247) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilter Chain.java:193) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve. java:260) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.inv okeNext(StandardPipeline.java:643) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480 ) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve. java:191) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.inv okeNext(StandardPipeline.java:643) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480 ) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2396) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:1 80) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.inv okeNext(StandardPipeline.java:643) at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValv e.java:170) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.inv okeNext(StandardPipeline.java:641) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:1 72) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.inv okeNext(StandardPipeline.java:641) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480 ) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.ja va:174) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.inv okeNext(StandardPipeline.java:643) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480 ) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:223) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:405) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processCon nection(Http11Protocol.java:380) at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:508) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.j ava:533) at java.lang.Thread.run(Thread.java:536) root cause javax.servlet.ServletException: Missing message for key welcome.title at org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextI mpl.java:494) at org.apache.jsp.Welcome_jsp._jspService(Welcome_jsp.java:70) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:136) at
Attribute rtexprvalues
Hi, This is really more of a JSP question, but I'm sure somebody here has a quick answer. I am using the bean:write tag to write a property from a Map-backed ActionForm. The Map in my Actionform is called profile and I have that set up properly. However, it seems as though the property attribute in bean:write doesn't like expressions embedded within a String. The following fails: bean:write name=profileActionForm property=profile(%=ProfileMetaData.ID%)/ while the following works: bean:write name=profileActionForm property=profile(ID)/ In this example, ProfileMetaData.ID = ID so both lines should evaluate to the same thing. I am using a nightly build from a couple days ago, and the struts-bean.tld indicates that rtexprvalue=true for bean:write's property attribute. Does rtexprvalue=true only allow me to have property=%=expr%, but not property=profile(%=expr%)? If this is the case, it seems like a shortcoming in JSP. If somebody has a quick way to do what I'm trying to do, I would appreciate the help. Thanks, Justin -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Re: Best Practices for Logging?
At 10:03 AM 12/10/2002 +0100, you wrote: I had not checked this.Had taken what log4j documentation says about performance verbatim... BTW,I didnt get your comment about ** In particular, under a Tag library for Tomcat 4.0.X [where tags are not reused] * Are the tags reused on other servers? And what do u mean by reused?Do u mean Tag instance or something? Thanks for asking for a clarification. Yes, I mean Tag instances. Tomcat 4.1 reuses Tag instances, as does Resin and others. It significantly improves performance on jsp display by reducing the number of objects created when the page displays. My understanding of Tags is that they are like handlers...So the compiled servlet for jsp calls this handlers various methods on tag when it comes across the tag. True... but each Tag is also a class instance, and thefore it is up to the container to either create a new one for each use, or reuse existing objects. Hope this clarifies things! -Mike -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Attribute rtexprvalues
You've already figured out most of it. If you use an rtexprvalue, the entire value needs to be an rtexprvalue, not just a portion. If you use the JSTL, or Struts-EL (or anything that uses the JSTL EL engine for attribute values), then this sort of thing gets easier to do, as you can easily have a portion of the attribute value calling the EL engine. You can even have multiple calls in an attribute value (although not nested). -Original Message- From: Justin Ashworth [mailto:[EMAIL PROTECTED]] Hi, This is really more of a JSP question, but I'm sure somebody here has a quick answer. I am using the bean:write tag to write a property from a Map-backed ActionForm. The Map in my Actionform is called profile and I have that set up properly. However, it seems as though the property attribute in bean:write doesn't like expressions embedded within a String. The following fails: bean:write name=profileActionForm property=profile(%=ProfileMetaData.ID%)/ while the following works: bean:write name=profileActionForm property=profile(ID)/ In this example, ProfileMetaData.ID = ID so both lines should evaluate to the same thing. I am using a nightly build from a couple days ago, and the struts-bean.tld indicates that rtexprvalue=true for bean:write's property attribute. Does rtexprvalue=true only allow me to have property=%=expr%, but not property=profile(%=expr%)? If this is the case, it seems like a shortcoming in JSP. If somebody has a quick way to do what I'm trying to do, I would appreciate the help. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Best Practices for Logging?
Hi Matt, At 10:12 PM 12/9/2002 +, you wrote: Thanks for all the responses on this topic, now another question: What is the recommended method of configuring logging for a particular class: private Log log = LogFactory.getLog(getClass().getName()); or private Log log = LogFactory.getLog(className.class); Part of it depends on your object instance. If you use static Log instances, then option #2 is the only way to go. However, #1 has an interesting problem once you extend a base class. If you use it then any logging that would normally appear in the base class category will appear only in the subclass. So you loose the log4j ability to turn on only certain categories if you so wish. [At least that's how I view it myself] So I would tend to go with #2 anyway. HTH! -Mike -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Tiles tabsLayout stopped working with struts 1.1?
Hi, The Tiles tabsLayout no longer works after I migrated my code to struts 1.1 from struts 1.0 and the separate Tiles download. I also tried the examples in the tiles-documentation war that comes as part of the struts 1.1-b2 and was getting exactly the same problem. The error I am getting is [ServletException in:/common/tabsLayout.jsp] null'. See below for more info on this problem. Does someone know a solution to this problem? Thanks Lee // My jsp: tiles:insert definition=classic flush=true tiles:put name=header value=div class=pagehdrCustomer/div / tiles:put name=body value=customer.showCustomerInfo / /tiles:insert The customer.showCustomerInfo is a tile definition in my tiles-def.xml: !-- tabs page -- definition name=customer.showCustomerInfo path=/common/tabsLayout.jsp put name=selectedIndex value=0 / put name=parameterName value=selected / put name=header value=Customer / putList name=tabList item value=General link=/customer/generalCustomerInfo.jsp classtype=org.apache.struts.tiles.beans.SimpleMenuItem / item value=Services link=/customer/customerInstalledServices.jsp classtype=org.apache.struts.tiles.beans.SimpleMenuItem / /putList /definition The error is caused by the following line in the tabsLayout.jsp because the tabList is null: if( selectedIndex 0 || selectedIndex = tabList.size() ) selectedIndex = 0; -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
html-el styleId error with 12/7 Nightly Build
I'm using the 12/7/02 nightly build and have encountered the following error in my JSP: Error in using tag library uri='/WEB-INF/struts-html-el.tld' prefix='html-el': The Tag class 'org.apache.strutsel.taglib.html.ELImageTag' has no setter method corresponding to TLD declared attribute 'styleId', (JSP 1.1 spec, 5.4.1) If the ElImage tag should inherit the styleId attribute via the following inheritance hiearchy: BaseHandlerTag (public declaration of styleId) | SubmitTag | ImageTag (from Struts) | ElImageTag Any thoughts on what my problem could? It looks like there were some related problems last week: http://www.mail-archive.com/struts-user@jakarta.apache.org/msg50692.html Thanks, JOHN -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Getting MessageResources from a ActionForm
Hi, I would like to get a MessageResoure from an ActionForm. I thought of calling servlet.getResources() but according to the documentation this method is deprected. I want to use the ActionForm to populate a select with values from my ApplicationResources. I have seen the select example and know that I can do it from the JSP but I would like to set the values from an ActionForm. I am currently setting the values from the ActionForm but the values are hard coded in the ActionForm and I would like to be able to get them from the ApplicationResources. If anyone knows how I can do this without calling a deprecated method it would be appreciated. Thanks Jim. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Re[2]: Using the key of a HashMap in an html:option tag ?
Rick, Glad it's working, but I don't understand why you'd have a problem with the JSP expression. IIRC, it's equivalent to the following code getting generated within the page's _jspService method: // out is a javax.servlet.jsp.JspWriter instance out.print( ((java.util.Map.Entry)element).getKey() ); Which, for an Obect argument to the print method, JspWriter treats as: String s = String.valueOf( ((java.util.Map.Entry)element).getKey() ); byte[] buffer = s.getBytes(); for (int i = 0, n = buffer.length; i n; i++) { out.write(buffer[i]); } Quoting Rick Reumann [EMAIL PROTECTED]: On Tuesday, December 10, 2002, 2:21:36 PM, Kris wrote: KS You may have to cast element: KS %= ((java.util.Map.Entry)element).getKey() % Thanks Kris! Yes that's exactly what I had to do (mostly). I say mostly, because so many times I've been bitten in the butt by this and I'm not sure why it works this way but... for some reason I often can't just use the scriplet: %= to force a String conversion, when inside of a tag. I forget I have to do: % String.valueOf( ) %. So in the above I think I tried something like you mentioned but then realized it only works for me when I do: value=% String.valueOf( ((java.util.Map.Entry)element).getKey() ) % Appreciate you coming up with the solution. I was pulling my hair out over this. -- Rick mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- Kris Schneider mailto:[EMAIL PROTECTED] D.O.Tech http://www.dotech.com/ -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Getting MessageResources from a ActionForm
Hey Jim, I remember asking the same question. The basic answer is to populate those selections in the action. Pain in the butt eh? Darren. -Original Message- From: Jim Collins [mailto:[EMAIL PROTECTED]] Sent: December 10, 2002 4:50 PM To: Struts Users Mailing List Subject: Getting MessageResources from a ActionForm Hi, I would like to get a MessageResoure from an ActionForm. I thought of calling servlet.getResources() but according to the documentation this method is deprected. I want to use the ActionForm to populate a select with values from my ApplicationResources. I have seen the select example and know that I can do it from the JSP but I would like to set the values from an ActionForm. I am currently setting the values from the ActionForm but the values are hard coded in the ActionForm and I would like to be able to get them from the ApplicationResources. If anyone knows how I can do this without calling a deprecated method it would be appreciated. Thanks Jim. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Dynamic URL's and Actions
I have code that generates a navigation bar based on a particular user's set of permissions. The user logs in, the menu is retrieved into a list, and the user gets a welcome page with the menu options. All of that works fine and dandy. The problem is when I actually try to go someplace from the generated navigation bar. I get this error: The requested resource (/Application/MenuItem1) is not available. I don't understand why I'm getting this message. The generated html code looks something like this: a href=http://localhost:8080/Application/MenuItem1.do;MenuItem1/a a href=http://localhost:8080/Application/MenuItem2.do;MenuItem2/a a href=http://localhost:8080/Application/MenuItem3.do;MenuItem3/a The code to generate the above looks like this: logic:present name=navBar logic:iterate id=curLevel name=navBar html:link page='/bean:write name=curLevel property=link /' bean:write name=curLevel property=description / /html:link and so forth My struts config looks like this: action path=/login type=foo.actions.loginAction name=loginForm scope=request validate = true input=/index.jsp forward name=success path=/welcome.do/ forward name=failure path=/login.jsp/ /action actionpath=/welcome type=foo.actions.RetrieveMenuItems name=loginForm scope=request validate = true forward name=success path=/welcome.jsp/ forward name=failure path=/index.jsp/ /action action path=MenuItem1 type=foo.actions.RetrieveMenuItems name=loginForm scope=request validate = true parameter=permissions forward name=success path=/somewhere.do/ forward name=failure path=/index.jsp/ /action Any suggestions as to what I'm doing wrong? I don't seem to find anything similar to what I'm trying to do, but I have to imagine there are plenty of other folks doing this. Suggestions would be greatly appreciated. Melonie -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
struts, tiles ans roles
Hi there. I'm on the way to get into struts 1.1-b2 with tiles and have to develope a web-application with a lot of roles. In the sample chapter of Struts in Action, there is an example with the role attribute in the tiles:put statement, but according to tiles-dtd, the role is used in an definition-statement. Hmmm, can anybody point me to some documentation how to use tiles and roles? If the tiles-definition is role-dependant, how do I forward to a jsp and insert a tile according to the specific role? Is that possible, or do I have to if-out the roles in the action? I'm a littlebit confused. I hate to use if-statements, that is the part of factorys, but I don't want to handle that in my action. Thank for any help, Simon -- Live within your income, even if you have to borrow to do so. -- Josh Billings -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Getting MessageResources from a ActionForm
Hi Darren, It does seem a pain. I think I will use the deprecated servlet method for now. Jim. - Original Message - From: Darren Hill [EMAIL PROTECTED] To: 'Struts Users Mailing List' [EMAIL PROTECTED] Sent: Tuesday, December 10, 2002 10:07 PM Subject: RE: Getting MessageResources from a ActionForm Hey Jim, I remember asking the same question. The basic answer is to populate those selections in the action. Pain in the butt eh? Darren. -Original Message- From: Jim Collins [mailto:[EMAIL PROTECTED]] Sent: December 10, 2002 4:50 PM To: Struts Users Mailing List Subject: Getting MessageResources from a ActionForm Hi, I would like to get a MessageResoure from an ActionForm. I thought of calling servlet.getResources() but according to the documentation this method is deprected. I want to use the ActionForm to populate a select with values from my ApplicationResources. I have seen the select example and know that I can do it from the JSP but I would like to set the values from an ActionForm. I am currently setting the values from the ActionForm but the values are hard coded in the ActionForm and I would like to be able to get them from the ApplicationResources. If anyone knows how I can do this without calling a deprecated method it would be appreciated. Thanks Jim. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: struts, tiles and roles
I don't know enough about Tiles and roles to answer your question but I encourage you to use a recent nightly build instead of 1.1b2. There have been many important bug fixes since beta 2 was released. It will make your life easier when beta 3 and final come out. David From: Christian Simonutti [EMAIL PROTECTED] Reply-To: Struts Users Mailing List [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: struts, tiles ans roles Date: Tue, 10 Dec 2002 23:20:22 +0100 Hi there. I'm on the way to get into struts 1.1-b2 with tiles and have to develope a web-application with a lot of roles. In the sample chapter of Struts in Action, there is an example with the role attribute in the tiles:put statement, but according to tiles-dtd, the role is used in an definition-statement. Hmmm, can anybody point me to some documentation how to use tiles and roles? If the tiles-definition is role-dependant, how do I forward to a jsp and insert a tile according to the specific role? Is that possible, or do I have to if-out the roles in the action? I'm a littlebit confused. I hate to use if-statements, that is the part of factorys, but I don't want to handle that in my action. Thank for any help, Simon -- Live within your income, even if you have to borrow to do so. -- Josh Billings -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] _ MSN 8 helps eliminate e-mail viruses. Get 2 months FREE*. http://join.msn.com/?page=features/virus -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: LookupDispatchAction onchange
My requirement (not necessarily on text, but on select fields) is to force the jsp page to recalculate. Yes, this can all be done with javascript and hidden fields, but hiding and redisplaying with javascript is a pain and more logic that I care to put into a jsp. Edgar -Original Message- From: Alvarado, Juan (c) [mailto:[EMAIL PROTECTED]] Sent: Tuesday, December 10, 2002 11:05 AM To: 'Struts Users Mailing List' Subject: RE: LookupDispatchAction onchange The LookupDispatchAction was designed with the intention of not having to use javascript to work with multiple submit buttons in one form. Since what you need is a submit from an onChange event in a text field which is a somewhat not often seen operation (at least from my experiences), you have no choice but to do the javascript in this case. Just our of curiosity, what requirement in your application do you have that needs the form to be submitted when a text field changes??? -Original Message- From: Cook, Graham [mailto:[EMAIL PROTECTED]] Sent: Tuesday, December 10, 2002 10:50 AM To: 'Struts Users Mailing List' Subject: RE: LookupDispatchAction onchange Thanks Andrew Juan, thats very helpful. Its is a shame that I have to use JavaScript to achieve a submit from a text field. The other buttons on the screen use the html:submit tag, html:submit property=doaction bean:message key=button.savedetails/ /html:submit obviously theres no Javascript there, shame there isnt some way of doing this with a tag rather than having javascript code to do the submit. Thanks you for your help. -Original Message- From: Alvarado, Juan (c) [mailto:[EMAIL PROTECTED]] Sent: 10 December 2002 15:25 To: 'Struts Users Mailing List' Subject: RE: LookupDispatchAction onchange If I remember correctly the LookupDispatchAction does a reverse lookup on your resource bundle in order to determine which method to call in the class. Example: if you have a key in your ApplicationResources.properties called: textfield.changed=submit form then you would obviously need something like the following in the getKeyMethodMap: map.put(textfield.changed, textFieldChangedMethod); So when your text field changes, you will need to submit the parameter you configured for your LookupDispatchAction in struts-config.xml with the a value of 'submit form' What the action should do is do a reverse lookup on the ApplicationResources file and look for a value of 'submit form'. 'submit form' is associated with the key textfield.changed and it will cause the textFieldChangedMethod to be called in your class. Also, make sure you follow Andrew's suggestion about not using 'action' as the parameter name. This has the potential to cause your form to behave in a very weird manner. It caused me lots of headaches in the past until I figured out it was the parameter name I used was 'action'. If you need any more help on this let me know. Take care -Original Message- From: Andrew Hill [mailto:[EMAIL PROTECTED]] Sent: Tuesday, December 10, 2002 9:54 AM To: Struts Users Mailing List Subject: RE: LookupDispatchAction onchange Should be possible. You may need to do something like appending a parameter to your forms action url with a bit of javascript to simulate whats submitted by a button. Can't remember the details for LookupDispatchAction since I havent used it, but heres some js that will play with your forms action and append a parameter named 'method' with value defined by useMethod. Adapt as required. (nb: its modified from a similar script (which works with DispatchAction rather than LookupDispatchAction) of mine for the purposes of this reply and thus untested!) snip function submitBlah(useMethod) { document.forms[0].action = appendParameter(document.forms[0].action,'method',useMethod); document.forms[0].submit(); } } function appendParameter(url, parameter, value) { var delimeter = url.indexOf('?') == -1 ? '?' : ''; return url + delimeter + parameter + '=' + value; } /snip Having said all that I should point out that you might be able achieve a similar effect using an appropriate hidden field too. Much simpler (though doesnt work too well with multipart forms submitting to a DispatchAction). If you try that be careful you dont submit 2 values for your property when a button is clicked. btw: Just looking at the javadocs for LDA. I see they use 'action' as the name of their example parameter. Bad idea naming anything on a form 'action'. It will shadow the form.action property (which means above script wont work for one thing). Same reason that naming a button 'submit' will lead you into trouble when you later try to add a call to javascripts form.submit() method... -Original Message- From: Cook, Graham [mailto:[EMAIL PROTECTED]] Sent: Tuesday, December 10, 2002 22:27 To: '[EMAIL PROTECTED]' Subject: LookupDispatchAction onchange Is it possible to use an onchange event on a text input field to submit the form to a
Re[4]: Using the key of a HashMap in an html:option tag ?
On Tuesday, December 10, 2002, 5:06:26 PM, Kris wrote: KS Glad it's working, but I don't understand why you'd have a problem with the JSP KS expression. IIRC, it's equivalent to the following code getting generated within KS the page's _jspService method: Trust me I don't know either. I'm using Tomcat 4.0.6 if that matters. It only causes me this problem when inside of a tag trying to use %= . I don't get it. Has anyone else ever ran into this situation? -- Rick mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Forcing SSL for index page of application
I'm trying to replicate the behavior that occurs when you set transport-guaranteeCONFIDENTIAL/transport-guarantee to confidential in web.xml. If I do this, when I hit the index.jsp page of my webapp, I am automatically redirected to https://localhost/myappname. However, I have a different SSL port setup for testing, and I'd like to only switch on one page, the index.jsp page. So I've added the following scriplet to my index.jsp and it works great in Mozilla, but fails in IE. IE prompts me with the certificate information, and then gives a Cannot Find Server error. Any ideas? % // TODO: Make this into a tag library Boolean secureLogin = (Boolean)application.getAttribute(Constants.SECURE_LOGIN); System.out.println(secureLogin: + secureLogin); if (secureLogin.booleanValue()) { // make sure we're using https if (request.getScheme().equals(http)) { String redirectString = SslUtil.getRedirectString(request, application, true); System.out.println(redirecting to: + response.encodeRedirectURL(redirectString)); % logic:redirect href=%=response.encodeRedirectURL(redirectString)%/ % } } % Everything looks the same in Tomcat's log when using either browser. Thanks, Matt
Re[2]: Best Practices for Logging?
I apologize, I haven't been following this whole thread, but I'm wondering if what I've implemented is a poor solution. For a particular app called taskmanager I created a Logging class which is pretty small and looks like this: public class Logging { static Category log = Category.getInstance(taskmanager); public static void debug(String msg) { log.debug(msg); } public static void error(String msg) { log.error(msg); } public static void info(String msg) { log.info(msg); } //etc } taskmanager corresponds to a category in my log4j.properties file so that I can set up what I want for the app this way. Then wherever I need to do logging in the app I just call Logging.info(...) or Logging.error( )..etc Are there some major drawbacks to using this type of a solution? I'm pretty much a log4j newbie so I'm probably missing a better way to do all of this and will go back through the archives to read these past posts. Thanks for any feedback -- Rick mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: struts, tiles and roles
On Tue Dec 10, 2002 at 03:3601PM -0700, David Graham wrote: I don't know enough about Tiles and roles to answer your question but I encourage you to use a recent nightly build instead of 1.1b2. There have been many important bug fixes since beta 2 was released. It will make your life easier when beta 3 and final come out. I have read that b3 is on the road, but it is a littlebit difficult to work on an webapplication for a customer an tell him, that it is a nightly release and not even beta. Hu ;o) I read through the example chapter of Struts in Action (I think) and the code-snippets are quite different from the tiles-dtd. But for my personal sake, I am looking forward to keep up with cvs or nightly bilds at home. Thanks, Simon -- Canada Bill Jones's Motto: It's morally wrong to allow suckers to keep their money. Canada Bill Jones's Supplement: A Smith and Wesson beats four aces. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: struts, tiles and roles
Keep in mind that a beta release is simply a nightly build that the committers think is ready. David From: Christian Simonutti [EMAIL PROTECTED] Reply-To: Struts Users Mailing List [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Subject: Re: struts, tiles and roles Date: Wed, 11 Dec 2002 00:15:18 +0100 On Tue Dec 10, 2002 at 03:3601PM -0700, David Graham wrote: I don't know enough about Tiles and roles to answer your question but I encourage you to use a recent nightly build instead of 1.1b2. There have been many important bug fixes since beta 2 was released. It will make your life easier when beta 3 and final come out. I have read that b3 is on the road, but it is a littlebit difficult to work on an webapplication for a customer an tell him, that it is a nightly release and not even beta. Hu ;o) I read through the example chapter of Struts in Action (I think) and the code-snippets are quite different from the tiles-dtd. But for my personal sake, I am looking forward to keep up with cvs or nightly bilds at home. Thanks, Simon -- Canada Bill Jones's Motto: It's morally wrong to allow suckers to keep their money. Canada Bill Jones's Supplement: A Smith and Wesson beats four aces. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] _ Help STOP SPAM with the new MSN 8 and get 2 months FREE* http://join.msn.com/?page=features/junkmail -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Forcing SSL for index page of application
I am no expert but here is the IE developers link for SSL http://www.microsoft.com/technet/treeview/default.asp?url=/TechNet/prodt echnol/ie/reskit/ie5/part1/ch06digi.asp Edgar -Original Message- From: Matt Raible [mailto:[EMAIL PROTECTED]] Sent: Tuesday, December 10, 2002 6:07 PM To: '[EMAIL PROTECTED]' Subject: Forcing SSL for index page of application I'm trying to replicate the behavior that occurs when you set transport-guaranteeCONFIDENTIAL/transport-guarantee to confidential in web.xml. If I do this, when I hit the index.jsp page of my webapp, I am automatically redirected to https://localhost/myappname. However, I have a different SSL port setup for testing, and I'd like to only switch on one page, the index.jsp page. So I've added the following scriplet to my index.jsp and it works great in Mozilla, but fails in IE. IE prompts me with the certificate information, and then gives a Cannot Find Server error. Any ideas? % // TODO: Make this into a tag library Boolean secureLogin = (Boolean)application.getAttribute(Constants.SECURE_LOGIN); System.out.println(secureLogin: + secureLogin); if (secureLogin.booleanValue()) { // make sure we're using https if (request.getScheme().equals(http)) { String redirectString = SslUtil.getRedirectString(request, application, true); System.out.println(redirecting to: + response.encodeRedirectURL(redirectString)); % logic:redirect href=%=response.encodeRedirectURL(redirectString)%/ % } } % Everything looks the same in Tomcat's log when using either browser. Thanks, Matt -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
dynamic input paths
i'm using struts 1.1b2 to perform a simple validation on an action form. it works great, except: when validation fails, i need to specify an additional request parameter for the input path, as the input page requires that parameter to exist. unfortunately, i get a configuration frozen error when i try to modify the input path in the action form's validate method. i've considered but rejected using a session attribute instead of a request parameter for this particular piece of data. other than that, is there a solution that i'm missing? thanks! -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
sslext problem
I'm using SSLExt to rewrite HTTP/HTTPS links. Sometimes the link from HTTPS to HTTP is being rewritten http://serverhref;sessionID as opposed to http://server/webapp/href;sessionID (not the missing webapp and slash). Not sure what's going on. The links work fine on HTTP-HTTP pages. The actions in question have set-property property=secure value=false/ in struts-config.xml. Since I'm new to sslext, I figure I'm misunderstanding something here. Any ideas? thx andy -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
whither validator taglib?
(apologies if this topic has been discussed before- i'm getting an error when searching the list archive: text search not supported for this list or some such.) chapter 12 of struts in action refers to a javascript taglib that doesn't appear to exist. i see the javascript tag in the html taglib, but nothing else. what's the current story? i need the functionality of the errorsPresent and messagesPresent tags described in ch 12. if those don't exist in 1.1b2 or a more current version, i guess i'll need to recreate them. but i can't be the only struts user with this need, can i? i wish the archive was working.. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: html:options encoded property
Correct me if I'm wrong, but aren't the quote; entries unnecessary? Couldn't you just remove them? -Original Message- From: Nathalie Foures [mailto:[EMAIL PROTECTED]] Sent: Monday, December 09, 2002 9:52 AM To: [EMAIL PROTECTED] Subject: html:options encoded property Hi! I wrote a JSP page with the following lines : ... html:select property=selectedProxies size=10 multiple=true html:options collection=proxies property=url labelProperty=name/ /html:select ... where name and url are the String attributes of a bean named Proxy. This code displays a box, with a list of names. When I select a name, this returns the corresponding url. The problem is that the url is written with escaped characters, BUT displayed with unescaped characters. For example, the bean Proxy has the following url linked with the name something : http://myhome/helloamp;action=quot;doSomethingquot;;. But, the resulting html page looks like this : ... select name=selectedProxies multiple=multiple size=10 option value=http://myhome/helloaction=doSomething;something/option ... The quot; character is translated. As a result the option value becomes http://helloaction=; : it stops at the first : character and doesn't take the whole url! doSomething is forgotten... I looked for attributes like filter for the html:options tag, but I didn't succeed...Has someone an idea to help me! Thank you! Nathalie -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Why no text search on the mailing list archives?
Why doesn't text searching work any more for the mailing list archives at http://nagoya.apache.org/eyebrowse/SearchList?[EMAIL PROTECTED] pache.org You get a message 'Text search not available for this list' -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Tiles tabsLayout stopped working with struts 1.1?
I just downloaded and tried the 12/9 nightly build and the tabsLayout worked fine. I was using 1.1-b2 distribution when the tabsLayout had problem. -Original Message- From: Lee Zhao Sent: Tuesday, December 10, 2002 1:35 PM To: [EMAIL PROTECTED] Subject: Tiles tabsLayout stopped working with struts 1.1? Hi, The Tiles tabsLayout no longer works after I migrated my code to struts 1.1 from struts 1.0 and the separate Tiles download. I also tried the examples in the tiles-documentation war that comes as part of the struts 1.1-b2 and was getting exactly the same problem. The error I am getting is [ServletException in:/common/tabsLayout.jsp] null'. See below for more info on this problem. Does someone know a solution to this problem? Thanks Lee // My jsp: tiles:insert definition=classic flush=true tiles:put name=header value=div class=pagehdrCustomer/div / tiles:put name=body value=customer.showCustomerInfo / /tiles:insert The customer.showCustomerInfo is a tile definition in my tiles-def.xml: !-- tabs page -- definition name=customer.showCustomerInfo path=/common/tabsLayout.jsp put name=selectedIndex value=0 / put name=parameterName value=selected / put name=header value=Customer / putList name=tabList item value=General link=/customer/generalCustomerInfo.jsp classtype=org.apache.struts.tiles.beans.SimpleMenuItem / item value=Services link=/customer/customerInstalledServices.jsp classtype=org.apache.struts.tiles.beans.SimpleMenuItem / /putList /definition The error is caused by the following line in the tabsLayout.jsp because the tabList is null: if( selectedIndex 0 || selectedIndex = tabList.size() ) selectedIndex = 0; -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]