RE: using ApplicationResources in jsp...
Struts has a class called RequestUtils and you can call RequestUtils.message(pageContext, bundle, locale, key); But maybe you should be creating your array in the Action and passing storing it in the Form for the JSP to grab. Then you can get messages in an action like this: // default bundle MessageResources mr1 = getResources(request); String s1 = mr1.getMessage("welcome.message"); // some other bundle MessageResources mr2 = getResources(request, "alt_bundle"); String s2 = mr2.getMessage("welcome.message"); - Dan > -Original Message- > From: AMIR-TAHMASSEB Marc [mailto:[EMAIL PROTECTED] > Sent: Friday, December 05, 2003 6:16 AM > To: Struts Users Mailing List > Subject: RE: using ApplicationResources in jsp... > > > because i have to put it on an array of String and then i use > this array in the code by a generic code. > > > -Message d'origine- > > De : Jimmy Emmanual [mailto:[EMAIL PROTECTED] > > Envoyé : vendredi 5 décembre 2003 15:10 > > À : 'Struts Users Mailing List' > > Objet : RE: using ApplicationResources in jsp... > > > > > > why do you need to? why not just: > > > > > > > > > > > > > > > > > > -Original Message- > > From: AMIR-TAHMASSEB Marc > [mailto:[EMAIL PROTECTED] > > Sent: Friday, December 05, 2003 9:07 AM > > To: Struts Users Mailing List > > Subject: RE: using ApplicationResources in jsp... > > > > > > because i need to get the value of my property inside a <% ... %> > > > > > -Message d'origine- > > > De : Hunziker Dennis [mailto:[EMAIL PROTECTED] > > > Envoyé : vendredi 5 décembre 2003 15:03 > > > À : 'Struts Users Mailing List' > > > Objet : RE: using ApplicationResources in jsp... > > > > > > > > > why not try the following: > > > > > > > > > -Original Message- > > > From: AMIR-TAHMASSEB Marc > > [mailto:[EMAIL PROTECTED] > > > Sent: Freitag, 5. Dezember 2003 15:01 > > > To: [EMAIL PROTECTED] > > > Subject: using ApplicationResources in jsp... > > > > > > > > > Hi, > > > i wonder to know if it's possible to use a property in > > > ApplciationResources > > > in the jsp code. > > > > > > I want to do something like this : > > > > > > > > > <%@ page language="java" %> > > > <%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %> > > > <%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %> > > > <%@ taglib uri="/WEB-INF/struts-template.tld" prefix="template" %> > > > <%@ taglib uri="/WEB-INF/struts-logic.tld"prefix="logic" %> > > > <% > > > String title = title.from.ressources; // i don't know how > > > to access it ! > > > %> > > > > > > > > > <%=title%> > > > > > > > > > > > > > > > > > > -- > > > Marc AMIR-TAHMASSEB > > > [EMAIL PROTECTED] > > > <mailto:[EMAIL PROTECTED]> > > > > > > > > > > > > > > - > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > - > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: using ApplicationResources in jsp...
try this: <% String var2 = var %> There is certainly a way of doing it with jstl, nut i don't know it now. Mehdi - Original Message - From: "AMIR-TAHMASSEB Marc" <[EMAIL PROTECTED]> To: "Struts Users Mailing List" <[EMAIL PROTECTED]> Sent: Friday, December 05, 2003 2:15 PM Subject: RE: using ApplicationResources in jsp... because i have to put it on an array of String and then i use this array in the code by a generic code. > -Message d'origine- > De : Jimmy Emmanual [mailto:[EMAIL PROTECTED] > Envoyé : vendredi 5 décembre 2003 15:10 > À : 'Struts Users Mailing List' > Objet : RE: using ApplicationResources in jsp... > > > why do you need to? why not just: > > > > > > > > > -Original Message- > From: AMIR-TAHMASSEB Marc [mailto:[EMAIL PROTECTED] > Sent: Friday, December 05, 2003 9:07 AM > To: Struts Users Mailing List > Subject: RE: using ApplicationResources in jsp... > > > because i need to get the value of my property inside a <% ... %> > > > -Message d'origine----- > > De : Hunziker Dennis [mailto:[EMAIL PROTECTED] > > Envoyé : vendredi 5 décembre 2003 15:03 > > À : 'Struts Users Mailing List' > > Objet : RE: using ApplicationResources in jsp... > > > > > > why not try the following: > > > > > > -Original Message- > > From: AMIR-TAHMASSEB Marc > [mailto:[EMAIL PROTECTED] > > Sent: Freitag, 5. Dezember 2003 15:01 > > To: [EMAIL PROTECTED] > > Subject: using ApplicationResources in jsp... > > > > > > Hi, > > i wonder to know if it's possible to use a property in > > ApplciationResources > > in the jsp code. > > > > I want to do something like this : > > > > > > <%@ page language="java" %> > > <%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %> > > <%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %> > > <%@ taglib uri="/WEB-INF/struts-template.tld" prefix="template" %> > > <%@ taglib uri="/WEB-INF/struts-logic.tld"prefix="logic" %> > > <% > > String title = title.from.ressources; // i don't know how > > to access it ! > > %> > > > > > > <%=title%> > > > > > > > > > > > > -- > > Marc AMIR-TAHMASSEB > > [EMAIL PROTECTED] > > <mailto:[EMAIL PROTECTED]> > > > > > > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: using ApplicationResources in jsp...
On Fri, 5 Dec 2003, Ralf Rapude wrote: > Hi Gary, > >I am facing the same trouble. If u come to know the answer Please let me > >know as well > >Thanks in Advance > I havn't been able to find a solution yet though asking in several ngs > and forums. > I will post to the list if the problem is solved (but I still hope, > that someone of the listmembers knows which way to go :o). ...doing that will create a scripting variable that you can use in your own scriptlet. See the docs for more help (there is even a JSTL equivalent IN THE DOCS) > > Regards > Ralf Rapude > > > > Hi, > > with a logic:iterate tag I run over a Collection: > > > > > > > > ...output > > > > > > > > It works well but if I try to iterate over the same collection after > > changing the id (but still in the same jsp): > > > > > > > > ... output > > > > > > > > I got this Exception -> Cannot create iterator for this collection > > > > It works if I put my collection under a different name in the > > session-scope, but in my Opinion there must be a more proper way to > > handle the problem. > > > > Thanks a lot > > Ralf > > > > > > > > > > - > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > -- James Mitchell Software Developer / Struts Evangelist http://www.struts-atlanta.org - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: using ApplicationResources in jsp...
Hi Gary, >I am facing the same trouble. If u come to know the answer Please let me >know as well >Thanks in Advance I havn't been able to find a solution yet though asking in several ngs and forums. I will post to the list if the problem is solved (but I still hope, that someone of the listmembers knows which way to go :o). Regards Ralf Rapude > Hi, > with a logic:iterate tag I run over a Collection: > > > > ...output > > > > It works well but if I try to iterate over the same collection after > changing the id (but still in the same jsp): > > > > ... output > > > > I got this Exception -> Cannot create iterator for this collection > > It works if I put my collection under a different name in the > session-scope, but in my Opinion there must be a more proper way to > handle the problem. > > Thanks a lot > Ralf > > > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: using ApplicationResources in jsp...
I want to do something like this in my jsp : <% XXX.getRessources().getMessage("title.from.ressources"); %> but i don't know what to put instead of XXX. > -Message d'origine- > De : Hunziker Dennis [mailto:[EMAIL PROTECTED] > Envoyé : vendredi 5 décembre 2003 15:03 > À : 'Struts Users Mailing List' > Objet : RE: using ApplicationResources in jsp... > > > why not try the following: > > > -Original Message- > From: AMIR-TAHMASSEB Marc [mailto:[EMAIL PROTECTED] > Sent: Freitag, 5. Dezember 2003 15:01 > To: [EMAIL PROTECTED] > Subject: using ApplicationResources in jsp... > > > Hi, > i wonder to know if it's possible to use a property in > ApplciationResources > in the jsp code. > > I want to do something like this : > > > <%@ page language="java" %> > <%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %> > <%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %> > <%@ taglib uri="/WEB-INF/struts-template.tld" prefix="template" %> > <%@ taglib uri="/WEB-INF/struts-logic.tld"prefix="logic" %> > <% > String title = title.from.ressources; // i don't know how > to access it ! > %> > > > <%=title%> > > > > > > -- > Marc AMIR-TAHMASSEB > [EMAIL PROTECTED] > <mailto:[EMAIL PROTECTED]> > > > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: using ApplicationResources in jsp...
because i have to put it on an array of String and then i use this array in the code by a generic code. > -Message d'origine- > De : Jimmy Emmanual [mailto:[EMAIL PROTECTED] > Envoyé : vendredi 5 décembre 2003 15:10 > À : 'Struts Users Mailing List' > Objet : RE: using ApplicationResources in jsp... > > > why do you need to? why not just: > > > > > > > > > -Original Message- > From: AMIR-TAHMASSEB Marc [mailto:[EMAIL PROTECTED] > Sent: Friday, December 05, 2003 9:07 AM > To: Struts Users Mailing List > Subject: RE: using ApplicationResources in jsp... > > > because i need to get the value of my property inside a <% ... %> > > > -Message d'origine- > > De : Hunziker Dennis [mailto:[EMAIL PROTECTED] > > Envoyé : vendredi 5 décembre 2003 15:03 > > À : 'Struts Users Mailing List' > > Objet : RE: using ApplicationResources in jsp... > > > > > > why not try the following: > > > > > > -Original Message----- > > From: AMIR-TAHMASSEB Marc > [mailto:[EMAIL PROTECTED] > > Sent: Freitag, 5. Dezember 2003 15:01 > > To: [EMAIL PROTECTED] > > Subject: using ApplicationResources in jsp... > > > > > > Hi, > > i wonder to know if it's possible to use a property in > > ApplciationResources > > in the jsp code. > > > > I want to do something like this : > > > > > > <%@ page language="java" %> > > <%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %> > > <%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %> > > <%@ taglib uri="/WEB-INF/struts-template.tld" prefix="template" %> > > <%@ taglib uri="/WEB-INF/struts-logic.tld"prefix="logic" %> > > <% > > String title = title.from.ressources; // i don't know how > > to access it ! > > %> > > > > > > <%=title%> > > > > > > > > > > > > -- > > Marc AMIR-TAHMASSEB > > [EMAIL PROTECTED] > > <mailto:[EMAIL PROTECTED]> > > > > > > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: using ApplicationResources in jsp...
why do you need to? why not just: -Original Message- From: AMIR-TAHMASSEB Marc [mailto:[EMAIL PROTECTED] Sent: Friday, December 05, 2003 9:07 AM To: Struts Users Mailing List Subject: RE: using ApplicationResources in jsp... because i need to get the value of my property inside a <% ... %> > -Message d'origine- > De : Hunziker Dennis [mailto:[EMAIL PROTECTED] > Envoyé : vendredi 5 décembre 2003 15:03 > À : 'Struts Users Mailing List' > Objet : RE: using ApplicationResources in jsp... > > > why not try the following: > > > -Original Message- > From: AMIR-TAHMASSEB Marc [mailto:[EMAIL PROTECTED] > Sent: Freitag, 5. Dezember 2003 15:01 > To: [EMAIL PROTECTED] > Subject: using ApplicationResources in jsp... > > > Hi, > i wonder to know if it's possible to use a property in > ApplciationResources > in the jsp code. > > I want to do something like this : > > > <%@ page language="java" %> > <%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %> > <%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %> > <%@ taglib uri="/WEB-INF/struts-template.tld" prefix="template" %> > <%@ taglib uri="/WEB-INF/struts-logic.tld"prefix="logic" %> > <% > String title = title.from.ressources; // i don't know how > to access it ! > %> > > > <%=title%> > > > > > > -- > Marc AMIR-TAHMASSEB > [EMAIL PROTECTED] > <mailto:[EMAIL PROTECTED]> > > > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: using ApplicationResources in jsp...
because i need to get the value of my property inside a <% ... %> > -Message d'origine- > De : Hunziker Dennis [mailto:[EMAIL PROTECTED] > Envoyé : vendredi 5 décembre 2003 15:03 > À : 'Struts Users Mailing List' > Objet : RE: using ApplicationResources in jsp... > > > why not try the following: > > > -Original Message- > From: AMIR-TAHMASSEB Marc [mailto:[EMAIL PROTECTED] > Sent: Freitag, 5. Dezember 2003 15:01 > To: [EMAIL PROTECTED] > Subject: using ApplicationResources in jsp... > > > Hi, > i wonder to know if it's possible to use a property in > ApplciationResources > in the jsp code. > > I want to do something like this : > > > <%@ page language="java" %> > <%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %> > <%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %> > <%@ taglib uri="/WEB-INF/struts-template.tld" prefix="template" %> > <%@ taglib uri="/WEB-INF/struts-logic.tld"prefix="logic" %> > <% > String title = title.from.ressources; // i don't know how > to access it ! > %> > > > <%=title%> > > > > > > -- > Marc AMIR-TAHMASSEB > [EMAIL PROTECTED] > <mailto:[EMAIL PROTECTED]> > > > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: using ApplicationResources in jsp...
why not try the following: -Original Message- From: AMIR-TAHMASSEB Marc [mailto:[EMAIL PROTECTED] Sent: Freitag, 5. Dezember 2003 15:01 To: [EMAIL PROTECTED] Subject: using ApplicationResources in jsp... Hi, i wonder to know if it's possible to use a property in ApplciationResources in the jsp code. I want to do something like this : <%@ page language="java" %> <%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %> <%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %> <%@ taglib uri="/WEB-INF/struts-template.tld" prefix="template" %> <%@ taglib uri="/WEB-INF/struts-logic.tld"prefix="logic" %> <% String title = title.from.ressources; // i don't know how to access it ! %> <%=title%> -- Marc AMIR-TAHMASSEB [EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>
using ApplicationResources in jsp...
Hi, i wonder to know if it's possible to use a property in ApplciationResources in the jsp code. I want to do something like this : <%@ page language="java" %><%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %><%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %><%@ taglib uri="/WEB-INF/struts-template.tld" prefix="template" %><%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %><% String title = title.from.ressources; // i don't know how to access it ! %> <%=title%> -- Marc AMIR-TAHMASSEB [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]