Struts2 and html select tag problem
Hi everyone, I'm having some problems on html select Tag. This is part of my jsp code form name=CUD action=abc.do method=post select style=visibility:visible name=deleteList id=deleteList multiple=multiple option value=TestingTesting/option /select /form This is part of my action.java HttpServletRequest request = (HttpServletRequest)ActionContext.getContext().get(ServletActionContext.HTTP_REQUEST); String[] deleteList = request.getParameterValues(deleteList); my deleteList is null, which means i'm not able to retrieve data from the submitted CUD form. Any idea on this issue? -- View this message in context: http://www.nabble.com/Struts2-and-html-select-tag-problem-tp25763661p25763661.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: Struts2 and html select tag problem
Problem solved already...i need to set the option to be selected as below option value=Testing SELECTEDTesting/option Sorry for my stupid question -- View this message in context: http://www.nabble.com/Struts2-and-html-select-tag-problem-tp25763661p25764804.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: Struts 1 form data change
Hi all, consider a story like this: lets say i'm the user, i'm loading this page, then i select tab1 and look at the data, then i select tab2 and change the data tab2_d1, then i select tab1 and change the data tab1_d1, then again select tab2 and change data tab2_d1 to it's original value, and i click save. Now what would You like to save? In general, what is the benefit of savin only partial data? I claim there is none or very little, just look how much work You have to do to make it hapen versus normal way. Best greetings, Paweł Wielgus. 2009/10/6 Paul Benedict pbened...@apache.org: It could be a character that represents which tab is selected. A, B, C, etc. On Mon, Oct 5, 2009 at 9:40 PM, SanJ.SANJAY girish...@gmail.com wrote: Paul, I will try that..hidden field will be a java variable. So it should be like a boolean which toggles every user select Tab? Thanks .. Paul Benedict-2 wrote: SanJ, When a user selects the tab, modify a hidden form field that indicates the tab selected. Do you know javascript? That's what you would use. Paul On Mon, Oct 5, 2009 at 9:15 PM, SanJ.SANJAY girish...@gmail.com wrote: Thanks Paul, I thought about that also but selecting a tab isn't always mean that I change the data inside that tab. Paul Benedict-2 wrote: SanJ, Can you track which tab the user selected? Perhaps you can set a javascript variable when one is selected. The only down side here is that you'll have to hardcode which fields belong to which tab. Once you do that, you can do what you want. Paul On Mon, Oct 5, 2009 at 7:42 PM, SanJ.SANJAY girish...@gmail.com wrote: I am using struts 1. I have Adobe SPRY tabs in my JSP. There are two separate set of fields/ data in each tab. So suppose someone changes fields in Tab 2 only and save the JSP, I do not want to save the tab 1 fields also because those fields are not changed. I was wondering if there is any way I can distinguish that only TAB 2 fields are changed so that I can process only those fields in action instead of processing all the JSP form fields. I would appreciate some inputs! -- View this message in context: http://www.nabble.com/Struts-1-form-data-change-tp25758644p25758644.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org -- View this message in context: http://www.nabble.com/Struts-1-form-data-change-tp25758644p25761964.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org -- View this message in context: http://www.nabble.com/Struts-1-form-data-change-tp25758644p25762087.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Struts 1: character encoding
The components I use NetBean, Glassfish, Struts 1, EJB, Toplink, jdbc, MySQL. Basically what I want is to extract info from a web site (utf8 encoded Chinese), store the info in MySQL, retrieve the info and display on my web site for user to update/change it. But I got problem on the character encoding. Here is briefly my logic and coding: (1) extract from a web page which uses UTF-8 encoded, my coding in an EJB run on glassfish: char c = (char) myInputStream.read(); Listbyte token; token.add((byte) c); byte[] ba = new byte[token.size()]; for (int i=0; itoken.size(); i++) { ba[i] = token.get(i); } String s = new String(ba, UTF-8); I know it can be simpler, but it's a copy of others coding + my amendment. But it works. (2) String s above is stored onto MySQL via toplink, jdbc. Table is DEFAULT CHARSET=utf8. The jdbc URL is jdbc:mysql://mysys:3306/testinguseUnicode=truecharacterEncoding=utf-8. (3) Retrieve by Struts Action via EJB. Both EJB and Action does not have change of string encoding. The Action put the Chinese string into a DynaForm, then to JSP. JSP has %...@page contentType=text/html pageEncoding=UTF-8% and it generates an html input form. (4) However, the Chinese characters were NOT displayed properly in the html form on IE. (5) Anyway, in the html form, I override the incorrect Chinese character by a writing pad with the correct characters (equivalent to unicode 9326 6c5f) and submit. Again, no re-encoding in the Action that process the update. The Action calls an EJB to update the database with the input data. But I found that the database was updated with ascii string amp;#37670;amp;#27743; (exactly this string, not its equivalent encoded). I feel somehow there is/are encoding changes done by the software components I use (Struts? toplink? jdbc?), but don't know which one and I may be wrong. If anybody has any idea on this problem please help. -- View this message in context: http://www.nabble.com/Struts-1%3A-character-encoding-tp25766281p25766281.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: Struts 1 form data change
Pawel, You are right, but, the data that I have in tab 1 contains lot of fields and is kind of different set of data. So if I just change the Tab 2 data and click save, I am unnecessarily re-saving the data of tab1 (which means firing big queries to Database) when all I need is just save set of data in Tab2. This could be a performance hit. Thanks Paweł Wielgus wrote: Hi all, consider a story like this: lets say i'm the user, i'm loading this page, then i select tab1 and look at the data, then i select tab2 and change the data tab2_d1, then i select tab1 and change the data tab1_d1, then again select tab2 and change data tab2_d1 to it's original value, and i click save. Now what would You like to save? In general, what is the benefit of savin only partial data? I claim there is none or very little, just look how much work You have to do to make it hapen versus normal way. Best greetings, Paweł Wielgus. 2009/10/6 Paul Benedict pbened...@apache.org: It could be a character that represents which tab is selected. A, B, C, etc. On Mon, Oct 5, 2009 at 9:40 PM, SanJ.SANJAY girish...@gmail.com wrote: Paul, I will try that..hidden field will be a java variable. So it should be like a boolean which toggles every user select Tab? Thanks .. Paul Benedict-2 wrote: SanJ, When a user selects the tab, modify a hidden form field that indicates the tab selected. Do you know javascript? That's what you would use. Paul On Mon, Oct 5, 2009 at 9:15 PM, SanJ.SANJAY girish...@gmail.com wrote: Thanks Paul, I thought about that also but selecting a tab isn't always mean that I change the data inside that tab. Paul Benedict-2 wrote: SanJ, Can you track which tab the user selected? Perhaps you can set a javascript variable when one is selected. The only down side here is that you'll have to hardcode which fields belong to which tab. Once you do that, you can do what you want. Paul On Mon, Oct 5, 2009 at 7:42 PM, SanJ.SANJAY girish...@gmail.com wrote: I am using struts 1. I have Adobe SPRY tabs in my JSP. There are two separate set of fields/ data in each tab. So suppose someone changes fields in Tab 2 only and save the JSP, I do not want to save the tab 1 fields also because those fields are not changed. I was wondering if there is any way I can distinguish that only TAB 2 fields are changed so that I can process only those fields in action instead of processing all the JSP form fields. I would appreciate some inputs! -- View this message in context: http://www.nabble.com/Struts-1-form-data-change-tp25758644p25758644.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org -- View this message in context: http://www.nabble.com/Struts-1-form-data-change-tp25758644p25761964.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org -- View this message in context: http://www.nabble.com/Struts-1-form-data-change-tp25758644p25762087.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org -- View this message in context: http://www.nabble.com/Struts-1-form-data-change-tp25758644p25767781.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Weblogic:Could not load servers/AdminServer/tmp//appmergegen
From the Archives: http://article.gmane.org/gmane.comp.jakarta.struts.user/165150 This is probably the same problem. How is this handled? A constant was mentioned but it must be something in the Struts 2 code because it doesn't seem to fit anywhere I put it: constant name=struts.convention.action.fileProtocols value=jar,zip/ ...anyway, if this was implemented, it doesn't seem to be working for me. Jim C. - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: Struts 1 form data change
SanJ, This is where you have to modify your code :-) You'll have to take into account which tab was saved, and only save that tab's data. As you said yourself, you can't just take the entire ActionForm data. public void execute(...) { if (tab being saved is 'A') { saveTabA(); } else if (tab being saved is 'B') { saveTabB(); } } Paul On Tue, Oct 6, 2009 at 7:28 AM, SanJ.SANJAY girish...@gmail.com wrote: Pawel, You are right, but, the data that I have in tab 1 contains lot of fields and is kind of different set of data. So if I just change the Tab 2 data and click save, I am unnecessarily re-saving the data of tab1 (which means firing big queries to Database) when all I need is just save set of data in Tab2. This could be a performance hit. Thanks Paweł Wielgus wrote: Hi all, consider a story like this: lets say i'm the user, i'm loading this page, then i select tab1 and look at the data, then i select tab2 and change the data tab2_d1, then i select tab1 and change the data tab1_d1, then again select tab2 and change data tab2_d1 to it's original value, and i click save. Now what would You like to save? In general, what is the benefit of savin only partial data? I claim there is none or very little, just look how much work You have to do to make it hapen versus normal way. Best greetings, Paweł Wielgus. 2009/10/6 Paul Benedict pbened...@apache.org: It could be a character that represents which tab is selected. A, B, C, etc. On Mon, Oct 5, 2009 at 9:40 PM, SanJ.SANJAY girish...@gmail.com wrote: Paul, I will try that..hidden field will be a java variable. So it should be like a boolean which toggles every user select Tab? Thanks .. Paul Benedict-2 wrote: SanJ, When a user selects the tab, modify a hidden form field that indicates the tab selected. Do you know javascript? That's what you would use. Paul On Mon, Oct 5, 2009 at 9:15 PM, SanJ.SANJAY girish...@gmail.com wrote: Thanks Paul, I thought about that also but selecting a tab isn't always mean that I change the data inside that tab. Paul Benedict-2 wrote: SanJ, Can you track which tab the user selected? Perhaps you can set a javascript variable when one is selected. The only down side here is that you'll have to hardcode which fields belong to which tab. Once you do that, you can do what you want. Paul On Mon, Oct 5, 2009 at 7:42 PM, SanJ.SANJAY girish...@gmail.com wrote: I am using struts 1. I have Adobe SPRY tabs in my JSP. There are two separate set of fields/ data in each tab. So suppose someone changes fields in Tab 2 only and save the JSP, I do not want to save the tab 1 fields also because those fields are not changed. I was wondering if there is any way I can distinguish that only TAB 2 fields are changed so that I can process only those fields in action instead of processing all the JSP form fields. I would appreciate some inputs! -- View this message in context: http://www.nabble.com/Struts-1-form-data-change-tp25758644p25758644.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org -- View this message in context: http://www.nabble.com/Struts-1-form-data-change-tp25758644p25761964.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org -- View this message in context: http://www.nabble.com/Struts-1-form-data-change-tp25758644p25762087.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org -- View this message in context: http://www.nabble.com/Struts-1-form-data-change-tp25758644p25767781.html
iterator tag: how to interpret the property value which are html
I have to iterate thru a list of strings, some of the string element include html tag like lt;bCopmany Names:lt;/b it print out litterlly like this Copmany Names:/br, not the bolded word Company Names: here is what the iterate tag look like s:iterator value=CompanyNames status=stat tr tds:property / br /td /tr /s:iterator btw, the CompanyNames is getting from other application's database, all the html tags are mixed in beyond my control, so have to display what is there. Thanks Sam -- View this message in context: http://www.nabble.com/iterator-tag%3A-how-to-interpret-the-property-value-which-are-html-tp25769502p25769502.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: iterator tag: how to interpret the property value which are html
samsun wrote: I have to iterate thru a list of strings, some of the string element include html tag like lt;bCopmany Names:lt;/b it print out litterlly like this Copmany Names:, not the bolded word Company Names: here is what the iterate tag look like s:iterator value=CompanyNames status=stat tr tds:property / br /td /tr /s:iterator btw, the CompanyNames is getting from other application's database, all the html tags are mixed in beyond my control, so have to display what is there. Thanks Sam -- View this message in context: http://www.nabble.com/iterator-tag%3A-how-to-interpret-the-property-value-which-are-html-tp25769502p25769627.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: Struts 1 form data change
Thanks Paul, appreciate that. I have the same idea in mind but how would I know tab being saved is 'A'? I can only detect if the tab is 'clicked or selected' not if the data in tab is 'changed'.Hmmm ...interesting :-). I have three tabs in JSP with one form and only one save button for all. Paul Benedict-2 wrote: SanJ, This is where you have to modify your code :-) You'll have to take into account which tab was saved, and only save that tab's data. As you said yourself, you can't just take the entire ActionForm data. public void execute(...) { if (tab being saved is 'A') { saveTabA(); } else if (tab being saved is 'B') { saveTabB(); } } Paul On Tue, Oct 6, 2009 at 7:28 AM, SanJ.SANJAY girish...@gmail.com wrote: Pawel, You are right, but, the data that I have in tab 1 contains lot of fields and is kind of different set of data. So if I just change the Tab 2 data and click save, I am unnecessarily re-saving the data of tab1 (which means firing big queries to Database) when all I need is just save set of data in Tab2. This could be a performance hit. Thanks Paweł Wielgus wrote: Hi all, consider a story like this: lets say i'm the user, i'm loading this page, then i select tab1 and look at the data, then i select tab2 and change the data tab2_d1, then i select tab1 and change the data tab1_d1, then again select tab2 and change data tab2_d1 to it's original value, and i click save. Now what would You like to save? In general, what is the benefit of savin only partial data? I claim there is none or very little, just look how much work You have to do to make it hapen versus normal way. Best greetings, Paweł Wielgus. 2009/10/6 Paul Benedict pbened...@apache.org: It could be a character that represents which tab is selected. A, B, C, etc. On Mon, Oct 5, 2009 at 9:40 PM, SanJ.SANJAY girish...@gmail.com wrote: Paul, I will try that..hidden field will be a java variable. So it should be like a boolean which toggles every user select Tab? Thanks .. Paul Benedict-2 wrote: SanJ, When a user selects the tab, modify a hidden form field that indicates the tab selected. Do you know javascript? That's what you would use. Paul On Mon, Oct 5, 2009 at 9:15 PM, SanJ.SANJAY girish...@gmail.com wrote: Thanks Paul, I thought about that also but selecting a tab isn't always mean that I change the data inside that tab. Paul Benedict-2 wrote: SanJ, Can you track which tab the user selected? Perhaps you can set a javascript variable when one is selected. The only down side here is that you'll have to hardcode which fields belong to which tab. Once you do that, you can do what you want. Paul On Mon, Oct 5, 2009 at 7:42 PM, SanJ.SANJAY girish...@gmail.com wrote: I am using struts 1. I have Adobe SPRY tabs in my JSP. There are two separate set of fields/ data in each tab. So suppose someone changes fields in Tab 2 only and save the JSP, I do not want to save the tab 1 fields also because those fields are not changed. I was wondering if there is any way I can distinguish that only TAB 2 fields are changed so that I can process only those fields in action instead of processing all the JSP form fields. I would appreciate some inputs! -- View this message in context: http://www.nabble.com/Struts-1-form-data-change-tp25758644p25758644.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org -- View this message in context: http://www.nabble.com/Struts-1-form-data-change-tp25758644p25761964.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org -- View this message in context: http://www.nabble.com/Struts-1-form-data-change-tp25758644p25762087.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For
Custom Property Tag
I need to show certain fields to certain users based on permissions (per-user). I was going to create a custom s:property tag, which would access an IUser object on the value stack. In the tag, it will do: If (getUser().canAccess('property_name')) Then Render the tag/value Else Render nothing I cannot figure out how exactly to get the user object on the value stack, and which file contains the property tag implementation. Could someone suggest where to start? Thanks, Mike. - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: Struts 1 form data change
Or I can compare at server side, the values of fields in tabs. If value SanJ.SANJAY wrote: Thanks Paul, appreciate that. I have the same idea in mind but how would I know tab being saved is 'A'? I can only detect if the tab is 'clicked or selected' not if the data in tab is 'changed'.Hmmm ...interesting :-). I have three tabs in JSP with one form and only one save button for all. public void execute(...) { if (fields in tab 'A' are changed ) { saveTabA(); } else if (fields in tab 'B' are changed) { saveTabB(); } } But don't know how will it affect the performance? Paul Benedict-2 wrote: SanJ, This is where you have to modify your code :-) You'll have to take into account which tab was saved, and only save that tab's data. As you said yourself, you can't just take the entire ActionForm data. public void execute(...) { if (tab being saved is 'A') { saveTabA(); } else if (tab being saved is 'B') { saveTabB(); } } Paul On Tue, Oct 6, 2009 at 7:28 AM, SanJ.SANJAY girish...@gmail.com wrote: Pawel, You are right, but, the data that I have in tab 1 contains lot of fields and is kind of different set of data. So if I just change the Tab 2 data and click save, I am unnecessarily re-saving the data of tab1 (which means firing big queries to Database) when all I need is just save set of data in Tab2. This could be a performance hit. Thanks Paweł Wielgus wrote: Hi all, consider a story like this: lets say i'm the user, i'm loading this page, then i select tab1 and look at the data, then i select tab2 and change the data tab2_d1, then i select tab1 and change the data tab1_d1, then again select tab2 and change data tab2_d1 to it's original value, and i click save. Now what would You like to save? In general, what is the benefit of savin only partial data? I claim there is none or very little, just look how much work You have to do to make it hapen versus normal way. Best greetings, Paweł Wielgus. 2009/10/6 Paul Benedict pbened...@apache.org: It could be a character that represents which tab is selected. A, B, C, etc. On Mon, Oct 5, 2009 at 9:40 PM, SanJ.SANJAY girish...@gmail.com wrote: Paul, I will try that..hidden field will be a java variable. So it should be like a boolean which toggles every user select Tab? Thanks .. Paul Benedict-2 wrote: SanJ, When a user selects the tab, modify a hidden form field that indicates the tab selected. Do you know javascript? That's what you would use. Paul On Mon, Oct 5, 2009 at 9:15 PM, SanJ.SANJAY girish...@gmail.com wrote: Thanks Paul, I thought about that also but selecting a tab isn't always mean that I change the data inside that tab. Paul Benedict-2 wrote: SanJ, Can you track which tab the user selected? Perhaps you can set a javascript variable when one is selected. The only down side here is that you'll have to hardcode which fields belong to which tab. Once you do that, you can do what you want. Paul On Mon, Oct 5, 2009 at 7:42 PM, SanJ.SANJAY girish...@gmail.com wrote: I am using struts 1. I have Adobe SPRY tabs in my JSP. There are two separate set of fields/ data in each tab. So suppose someone changes fields in Tab 2 only and save the JSP, I do not want to save the tab 1 fields also because those fields are not changed. I was wondering if there is any way I can distinguish that only TAB 2 fields are changed so that I can process only those fields in action instead of processing all the JSP form fields. I would appreciate some inputs! -- View this message in context: http://www.nabble.com/Struts-1-form-data-change-tp25758644p25758644.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org -- View this message in context: http://www.nabble.com/Struts-1-form-data-change-tp25758644p25761964.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org -- View this message in context: http://www.nabble.com/Struts-1-form-data-change-tp25758644p25762087.html Sent from the Struts - User mailing list archive at
Re: Struts 1 form data change
SanJ, Don't worry about performance. You can't program advanced features by writing nothing. You'll have to do the check. I have the same idea in mind but how would I know tab being saved is 'A'? The tab last selected is the tab being saved. As I said, use a hidden field to tell you. Paul On Tue, Oct 6, 2009 at 9:43 AM, SanJ.SANJAY girish...@gmail.com wrote: Or I can compare at server side, the values of fields in tabs. public void execute(...) { if (fields in tab 'A' are changed ) { saveTabA(); } else if (fields in tab 'B' are changed) { saveTabB(); } } But don't know how will it affect the performance? Thanks, SanJ Paul Benedict-2 wrote: SanJ, This is where you have to modify your code :-) You'll have to take into account which tab was saved, and only save that tab's data. As you said yourself, you can't just take the entire ActionForm data. public void execute(...) { if (tab being saved is 'A') { saveTabA(); } else if (tab being saved is 'B') { saveTabB(); } } Paul On Tue, Oct 6, 2009 at 7:28 AM, SanJ.SANJAY girish...@gmail.com wrote: Pawel, You are right, but, the data that I have in tab 1 contains lot of fields and is kind of different set of data. So if I just change the Tab 2 data and click save, I am unnecessarily re-saving the data of tab1 (which means firing big queries to Database) when all I need is just save set of data in Tab2. This could be a performance hit. Thanks Paweł Wielgus wrote: Hi all, consider a story like this: lets say i'm the user, i'm loading this page, then i select tab1 and look at the data, then i select tab2 and change the data tab2_d1, then i select tab1 and change the data tab1_d1, then again select tab2 and change data tab2_d1 to it's original value, and i click save. Now what would You like to save? In general, what is the benefit of savin only partial data? I claim there is none or very little, just look how much work You have to do to make it hapen versus normal way. Best greetings, Paweł Wielgus. 2009/10/6 Paul Benedict pbened...@apache.org: It could be a character that represents which tab is selected. A, B, C, etc. On Mon, Oct 5, 2009 at 9:40 PM, SanJ.SANJAY girish...@gmail.com wrote: Paul, I will try that..hidden field will be a java variable. So it should be like a boolean which toggles every user select Tab? Thanks .. Paul Benedict-2 wrote: SanJ, When a user selects the tab, modify a hidden form field that indicates the tab selected. Do you know javascript? That's what you would use. Paul On Mon, Oct 5, 2009 at 9:15 PM, SanJ.SANJAY girish...@gmail.com wrote: Thanks Paul, I thought about that also but selecting a tab isn't always mean that I change the data inside that tab. Paul Benedict-2 wrote: SanJ, Can you track which tab the user selected? Perhaps you can set a javascript variable when one is selected. The only down side here is that you'll have to hardcode which fields belong to which tab. Once you do that, you can do what you want. Paul On Mon, Oct 5, 2009 at 7:42 PM, SanJ.SANJAY girish...@gmail.com wrote: I am using struts 1. I have Adobe SPRY tabs in my JSP. There are two separate set of fields/ data in each tab. So suppose someone changes fields in Tab 2 only and save the JSP, I do not want to save the tab 1 fields also because those fields are not changed. I was wondering if there is any way I can distinguish that only TAB 2 fields are changed so that I can process only those fields in action instead of processing all the JSP form fields. I would appreciate some inputs! -- View this message in context: http://www.nabble.com/Struts-1-form-data-change-tp25758644p25758644.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org -- View this message in context: http://www.nabble.com/Struts-1-form-data-change-tp25758644p25761964.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org -- View this message in context: http://www.nabble.com/Struts-1-form-data-change-tp25758644p25762087.html Sent from the Struts - User mailing list archive
Error while deploying struts2 Application
Hi folks!!! i've deployed my application in tomcat via eclipse, but i'm facing some errors displayed below when i'm starting my tomcat server to run my application due to that i'm unable to run my app.. Oct 6, 2009 8:33:00 PM org.apache.catalina.core.AprLifecycleListener lifecycleEvent INFO: The Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: C:\Program Files\Java\jdk1.5.0_16\bin;.;C:\WINDOWS\system32;C:\WINDOWS;C:\Program Files\Xuggle\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\Program Files\Java\jdk1.5.0_16\bin;C:\Program Files\Java\jdk1.5.0_16;C:\Program Files\SQL Anywhere 10\win32;C:\Program Files\SQL Anywhere 10\Sybase Central 5.0.0\win32;C:\lstk\apache-ant-1.6.2\bin;C:\Program Files\TortoiseSVN\bin;C:\lstk\apache-maven-2.0.9\bin Oct 6, 2009 8:33:00 PM org.apache.coyote.http11.Http11BaseProtocol init INFO: Initializing Coyote HTTP/1.1 on http-8080 Oct 6, 2009 8:33:00 PM org.apache.catalina.startup.Catalina load INFO: Initialization processed in 453 ms Oct 6, 2009 8:33:01 PM org.apache.catalina.core.StandardService start INFO: Starting service Catalina Oct 6, 2009 8:33:01 PM org.apache.catalina.core.StandardEngine start INFO: Starting Servlet Engine: Apache Tomcat/5.5.26 Oct 6, 2009 8:33:01 PM org.apache.catalina.core.StandardHost start INFO: XML validation disabled Oct 6, 2009 8:33:01 PM org.apache.catalina.startup.HostConfig deployWAR INFO: Deploying web application archive Login.war Oct 6, 2009 8:33:14 PM com.opensymphony.xwork2.util.logging.commons.CommonsLogger info INFO: Parsing configuration file [struts-default.xml] Oct 6, 2009 8:33:14 PM com.opensymphony.xwork2.util.logging.commons.CommonsLogger info INFO: Parsing configuration file [struts-plugin.xml] Oct 6, 2009 8:33:14 PM org.apache.catalina.core.StandardContext start SEVERE: Error filterStart Oct 6, 2009 8:33:14 PM org.apache.catalina.core.StandardContext start SEVERE: Context [/Login] startup failed due to previous errorslog4j:WARN No appenders could be found for logger (org.apache.commons.digester.Digester.sax). log4j:WARN Please initialize the log4j system properly. Oct 6, 2009 8:33:15 PM org.apache.coyote.http11.Http11BaseProtocol start INFO: Starting Coyote HTTP/1.1 on http-8080 Oct 6, 2009 8:33:15 PM org.apache.jk.common.ChannelSocket init INFO: JK: ajp13 listening on /0.0.0.0:8009 Oct 6, 2009 8:33:15 PM org.apache.jk.server.JkMain start INFO: Jk running ID=0 time=0/15 config=null Oct 6, 2009 8:33:15 PM org.apache.catalina.storeconfig.StoreLoader load INFO: Find registry server-registry.xml at classpath resource Oct 6, 2009 8:33:15 PM org.apache.catalina.startup.Catalina start INFO: Server startup in 14875 ms please if anybody knows the solution,then kindly do the needful.. desperately waiting for any reply!!! Thanks in advance, With Regards, Barkha Jasani -- View this message in context: http://www.nabble.com/Error-while-deploying-struts2-Application-tp25770750p25770750.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: Custom Property Tag
I did something similar, but I used s:if as an example. Rather than show or not show in a s:property tag-like setup, i felt like s:if did the job much better. If you want an example, check out core/src/main/java/org/apache/struts2/views/jsp/IfTag.java core/src/main/java/org/apache/struts2/views/freemarker/tags/IfModel.java core/src/main/java/org/apache/struts2/components/If.java Then, check out the pom.xml file for a clue how to use the annotations you'll see in there to generate a TLD file for the tag. Also, the views/freemarker thing isn't necessary, but if you plan to use Freemarker, you'll have to create a freemarker template manager (which is pretty simple, check the source of the bean that the struts-default.xml defines for an example). -Wes On Tue, Oct 6, 2009 at 10:36 AM, Mike Baranski list-subscripti...@secmgmt.com wrote: I need to show certain fields to certain users based on permissions (per-user). I was going to create a custom s:property tag, which would access an IUser object on the value stack. In the tag, it will do: If (getUser().canAccess('property_name')) Then Render the tag/value Else Render nothing I cannot figure out how exactly to get the user object on the value stack, and which file contains the property tag implementation. Could someone suggest where to start? Thanks, Mike. - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org -- Wes Wannemacher Head Engineer, WanTii, Inc. Need Training? Struts, Spring, Maven, Tomcat... Ask me for a quote! - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
RE: Custom Property Tag
Thanks Wes! That's exactly what I needed to get started. M. -Original Message- From: Wes Wannemacher [mailto:w...@wantii.com] Sent: Tuesday, October 06, 2009 11:33 AM To: Struts Users Mailing List Subject: Re: Custom Property Tag I did something similar, but I used s:if as an example. Rather than show or not show in a s:property tag-like setup, i felt like s:if did the job much better. If you want an example, check out core/src/main/java/org/apache/struts2/views/jsp/IfTag.java core/src/main/java/org/apache/struts2/views/freemarker/tags/IfModel.java core/src/main/java/org/apache/struts2/components/If.java Then, check out the pom.xml file for a clue how to use the annotations you'll see in there to generate a TLD file for the tag. Also, the views/freemarker thing isn't necessary, but if you plan to use Freemarker, you'll have to create a freemarker template manager (which is pretty simple, check the source of the bean that the struts-default.xml defines for an example). -Wes On Tue, Oct 6, 2009 at 10:36 AM, Mike Baranski list-subscripti...@secmgmt.com wrote: I need to show certain fields to certain users based on permissions (per-user). I was going to create a custom s:property tag, which would access an IUser object on the value stack. In the tag, it will do: If (getUser().canAccess('property_name')) Then Render the tag/value Else Render nothing I cannot figure out how exactly to get the user object on the value stack, and which file contains the property tag implementation. Could someone suggest where to start? Thanks, Mike. - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org -- Wes Wannemacher Head Engineer, WanTii, Inc. Need Training? Struts, Spring, Maven, Tomcat... Ask me for a quote! - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: iterator tag: how to interpret the property value which are html
I would like put my question simply like this: in jsp, %! String test=java; % %=test% i got bold Java try to have same thing from struts2 s:set name=test value=%{'java'} s:property value=#test / i got java back,which is not what i want samsun wrote: samsun wrote: I have to iterate thru a list of strings, some of the string element include html tag like lt;bCopmany Names:lt;/b it print out litterlly like this Copmany Names:, not the bolded word Company Names: here is what the iterate tag look like s:iterator value=CompanyNames status=stat tr tds:property / br /td /tr /s:iterator btw, the CompanyNames is getting from other application's database, all the html tags are mixed in beyond my control, so have to display what is there. Thanks Sam -- View this message in context: http://www.nabble.com/iterator-tag%3A-how-to-interpret-the-property-value-which-are-html-tp25769502p25771843.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: iterator tag: how to interpret the property value which are html
hint: check the documentation of the property tag On Tue, Oct 6, 2009 at 7:12 AM, samsun greg.zh...@barcap.com wrote: I have to iterate thru a list of strings, some of the string element include html tag like lt;bCopmany Names:lt;/b it print out litterlly like this Copmany Names:/br, not the bolded word Company Names: here is what the iterate tag look like s:iterator value=CompanyNames status=stat tr tds:property / br /td /tr /s:iterator btw, the CompanyNames is getting from other application's database, all the html tags are mixed in beyond my control, so have to display what is there. Thanks Sam -- View this message in context: http://www.nabble.com/iterator-tag%3A-how-to-interpret-the-property-value-which-are-html-tp25769502p25769502.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org -- Hey you! Would you help me to carry the stone? Pink Floyd - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
strust2 tag question
I would like put my question simply like this: in jsp, %! String test=java; % %=test% i got bold Java try to have same thing from struts2 s:set name=test value=%{'java'} s:property value=#test / i got java back,which is not what i want. here the actual value is sitting from valuestack. -- View this message in context: http://www.nabble.com/strust2-tag-question-tp25771990p25771990.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: iterator tag: how to interpret the property value which are html
i got b java / b back samsun wrote: I would like put my question simply like this: in jsp, %! String test=java; % %=test% i got bold Java try to have same thing from struts2 s:set name=test value=%{'java'} s:property value=#test / i got java back,which is not what i want samsun wrote: samsun wrote: I have to iterate thru a list of strings, some of the string element include html tag like lt;bCopmany Names:lt;/b it print out litterlly like this Copmany Names:, not the bolded word Company Names: here is what the iterate tag look like s:iterator value=CompanyNames status=stat tr tds:property / br /td /tr /s:iterator btw, the CompanyNames is getting from other application's database, all the html tags are mixed in beyond my control, so have to display what is there. Thanks Sam -- View this message in context: http://www.nabble.com/iterator-tag%3A-how-to-interpret-the-property-value-which-are-html-tp25769502p25772037.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
RE: iterator tag: how to interpret the property value which are html
If you put java onto the value stack, and it remains unchanged when you retrieve it from the value stack, that's expected. If you want java in bold tags, put it in bold tags. Regarding the normal JSP behavior you cited: that's a mystery. Scripting variables don't magically just decide to surround themselves with bold tags. ;) -Original Message- From: samsun [mailto:greg.zh...@barcap.com] Sent: Tuesday, October 06, 2009 12:26 PM To: user@struts.apache.org Subject: Re: iterator tag: how to interpret the property value which are html i got b java / b back samsun wrote: I would like put my question simply like this: in jsp, %! String test=java; % %=test% i got bold Java try to have same thing from struts2 s:set name=test value=%{'java'} s:property value=#test / i got java back,which is not what i want samsun wrote: samsun wrote: I have to iterate thru a list of strings, some of the string element include html tag like lt;bCopmany Names:lt;/b it print out litterlly like this Copmany Names:, not the bolded word Company Names: here is what the iterate tag look like s:iterator value=CompanyNames status=stat tr tds:property / br /td /tr /s:iterator btw, the CompanyNames is getting from other application's database, all the html tags are mixed in beyond my control, so have to display what is there. Thanks Sam -- View this message in context: http://www.nabble.com/iterator-tag%3A-how-to-interpret-the-pro perty-value-which-are-html-tp25769502p25772037.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org Notice: This e-mail message, together with any attachments, contains information of Merck Co., Inc. (One Merck Drive, Whitehouse Station, New Jersey, USA 08889), and/or its affiliates (which may be known outside the United States as Merck Frosst, Merck Sharp Dohme or MSD and in Japan, as Banyu - direct contact information for affiliates is available at http://www.merck.com/contact/contacts.html) that may be confidential, proprietary copyrighted and/or legally privileged. It is intended solely for the use of the individual or entity named on this message. If you are not the intended recipient, and have received this message in error, please notify us immediately by reply e-mail and then delete it from your system. - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
RE: iterator tag: how to interpret the property value which are html
value on value stack are, i think, changed when retreiving from valuestack thru s:property,the problem i have is value with html tag around it is not interpreted properly by browser, like bold java, i think struts2 tag's internal freemarker template do some transformation and its output feed to the browser, what is why html like is litterally printout as it is in browser. as the content i try to spit out onto browser is getting from another application's database which already mixed in html tags with it content, so i just try to retriev them and like browser handle the tag rendering, but struts2 seems do some pre-processing. Kawczynski, David wrote: If you put java onto the value stack, and it remains unchanged when you retrieve it from the value stack, that's expected. If you want java in bold tags, put it in bold tags. Regarding the normal JSP behavior you cited: that's a mystery. Scripting variables don't magically just decide to surround themselves with bold tags. ;) -Original Message- From: samsun [mailto:greg.zh...@barcap.com] Sent: Tuesday, October 06, 2009 12:26 PM To: user@struts.apache.org Subject: Re: iterator tag: how to interpret the property value which are html i got b java / b back samsun wrote: I would like put my question simply like this: in jsp, %! String test=java; % %=test% i got bold Java try to have same thing from struts2 s:set name=test value=%{'java'} s:property value=#test / i got java back,which is not what i want samsun wrote: samsun wrote: I have to iterate thru a list of strings, some of the string element include html tag like lt;bCopmany Names:lt;/b it print out litterlly like this Copmany Names:, not the bolded word Company Names: here is what the iterate tag look like s:iterator value=CompanyNames status=stat tr tds:property / br /td /tr /s:iterator btw, the CompanyNames is getting from other application's database, all the html tags are mixed in beyond my control, so have to display what is there. Thanks Sam -- View this message in context: http://www.nabble.com/iterator-tag%3A-how-to-interpret-the-pro perty-value-which-are-html-tp25769502p25772037.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org Notice: This e-mail message, together with any attachments, contains information of Merck Co., Inc. (One Merck Drive, Whitehouse Station, New Jersey, USA 08889), and/or its affiliates (which may be known outside the United States as Merck Frosst, Merck Sharp Dohme or MSD and in Japan, as Banyu - direct contact information for affiliates is available at http://www.merck.com/contact/contacts.html) that may be confidential, proprietary copyrighted and/or legally privileged. It is intended solely for the use of the individual or entity named on this message. If you are not the intended recipient, and have received this message in error, please notify us immediately by reply e-mail and then delete it from your system. - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org -- View this message in context: http://www.nabble.com/iterator-tag%3A-how-to-interpret-the-property-value-which-are-html-tp25769502p25772816.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: iterator tag: how to interpret the property value which are html
html gets escaped by the 'property' tag. hint: read my other hint. On Tue, Oct 6, 2009 at 10:05 AM, samsun greg.zh...@barcap.com wrote: value on value stack are, i think, changed when retreiving from valuestack thru s:property,the problem i have is value with html tag around it is not interpreted properly by browser, like bold java, i think struts2 tag's internal freemarker template do some transformation and its output feed to the browser, what is why html like is litterally printout as it is in browser. as the content i try to spit out onto browser is getting from another application's database which already mixed in html tags with it content, so i just try to retriev them and like browser handle the tag rendering, but struts2 seems do some pre-processing. Kawczynski, David wrote: If you put java onto the value stack, and it remains unchanged when you retrieve it from the value stack, that's expected. If you want java in bold tags, put it in bold tags. Regarding the normal JSP behavior you cited: that's a mystery. Scripting variables don't magically just decide to surround themselves with bold tags. ;) -Original Message- From: samsun [mailto:greg.zh...@barcap.com] Sent: Tuesday, October 06, 2009 12:26 PM To: user@struts.apache.org Subject: Re: iterator tag: how to interpret the property value which are html i got b java / b back samsun wrote: I would like put my question simply like this: in jsp, %! String test=java; % %=test% i got bold Java try to have same thing from struts2 s:set name=test value=%{'java'} s:property value=#test / i got java back,which is not what i want samsun wrote: samsun wrote: I have to iterate thru a list of strings, some of the string element include html tag like lt;bCopmany Names:lt;/b it print out litterlly like this Copmany Names:, not the bolded word Company Names: here is what the iterate tag look like s:iterator value=CompanyNames status=stat tr tds:property / br /td /tr /s:iterator btw, the CompanyNames is getting from other application's database, all the html tags are mixed in beyond my control, so have to display what is there. Thanks Sam -- View this message in context: http://www.nabble.com/iterator-tag%3A-how-to-interpret-the-pro perty-value-which-are-html-tp25769502p25772037.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org Notice: This e-mail message, together with any attachments, contains information of Merck Co., Inc. (One Merck Drive, Whitehouse Station, New Jersey, USA 08889), and/or its affiliates (which may be known outside the United States as Merck Frosst, Merck Sharp Dohme or MSD and in Japan, as Banyu - direct contact information for affiliates is available at http://www.merck.com/contact/contacts.html) that may be confidential, proprietary copyrighted and/or legally privileged. It is intended solely for the use of the individual or entity named on this message. If you are not the intended recipient, and have received this message in error, please notify us immediately by reply e-mail and then delete it from your system. - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org -- View this message in context: http://www.nabble.com/iterator-tag%3A-how-to-interpret-the-property-value-which-are-html-tp25769502p25772816.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org -- Hey you! Would you help me to carry the stone? Pink Floyd - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: iterator tag: how to interpret the property value which are html
That is exactly what i need,it works!!! Musachy Barroso wrote: html gets escaped by the 'property' tag. hint: read my other hint. On Tue, Oct 6, 2009 at 10:05 AM, samsun greg.zh...@barcap.com wrote: value on value stack are, i think, changed when retreiving from valuestack thru s:property,the problem i have is value with html tag around it is not interpreted properly by browser, like bold java, i think struts2 tag's internal freemarker template do some transformation and its output feed to the browser, what is why html like is litterally printout as it is in browser. as the content i try to spit out onto browser is getting from another application's database which already mixed in html tags with it content, so i just try to retriev them and like browser handle the tag rendering, but struts2 seems do some pre-processing. Kawczynski, David wrote: If you put java onto the value stack, and it remains unchanged when you retrieve it from the value stack, that's expected. If you want java in bold tags, put it in bold tags. Regarding the normal JSP behavior you cited: that's a mystery. Scripting variables don't magically just decide to surround themselves with bold tags. ;) -Original Message- From: samsun [mailto:greg.zh...@barcap.com] Sent: Tuesday, October 06, 2009 12:26 PM To: user@struts.apache.org Subject: Re: iterator tag: how to interpret the property value which are html i got b java / b back samsun wrote: I would like put my question simply like this: in jsp, %! String test=java; % %=test% i got bold Java try to have same thing from struts2 s:set name=test value=%{'java'} s:property value=#test / i got java back,which is not what i want samsun wrote: samsun wrote: I have to iterate thru a list of strings, some of the string element include html tag like lt;bCopmany Names:lt;/b it print out litterlly like this Copmany Names:, not the bolded word Company Names: here is what the iterate tag look like s:iterator value=CompanyNames status=stat tr tds:property / br /td /tr /s:iterator btw, the CompanyNames is getting from other application's database, all the html tags are mixed in beyond my control, so have to display what is there. Thanks Sam -- View this message in context: http://www.nabble.com/iterator-tag%3A-how-to-interpret-the-pro perty-value-which-are-html-tp25769502p25772037.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org Notice: This e-mail message, together with any attachments, contains information of Merck Co., Inc. (One Merck Drive, Whitehouse Station, New Jersey, USA 08889), and/or its affiliates (which may be known outside the United States as Merck Frosst, Merck Sharp Dohme or MSD and in Japan, as Banyu - direct contact information for affiliates is available at http://www.merck.com/contact/contacts.html) that may be confidential, proprietary copyrighted and/or legally privileged. It is intended solely for the use of the individual or entity named on this message. If you are not the intended recipient, and have received this message in error, please notify us immediately by reply e-mail and then delete it from your system. - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org -- View this message in context: http://www.nabble.com/iterator-tag%3A-how-to-interpret-the-property-value-which-are-html-tp25769502p25772816.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org -- Hey you! Would you help me to carry the stone? Pink Floyd - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org -- View this message in context: http://www.nabble.com/iterator-tag%3A-how-to-interpret-the-property-value-which-are-html-tp25769502p25773106.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: Struts 1: character encoding
- Original Message From: senderj send...@hotmail.com To: user@struts.apache.org Sent: Tue, October 6, 2009 3:28:08 AM Subject: Struts 1: character encoding The components I use NetBean, Glassfish, Struts 1, EJB, Toplink, jdbc, MySQL. Basically what I want is to extract info from a web site (utf8 encoded Chinese), store the info in MySQL, retrieve the info and display on my web site for user to update/change it. But I got problem on the character encoding. Here is briefly my logic and coding: (1) extract from a web page which uses UTF-8 encoded, my coding in an EJB run on glassfish: char c = (char) myInputStream.read(); Listtoken; token.add((byte) c); byte[] ba = new byte[token.size()]; for (int i=0; i ba[i] = token.get(i); } String s = new String(ba, UTF-8); I know it can be simpler, but it's a copy of others coding + my amendment. But it works. (2) String s above is stored onto MySQL via toplink, jdbc. Table is DEFAULT CHARSET=utf8. The jdbc URL is jdbc:mysql://mysys:3306/testinguseUnicode=truecharacterEncoding=utf-8. (3) Retrieve by Struts Action via EJB. Both EJB and Action does not have change of string encoding. The Action put the Chinese string into a DynaForm, then to JSP. JSP has %...@page contentType=text/html pageEncoding=UTF-8% and it generates an html input form. (4) However, the Chinese characters were NOT displayed properly in the html form on IE. (5) Anyway, in the html form, I override the incorrect Chinese character by a writing pad with the correct characters (equivalent to unicode 9326 6c5f) and submit. Again, no re-encoding in the Action that process the update. The Action calls an EJB to update the database with the input data. But I found that the database was updated with ascii string #37670;#27743; (exactly this string, not its equivalent encoded). I feel somehow there is/are encoding changes done by the software components I use (Struts? toplink? jdbc?), but don't know which one and I may be wrong. If anybody has any idea on this problem please help. -- View this message in context: http://www.nabble.com/Struts-1%3A-character-encoding-tp25766281p25766281.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org If you're using Tomcat and doing POST via URL, you need to change Tomcat's URL charset encoding. Default is ISO-8859-1, if I remember correctly. Regards, Tommy - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Struts forwarding problem after adding sslext
I needed to switch some pages in my web application over to HTTPS mode (login, data entry, etc.) then switch back to HTTP for pages that do not require it. Using sslext I am able to do that and it works fairly well. Except...I have run into one problem. My web application also has switching between pages for non-logged in users and logged in users. So non-logged in users have a URI where I have something like this - context_root/public and logged in users have a URI something like - context_root/secure My web.xml is configured for authentication where any URI with /secure with require a user that is authenticated (logged in). Prior to implementing SSL I could enter a URL to my application that contained /secure and Tomcat would bring up the login screen. After I logged in the authentication process would automatically take me to the page I had requested in my URL. Now that I have sslext implemented the same test does not work. When I enter a URL containing /secure the login screen pops up, I login but then the authentication process does not know were to go. It does not continue on to the requested URL. While experimenting with the problem I found that I could make it work again by setting the page I requested in the URL to require HTTPS. So now that the sslext mechanism makes sure the login page switches to HTTPS, it breaks the automatic, post-login forwarding to the requested URL unless that URL is also an HTTPS page. Does anyone know of a way to use/configure sslext so it doesn't do that? Or is it a Struts configuration that I need to fix? Thanks, -sonavor -- View this message in context: http://www.nabble.com/Struts-forwarding-problem-after-adding-sslext-tp25774786p25774786.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
RE: Struts 1: character encoding
try to add in the character set you need to MySQL 5.4+ http://dev.mysql.com/doc/refman/5.4/en/adding-collation-unicode-uca.html if you cant locate the charset this means the characters you are adding are UTF-16 characters in which case you'll need to configure UTF-16 for both mysql and your container personally I have i couldnt get chinese colation to work with UTF-8 or any info is incorrect $MYSQL_HOME/share/charsets/index.xml ?xml version='1.0' encoding=utf-8? charsets max-id=99 copyright Copyright (C) 2003 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA /copyright description This file lists all of the available character sets. To make maintaining easier please: - keep records sorted by collation number. - change charsets.max-id when adding a new collation. /description charset name=big5 familyTraditional Chinese/family descriptionBig5 Traditional Chinese/description aliasbig-5/alias aliasbigfive/alias aliasbig-five/alias aliascn-big5/alias aliascsbig5/alias collation name=big5_chinese_ciid=1order=Chinese flagprimary/flag flagcompiled/flag /collation collation name=big5_binid=84order=Binary flagbinary/flag flagcompiled/flag /collation ..snip.. /charset /charsets mysql show collation like 'big5_chinese_ci'; +-+-++-+--+-+ | Collation | Charset | Id | Default | Compiled | Sortlen | +-+-++-+--+-+ | big5_chinese_ci | big5| 1 | Yes | Yes | 1 | +-+-++-+--+-+ 1 row in set (0.02 sec) mysql CREATE TABLE phonebook ( name VARCHAR(64), phone VARCHAR(64) CHARACTER SE T utf8 COLLATE big5_chinese_ci); ERROR 1253 (42000): COLLATION 'big5_chinese_ci' is not valid for CHARACTER SET ' utf8' feel free to correct if you found a way to install big5_chinese_ci on UTF-8 Martin Gainty __ BTW: all these languages listed here are UTF-8 languages: Verzicht und Vertraulichkeitanmerkung/Note de déni et de confidentialité Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaenger sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte Weiterleitung oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht dient lediglich dem Austausch von Informationen und entfaltet keine rechtliche Bindungswirkung. Aufgrund der leichten Manipulierbarkeit von E-Mails koennen wir keine Haftung fuer den Inhalt uebernehmen. Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le destinataire prévu, nous te demandons avec bonté que pour satisfaire informez l'expéditeur. N'importe quelle diffusion non autorisée ou la copie de ceci est interdite. Ce message sert à l'information seulement et n'aura pas n'importe quel effet légalement obligatoire. Étant donné que les email peuvent facilement être sujets à la manipulation, nous ne pouvons accepter aucune responsabilité pour le contenu fourni. Date: Tue, 6 Oct 2009 10:49:41 -0700 From: tommy...@yahoo.com Subject: Re: Struts 1: character encoding To: user@struts.apache.org - Original Message From: senderj send...@hotmail.com To: user@struts.apache.org Sent: Tue, October 6, 2009 3:28:08 AM Subject: Struts 1: character encoding The components I use NetBean, Glassfish, Struts 1, EJB, Toplink, jdbc, MySQL. Basically what I want is to extract info from a web site (utf8 encoded Chinese), store the info in MySQL, retrieve the info and display on my web site for user to update/change it. But I got problem on the character encoding. Here is briefly my logic and coding: (1) extract from a web page which uses UTF-8 encoded, my coding in an EJB run on glassfish: char c = (char) myInputStream.read(); Listtoken; token.add((byte) c); byte[] ba = new byte[token.size()]; for (int i=0; i ba[i] = token.get(i); } String s = new String(ba, UTF-8); I know it can be simpler, but it's a copy of others coding + my amendment. But it works. (2) String s above is stored onto MySQL via toplink, jdbc. Table is DEFAULT CHARSET=utf8. The jdbc URL is jdbc:mysql://mysys:3306/testinguseUnicode=truecharacterEncoding=utf-8. (3) Retrieve by Struts Action via EJB. Both
Re: Struts2 and TestNG
Does this method work if I declare my actions with annotations instead of declaring them in struts.xml? It looks like from the errors I get that it is trying to read the action definitions from the struts.xml file. On 10/5/2009 10:00 PM, Alex Siman wrote: Look here: http://struts.apache.org/2.x/docs/testing-actions.html dolsen-2 wrote: I am looking for some good ways of using TestNG to test my actions. I know I can test them like any other POJO but I would like it to include all the interceptors if possible. Can anyone give me any good resources on how to do this. I am using Struts 2.1.6 and have the TestNG plugin. I am also using annotations to declare my actions.
Re: Struts2 and TestNG
dolsen-2 wrote: Does this method work if I declare my actions with annotations instead of declaring them in struts.xml? Of course, I also declare actions w/ annos. dolsen-2 wrote: It looks like from the errors I get that it is trying to read the action definitions from the struts.xml file. Tests must have struts.xml on class path. My struts.xml contains some constants, interceptors, but not the actions. -- View this message in context: http://www.nabble.com/Struts2-and-TestNG-tp25762448p25776794.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: Struts2 and TestNG
also, make sure the convention plugin is in the classpath for the tests. musachy On Tue, Oct 6, 2009 at 2:22 PM, Alex Siman aleksandr.si...@gmail.com wrote: dolsen-2 wrote: Does this method work if I declare my actions with annotations instead of declaring them in struts.xml? Of course, I also declare actions w/ annos. dolsen-2 wrote: It looks like from the errors I get that it is trying to read the action definitions from the struts.xml file. Tests must have struts.xml on class path. My struts.xml contains some constants, interceptors, but not the actions. -- View this message in context: http://www.nabble.com/Struts2-and-TestNG-tp25762448p25776794.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org -- Hey you! Would you help me to carry the stone? Pink Floyd - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Refactoring of Interceptor.intercept(ActionInvocation)
Is there any way to refactor method [intercept(ActionInvocation)] to remove ActionInvocation parameter. It is not usable to have this parameter, because it makes refactoring of method interceptor hard. Instead of this: public class SomeInterceptor extends AbstractInterceptor { @Override public String intercept(ActionInvocation actionInvocation) throws Exception { oneMethod(actionInvocation); anotherMethod(actionInvocation); return actionInvocation.invoke(); } public void oneMethod(ActionInvocation actionInvocation) throws Exception { // code depended on actionInvocation } public void anotherMethod(ActionInvocation actionInvocation) throws Exception { // code depended on actionInvocation } } I would like to have this one: public class SomeInterceptor extends AbstractInterceptor { @Override public String intercept() throws Exception { // get actionInvocation from somewhere oneMethod(); anotherMethod(); return actionInvocation.invoke(); } public void oneMethod() throws Exception { // get actionInvocation from somewhere } public void anotherMethod() throws Exception { // get actionInvocation from somewhere } } -- View this message in context: http://www.nabble.com/Refactoring-of-Interceptor.intercept%28ActionInvocation%29-tp25779342p25779342.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: Refactoring of Interceptor.intercept(ActionInvocation)
Is it safe to get ActionInvocation inside of [Interceptor.intercept()] in this way?: ActionInvocation invocation = ActionContext.getContext().getActionInvocation(); Alex Siman wrote: Is there any way to refactor method [intercept(ActionInvocation)] to remove ActionInvocation parameter. It is not usable to have this parameter, because it makes refactoring of method interceptor hard. Instead of this: public class SomeInterceptor extends AbstractInterceptor { @Override public String intercept(ActionInvocation actionInvocation) throws Exception { oneMethod(actionInvocation); anotherMethod(actionInvocation); return actionInvocation.invoke(); } public void oneMethod(ActionInvocation actionInvocation) throws Exception { // code depended on actionInvocation } public void anotherMethod(ActionInvocation actionInvocation) throws Exception { // code depended on actionInvocation } } I would like to have this one: public class SomeInterceptor extends AbstractInterceptor { @Override public String intercept() throws Exception { // get actionInvocation from somewhere oneMethod(); anotherMethod(); return actionInvocation.invoke(); } public void oneMethod() throws Exception { // get actionInvocation from somewhere } public void anotherMethod() throws Exception { // get actionInvocation from somewhere } } -- View this message in context: http://www.nabble.com/Refactoring-of-Interceptor.intercept%28ActionInvocation%29-tp25779342p25779697.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: Refactoring of Interceptor.intercept(ActionInvocation)
yes, although I am kind of confused about your first email. musachy On Tue, Oct 6, 2009 at 7:50 PM, Alex Siman aleksandr.si...@gmail.com wrote: Is it safe to get ActionInvocation inside of [Interceptor.intercept()] in this way?: ActionInvocation invocation = ActionContext.getContext().getActionInvocation(); Alex Siman wrote: Is there any way to refactor method [intercept(ActionInvocation)] to remove ActionInvocation parameter. It is not usable to have this parameter, because it makes refactoring of method interceptor hard. Instead of this: public class SomeInterceptor extends AbstractInterceptor { @Override public String intercept(ActionInvocation actionInvocation) throws Exception { oneMethod(actionInvocation); anotherMethod(actionInvocation); return actionInvocation.invoke(); } public void oneMethod(ActionInvocation actionInvocation) throws Exception { // code depended on actionInvocation } public void anotherMethod(ActionInvocation actionInvocation) throws Exception { // code depended on actionInvocation } } I would like to have this one: public class SomeInterceptor extends AbstractInterceptor { @Override public String intercept() throws Exception { // get actionInvocation from somewhere oneMethod(); anotherMethod(); return actionInvocation.invoke(); } public void oneMethod() throws Exception { // get actionInvocation from somewhere } public void anotherMethod() throws Exception { // get actionInvocation from somewhere } } -- View this message in context: http://www.nabble.com/Refactoring-of-Interceptor.intercept%28ActionInvocation%29-tp25779342p25779697.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org -- Hey you! Would you help me to carry the stone? Pink Floyd - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: Refactoring of Interceptor.intercept(ActionInvocation)
Am I right that storing request/session related info as interceptor fields is NOT safe due to concurrency? Such as interceptors are singletons and shared across all concurrent requests. Musachy Barroso wrote: yes, although I am kind of confused about your first email. musachy On Tue, Oct 6, 2009 at 7:50 PM, Alex Siman aleksandr.si...@gmail.com wrote: Is it safe to get ActionInvocation inside of [Interceptor.intercept()] in this way?: ActionInvocation invocation = ActionContext.getContext().getActionInvocation(); Alex Siman wrote: Is there any way to refactor method [intercept(ActionInvocation)] to remove ActionInvocation parameter. It is not usable to have this parameter, because it makes refactoring of method interceptor hard. Instead of this: public class SomeInterceptor extends AbstractInterceptor { @Override public String intercept(ActionInvocation actionInvocation) throws Exception { oneMethod(actionInvocation); anotherMethod(actionInvocation); return actionInvocation.invoke(); } public void oneMethod(ActionInvocation actionInvocation) throws Exception { // code depended on actionInvocation } public void anotherMethod(ActionInvocation actionInvocation) throws Exception { // code depended on actionInvocation } } I would like to have this one: public class SomeInterceptor extends AbstractInterceptor { @Override public String intercept() throws Exception { // get actionInvocation from somewhere oneMethod(); anotherMethod(); return actionInvocation.invoke(); } public void oneMethod() throws Exception { // get actionInvocation from somewhere } public void anotherMethod() throws Exception { // get actionInvocation from somewhere } } -- View this message in context: http://www.nabble.com/Refactoring-of-Interceptor.intercept%28ActionInvocation%29-tp25779342p25779697.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org -- Hey you! Would you help me to carry the stone? Pink Floyd - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org -- View this message in context: http://www.nabble.com/Refactoring-of-Interceptor.intercept%28ActionInvocation%29-tp25779342p25780145.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: Refactoring of Interceptor.intercept(ActionInvocation)
What does that have to do with method parameters? The ActionInvocation and any local variables are thread safe. I think the problem we're having in helping you is none of us understand what you're trying to accomplish? For instance why would you be trying to refactor away parameters that are required by an interface? (*Chris*) On Tue, Oct 6, 2009 at 8:56 PM, Alex Siman aleksandr.si...@gmail.comwrote: Am I right that storing request/session related info as interceptor fields is NOT safe due to concurrency? Such as interceptors are singletons and shared across all concurrent requests. Musachy Barroso wrote: yes, although I am kind of confused about your first email. musachy On Tue, Oct 6, 2009 at 7:50 PM, Alex Siman aleksandr.si...@gmail.com wrote: Is it safe to get ActionInvocation inside of [Interceptor.intercept()] in this way?: ActionInvocation invocation = ActionContext.getContext().getActionInvocation(); Alex Siman wrote: Is there any way to refactor method [intercept(ActionInvocation)] to remove ActionInvocation parameter. It is not usable to have this parameter, because it makes refactoring of method interceptor hard. Instead of this: public class SomeInterceptor extends AbstractInterceptor { @Override public String intercept(ActionInvocation actionInvocation) throws Exception { oneMethod(actionInvocation); anotherMethod(actionInvocation); return actionInvocation.invoke(); } public void oneMethod(ActionInvocation actionInvocation) throws Exception { // code depended on actionInvocation } public void anotherMethod(ActionInvocation actionInvocation) throws Exception { // code depended on actionInvocation } } I would like to have this one: public class SomeInterceptor extends AbstractInterceptor { @Override public String intercept() throws Exception { // get actionInvocation from somewhere oneMethod(); anotherMethod(); return actionInvocation.invoke(); } public void oneMethod() throws Exception { // get actionInvocation from somewhere } public void anotherMethod() throws Exception { // get actionInvocation from somewhere } } -- View this message in context: http://www.nabble.com/Refactoring-of-Interceptor.intercept%28ActionInvocation%29-tp25779342p25779697.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org -- Hey you! Would you help me to carry the stone? Pink Floyd - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org -- View this message in context: http://www.nabble.com/Refactoring-of-Interceptor.intercept%28ActionInvocation%29-tp25779342p25780145.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
How to use different configurations?
Hi there, my name is Marcelo and I'm new to the list. I use struts for some time and have some projects in it. But I'm in a new situation now. My customer have two different business and he want the same application for both, but detached. This application was developed with Struts2 and Spring (for dependency injection) and the core is the same for both business. It has just some different properties. For example, main database (host, user, pass and schema), sync database (host, user, pass and schema) [our system communicates with another system throw an oracle database that we call sync database], and some minor preferences like application title, some default filters. All these settings are in a properties file for each customer. How do I config struts to load these properties and use in my struts.xml? Is the interceptor a good way to put some of these properties in the ValueStack? Do I need to deploy two times the same application, only changing the properties file? Or is there a way to dynamically select the correct for each http request? I was thinking about creating a localhost.property, business1.property and business2.property. Creating a symbolic link to my localhost.property I could run the application on development server. And in Ant I could create two targets, one for each business, and the only difference is which file they will copy (business1.property or business2.property). Is there an easy way to do this? Thanks for your help and time, Salhab - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Creating connection object in Handlers
Hi , Is it a best practice to create a connection object in handlers and sending that object to DB functions that are called from handlers? Previously I was creating connection object in every DB function and closing it while coming back. I got some connection issues and now I am creating single connection object in the handler and sending it to every DB function and closing that connecition in the handler finally. Please let me know following this is a best practice or not. thanks in advance Shikai -- View this message in context: http://www.nabble.com/Creating-connection-object-in-Handlers-tp25780832p25780832.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org