Re: Using Tiles with fmt:setBundle
Put it into the layout jsp. [EMAIL PROTECTED] wrote: I'm using Tiles and 2 resource bundles. The problem is that I have to define them for every page I'm creating. Isn't there a way to define a bundle in de template page, and use them in every tile? Tia This message is for the designated recipient only and may contain privileged, proprietary, or otherwise private information. If you have received it in error, please notify the sender immediately and delete the original. Any other use of the email by you is prohibited. Thanks and Regards, Novin Jaiswal +919890089443(M) +912026901306(O) direct +912026982424 Extn:1306 - Don't be flakey. Get Yahoo! Mail for Mobile and always stay connected to friends.
Want to make a IS0-8859-1 compliant application to UTF-8
Hi Friends, Problem Description : I am working on a web application(3 tier) which is IS0-8859-1 compliant. Want to convert it to UTF-8 for cyrillic language support. Application architecture: Jsp , Strurts , I18N,JSTL. I had performed following steps to make it UTF-8. 1) JSP pg/ html pg : <[EMAIL PROTECTED] pageEncoding="UTF-8" contentType="text/html; charset=UTF-8"%> Application properties are picking up by struts based on locale. for ex. in Euro market en_EUR is the locale then a ApplicationResources_en_EUR.properties Should I change the properties encoding type to UTF-8? Please let me know the exact steps to convert the existing web application from IS0-8859-1 compliant application to UTF-8. This application is working fine for french and spanish language. Now I want to give support for cyrillic or UTF-8. Thanks Novin. - Talk is cheap. Use Yahoo! Messenger to make PC-to-Phone calls. Great rates starting at 1¢/min.
Re: R: UTF-8 encoding & tag problem
Hi Marcello, Thanks for ur suggestion it's really helpful for me. My all property file text were genereted using IS0-8859 char set & now I had convereted it to UTF-8 in editor setting of my eclipse. Aftre doing that few of the special symbols got wiered. Wht should I do should I write a programe to convert from IS0-8859 to UTF-8 all those test?. Will this work? regards, Novin Marcello Savino <[EMAIL PROTECTED]> wrote: You said you pasted UTF-8 Characters in the application resource but what kind of editor are you using ? For Instance if you're workin' whith Eclipse you must be sure to set the utf-8 coding in the editor properties. HIH Ciao, marcello -Messaggio originale- Da: navin mca [mailto:[EMAIL PROTECTED] Inviato: martedì ±7 ottobre 2006 16.06 A: struts user group Oggetto: UTF-8 encoding & tag problem Hi Team, My current project is supporting charachter encoding IS0-8859 and now we have to support UTF-8. for that I had made following changes 1) in all jsp files 2) in all html Now I had pasted some UTF-8 charachters in application resources file. But In JSP page I m getting problem where text is picking up from resource bundle. I m using Wht should I do? Help me. I know that there should be some machanism needed to make the Do I need to save the application properties file with Encoding UTF-8?...wht else? Hope you undersand my problem. regards, Novin Thanks and Regards, Novin Jaiswal +919890089443(M) +912026901306(O) direct +912026982424 Extn:1306 - Stay in the know. Pulse on the new Yahoo.com. Check it out. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] Thanks and Regards, Novin Jaiswal +919890089443(M) +912026901306(O) direct +912026982424 Extn:1306 - Get your own web address for just $1.99/1st yr. We'll help. Yahoo! Small Business.
UTF-8 encoding & tag problem
Hi Team, My current project is supporting charachter encoding IS0-8859 and now we have to support UTF-8. for that I had made following changes 1) in all jsp files <[EMAIL PROTECTED] pageEncoding="UTF-8" contentType="text/html; charset=UTF-8"%> 2) in all html Now I had pasted some UTF-8 charachters in application resources file. But In JSP page I m getting problem where text is picking up from resource bundle. I m using
Re: Getting the definition a tile is in (WAS: tiles and forwards)
>Do you mean that, inside a JSP page, you are able to get the definition >that contains the current JSP page? It won't give the definiton which content the current page but u have to give the definition name which contains the current page. U have to pass the definition name to the Definitionfactory it will return the Object of that definiton where u can iterate through the hashMap of its member( in definition file) and u can play with the definition file at run time. Here is the code import org.apache.struts.tiles.ComponentDefinition; import org.apache.struts.tiles.DefinitionsUtil; function{ ComponentDefinition definition = null; String strDef = "dynamicTiles";//dynamicTiles try { definition = DefinitionsUtil.getDefinition(strDef,request, request.getSession().getServletContext()); HashMap mapAttributes = (HashMap)definition.getAttributes(); if( mapAttributes != null) { //getting the putlist 's ArrayList 's reference by its name ArrayList listBody = (ArrayList)mapAttributes.get("body"); >If yes, what are you waiting for, post the code! (please) :-P Ciao Antonio Antonio Petrelli <[EMAIL PROTECTED]> wrote: navin mca ha scritto: > Hi, > > We can get the whole defition at run time and can also get its attributes and > their value. > > Let me know if this help you then i will post the code. > Do you mean that, inside a JSP page, you are able to get the definition that contains the current JSP page? If yes, what are you waiting for, post the code! (please) :-P Ciao Antonio - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] Thanks and Regards, Novin Jaiswal +919890089443(M) +912039511388(H) +912026901306(O) direct +912026982424 Extn:1306 __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com
Re: Getting the definition a tile is in (WAS: tiles and forwards)
Hi, We can get the whole defition at run time and can also get its attributes and their value. Let me know if this help you then i will post the code. regards, Novin Antonio Petrelli <[EMAIL PROTECTED]> wrote: Sorry again, for a mistake I hijacked TWICE my own thread! Ugh this is a very bad day! If it doesn't work now I will give up, I swear! I am starting a new thread to rephrase a question from Rudolph Lang, so that other users can see this question, because I don't know the answer. Rudolph Lang (and I am pretty curious about the answer :-) ) wants to know if there is a way to get the Tiles definition that contains the current JSP page from the JSP page itself. For instance given the definition: Can the "locale.jsp" page know that it is the "main.layout" definition from the inside the JSP page itself? I hope that someone else can answer his question. Ciao Antonio - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] Thanks and Regards, Novin Jaiswal +919890089443(M) +912039511388(H) +912026901306(O) direct +912026982424 Extn:1306 __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com
Re: urgent
Then map the same form bean against the action of the current jsp page in struts config. Abhimanyu Koul <[EMAIL PROTECTED]> wrote: hi all! I use to display some values of an Action form (in the request). now, i want to set those values(fields) again in the action form so that i can use those values in the next page as well. please tell me the way out. Abhimanyu Koul FinEng Solutions (P) Ltd. Dani Compound, 158, Vidyanagari Marg, Kalina, Santacruz (East), Mumbai - 400 098 Mobile : +91 9860582533 Thanks and Regards, Novin Jaiswal +919890089443(M) +912039511388(H) +912026901306(O) direct +912026982424 Extn:1306 - Love cheap thrills? Enjoy PC-to-Phone calls to 30+ countries for just 2¢/min with Yahoo! Messenger with Voice.
Re: get ResourceBundle in ActionForm subclass
Hi, Follow these steps. 1. Define ApllicationResources_locale specific property file. 2. add the message keys to thse different locale specific property file. 3. in Jsp file set the locale based on the reuest parameters. with wrote: Hi all, i want to use externalized messages in the validation errors of a ActionForm subclass. I have this code: [...] public ActionErrors validate(ActionMapping mapping, HttpServletRequest request) { ActionErrors errors = new ActionErrors(); /* * required fields */ if (orgName == null || orgName.equals("")) { errors.add("orgName", new ActionMessage("employer.orgName.requiredfield")); } [...] and works pretty good, but i want to use ActionMessages with a parameter with the name of the required field. For instance: [...] if (orgName == null || orgName.equals("")) { errors.add("orgName", new ActionMessage("employer.requiredfield", "employer.orgName")); } [...] But in jsp view, it generates "employer.orgName is required" I want to get the ResourceBundle to "translate" the employer.orgName to the value assigned in .properties file. How can i do it? thanks -- ;-) Jorge Martin Cuervo Analista Programador Outsourcing Emarketplace deFacto Powered by Standards email voz +34 985 129 820 voz +34 660 026 384 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] Thanks and Regards, Novin Jaiswal +919890089443(M) +912039511388(H) +912026901306(O) direct +912026982424 Extn:1306 - Yahoo! Messenger with Voice. PC-to-Phone calls for ridiculously low rates.
Re: Is tile definations Instance is singleton
Hi Antonio, Thanks alot for your support to the community, I really appreciate it. >It depends on your implementation. Anyway I think the solution I wrote >in the last e-mail is better for you (the one with JSP Tiles custom tags). > Even wht u have suugested, I had already thought to implement it first by creating two diffrent definition file to cater this problem with some layout page which will handle the condition. Thanks once gain regards, Novin Antonio Petrelli <[EMAIL PROTECTED]> wrote: navin mca ha scritto: > Hi Antonio , > > > > value="/WEB-INF/dimensions-config.xml"/> > WHOOPS!! I am sorry wrong cun'n'paste: value="my.package.FactorySetSubClass"/> > > 1. wht should I put in dimensions-config.xml file (Do you want to say that I > should put my tile definition in it which is having such complex accessing > problem.) > Err... sorry again, ignore it :-P > > 2. wht should I do to implement DefinitionsFactory or extend FactorySet , I > had read the documentation but there is no much help regarding these classes. > In fact you are right, there is no tutorial or such, only Javadocs: http://struts.apache.org/struts-action/struts-tiles/apidocs/org/apache/struts/tiles/xmlDefinition/DefinitionsFactory.html http://struts.apache.org/struts-action/struts-tiles/apidocs/org/apache/struts/tiles/xmlDefinition/FactorySet.html > Do u want to say that after making above configuration in the struts config > file FactorySet will be automatically implemented by struts and one request > will be served by one exclusive instance of the same tile definition file. > It depends on your implementation. Anyway I think the solution I wrote in the last e-mail is better for you (the one with JSP Tiles custom tags). > > if not then let me explain or direct me to some example or tutorial. > There is probably no example of using the multi-channel support of Tiles, maybe only Dimensions tried to use it. HTH Ciao Antonio - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] Thanks and Regards, Novin Jaiswal +919890089443(M) +912039511388(H) +912026901306(O) direct +912026982424 Extn:1306 - Sneak preview the all-new Yahoo.com. It's not radically different. Just radically better.
Re: Is tile definations Instance is singleton
Hi Antonio , Thanks alot for your help. Could u pls explain me how following code will help me to solve the race condition 1. wht should I put in dimensions-config.xml file (Do you want to say that I should put my tile definition in it which is having such complex accessing problem.) 2. wht should I do to implement DefinitionsFactory or extend FactorySet , I had read the documentation but there is no much help regarding these classes. Do u want to say that after making above configuration in the struts config file FactorySet will be automatically implemented by struts and one request will be served by one exclusive instance of the same tile definition file. if not then let me explain or direct me to some example or tutorial. Hope my queries are sensible to you. regards, Novin Antonio Petrelli <[EMAIL PROTECTED]> wrote: navin mca ha scritto: > Hi Antonio, > > >Oh boy your English gave me an headache! > > I am really sorry for my bad english. > > Following is my tile definition. > > > > > > > > > > > > > > Here > > > > is the condional tile which will be added/removed at run time from the tile > definition object based on some request flag. > > So my query is > > What will happen when there will be multiple calls for the same Tile > definition for both form of the tile object(with or without position3.jsp > tile) > It is a so-called race-condition: it depends what happens first. Anyway it will lead you to a 50% chance to have it wrong. How Tiles definitions are created depends on the DefinitionsFactory. The default one creates definitions for their use in the whole application. Therefore if you change it once, it will be changed forever (until you change it again :-P ). The only way to solve your problem is to implement DefinitionsFactory or extend FactorySet class. To configure it modify struts-config.xml this way: **snip** value="/WEB-INF/dimensions-config.xml"/> **snap** Ciao Antonio - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] Thanks and Regards, Novin Jaiswal +919890089443(M) +912039511388(H) +912026901306(O) direct +912026982424 Extn:1306 - Talk is cheap. Use Yahoo! Messenger to make PC-to-Phone calls. Great rates starting at 1¢/min.
RE: Req on
Hi Javascript...the right way one change of the one select combo box call some function which will fill up the othercombo box. U can search on google for such code. regards Novin "Miller, Andy" <[EMAIL PROTECTED]> wrote: Javascript... Andy Miller IS Designer Butte College 530.895.2946 -Original Message- From: Radha Krishna [mailto:[EMAIL PROTECTED] Sent: Monday, May 22, 2006 7:56 AM To: user@struts.apache.org Subject: Req on Hi All, I have one simple question. i have two controls in same form. when we select one control,then other one should get populated without calling the Action ie the options in the second control depends on the selected value of first control. please tell me the best way to handle this one. thanks in advance __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] Thanks and Regards, Novin Jaiswal +919890089443(M) +912039511388(H) +912026901306(O) direct +912026982424 Extn:1306 - Talk is cheap. Use Yahoo! Messenger to make PC-to-Phone calls. Great rates starting at 1¢/min.
Re: How to set hidden field in struts
Hi Pankaj, U can use following tag >Also I intend to set a hidden field in the next page to be displayed and check it before loading of the new page. If the hidden field is not set, the new page wont be loaded and the user would be redirected to the login page. where u can set its value into a bean 's field and that will be mapped to property attribute. U can call a javacsript function on form load event where u can check the value of the field if matches or exist then let the form load and if not then redirect the request to login form. regards, Novin Pankaj Gupta <[EMAIL PROTECTED]> wrote: Hi, I want to implement a feature in struts wherein nobody can open a page directly by copying the url and pasting it in a new browser window.i.e. any page of the application can only be reached through login page. If the user pastes the url in the browser, he is redirected to the login page. For this I am planning to keep the user's role in session scope and verify it before loading any page. Also I intend to set a hidden field in the next page to be displayed and check it before loading of the new page. If the hidden field is not set, the new page wont be loaded and the user would be redirected to the login page. Please suggest if it is the right way and if yes how can I set a hidden field in struts. regards, Panks - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] Thanks and Regards, Novin Jaiswal +919890089443(M) +912039511388(H) +912026901306(O) direct +912026982424 Extn:1306 - Feel free to call! Free PC-to-PC calls. Low rates on PC-to-Phone. Get Yahoo! Messenger with Voice
Re: Is tile definations Instance is singleton
Hi Antonio, >Oh boy your English gave me an headache! I am really sorry for my bad english. Following is my tile definition. Here is the condional tile which will be added/removed at run time from the tile definition object based on some request flag. So my query is What will happen when there will be multiple calls for the same Tile definition for both form of the tile object(with or without position3.jsp tile) Means for multiple user request , bcas the struts manages only a single object of the tile definition with the same single attribute hashmap as a member var. of the definiton object. This will lead to problem when simultaneous multiple user request will come. I had checked the references of that hashmap for multiple request while storing that map in servletcontext and using two different browser/session. The reference of hashmap of attributes /tile definition remain same. PLs let me know ur commnets on this. regards, Novin Antonio Petrelli <[EMAIL PROTECTED]> wrote: navin mca ha scritto: > Hi, > > I my project at run time when modify the tile definition based on some > condition. > > Wht I want to know that when symultaneous request come for that tile (which > will be used in rendering the page for that request.) Unexpected results for > diff user. > > > for e.g > > one userwithoutBody the from the tile definition we will remove the attribute > 'body' and for the userwithBody 's request we will add attribute 'body' in > the definition at run time. > > In the above scenerio is it possible that tile definition(where attribute > 'body' is removed for userwithoutBody ) can be sent back to userwithBody due > to multiple request coming for userwithoutBody & userwithoutBody. > > the above code is my action handler. > > Basically this qn. bvelongs to multithreading. > > Do i need to use synchonised block? > > Pls let me know. > Oh boy your English gave me an headache! Anyway are you trying to modify Tiles definitions at runtime? If so, remember that you change it for EVERY user, at least if you are trying to use the default DefinitionsFactory. If you want to give different Tiles definitions for different users (this is something like "MyYahoo" and similar) consider implementing DefinitionsFactory or FactorySet (that is better). If you only need different tiles definitions with different user ROLES, then consider downloading Dimensions: http//mutidimensions.sf.net/ HTH Antonio - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] Thanks and Regards, Novin Jaiswal +919890089443(M) +912039511388(H) +912026901306(O) direct +912026982424 Extn:1306 - Be a chatter box. Enjoy free PC-to-PC calls with Yahoo! Messenger with Voice.
Is tile definations Instance is singleton
Hi, I my project at run time when modify the tile definition based on some condition. Wht I want to know that when symultaneous request come for that tile (which will be used in rendering the page for that request.) Unexpected results for diff user. for e.g one userwithoutBody the from the tile definition we will remove the attribute 'body' and for the userwithBody 's request we will add attribute 'body' in the definition at run time. In the above scenerio is it possible that tile definition(where attribute 'body' is removed for userwithoutBody ) can be sent back to userwithBody due to multiple request coming for userwithoutBody & userwithoutBody. the above code is my action handler. Basically this qn. bvelongs to multithreading. Do i need to use synchonised block? Pls let me know. regards, Novin. - Talk is cheap. Use Yahoo! Messenger to make PC-to-Phone calls. Great rates starting at 1¢/min.