Re: bean:message inside onclick javascript string?

2004-03-23 Thread Saul Q Yuan
Try move the onclick javascript function out, something like this:




function verify() {
var msg = "";

return confirm(msg);
}






Saul
  - Original Message - 
  From: Craig Berry 
  To: [EMAIL PROTECTED] 
  Sent: Tuesday, March 23, 2004 9:46 PM
  Subject: bean:message inside onclick javascript string?


  I have a webpage on which I do a Javascript popup to confirm a deletion.
  The JSP fragment looks like this:

  

  I would dearly love to replace that fixed text with , but all my experimentation has not
  succeeded in finding a relatively straightforward way to do this.  I'm
  using the -el taglibs, if that matters.  Anybody have ideas on an
  elegant solution?

  -- 
  Craig Berry
  Principal Architect and Technical Manager
  PortBlue
  (310) 566-7546
   

  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]


RE: bean:message prints the KEY, not the MESSAGE

2004-03-20 Thread Fowler, David
I couldn't get it to recognize paths from WEB-INF.  I just don't think their web 
container complies with the spec.  As I recall, it uses the class path of the 
application, hence codebase.

-Original Message-
From: Newcomer, Kenneth 
Sent: Saturday, March 20, 2004 11:05 AM
To: Struts Users Mailing List
Subject: RE: bean:message prints the KEY, not the MESSAGE

hi david, yes still looking at struts.  i wonder if it's better to place a 
copy(*ouch!*) of the resource files in iPlanet's "preferred" location (which would be 
...?), or try to get iPlanet to look in the actual location.

-Original Message-
From: Fowler, David
Sent: Saturday, March 20, 2004 10:59 AM
To: Struts Users Mailing List
Subject: RE: bean:message prints the KEY, not the MESSAGE


I'm encouraged to see that you are still looking at Struts.  As I understand it, there 
is a property that I set in my distribution that displays the KEY when it cannot find 
the corresponding value.  IPlanet 6.05 does not look for the resource files in the 
traditional (Struts) location.  What this is saying is that it cannot find the 
resource for the label.

-Original Message-
From: Newcomer, Kenneth
Sent: Saturday, March 20, 2004 10:45 AM
To: Struts Mailing List (E-mail)
Subject: bean:message prints the KEY, not the MESSAGE

All
I'm somewhat new to Struts.

Using iPlanet 6.0.5, when a page is rendered, the message KEY is being printed, not 
the message, like so:

This is what appears on the HTML page:
???en_US.enterprise.program.name.label???

What I want is this:
Program Name


This renders OK in Tomcat/Apache but not in iPlanet.  I've checked the docs for 
iPlanet, and tried to set the correct language setings, but that's not working.

Any ideas?

Thanks in advance,
Ken

-
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: bean:message prints the KEY, not the MESSAGE

2004-03-20 Thread Newcomer, Kenneth
hi david, yes still looking at struts.  i wonder if it's better to place a 
copy(*ouch!*) of the resource files in iPlanet's "preferred" location (which would be 
...?), or try to get iPlanet to look in the actual location.

-Original Message-
From: Fowler, David 
Sent: Saturday, March 20, 2004 10:59 AM
To: Struts Users Mailing List
Subject: RE: bean:message prints the KEY, not the MESSAGE


I'm encouraged to see that you are still looking at Struts.  As I understand it, there 
is a property that I set in my distribution that displays the KEY when it cannot find 
the corresponding value.  IPlanet 6.05 does not look for the resource files in the 
traditional (Struts) location.  What this is saying is that it cannot find the 
resource for the label.

-Original Message-
From: Newcomer, Kenneth 
Sent: Saturday, March 20, 2004 10:45 AM
To: Struts Mailing List (E-mail)
Subject: bean:message prints the KEY, not the MESSAGE

All
I'm somewhat new to Struts.

Using iPlanet 6.0.5, when a page is rendered, the message KEY is being printed, not 
the message, like so:

This is what appears on the HTML page:
???en_US.enterprise.program.name.label???

What I want is this:
Program Name


This renders OK in Tomcat/Apache but not in iPlanet.  I've checked the docs for 
iPlanet, and tried to set the correct language setings, but that's not working.

Any ideas?

Thanks in advance,
Ken

-
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: bean:message prints the KEY, not the MESSAGE

2004-03-20 Thread Fowler, David
I'm encouraged to see that you are still looking at Struts.  As I understand it, there 
is a property that I set in my distribution that displays the KEY when it cannot find 
the corresponding value.  IPlanet 6.05 does not look for the resource files in the 
traditional (Struts) location.  What this is saying is that it cannot find the 
resource for the label.

-Original Message-
From: Newcomer, Kenneth 
Sent: Saturday, March 20, 2004 10:45 AM
To: Struts Mailing List (E-mail)
Subject: bean:message prints the KEY, not the MESSAGE

All
I'm somewhat new to Struts.

Using iPlanet 6.0.5, when a page is rendered, the message KEY is being printed, not 
the message, like so:

This is what appears on the HTML page:
???en_US.enterprise.program.name.label???

What I want is this:
Program Name


This renders OK in Tomcat/Apache but not in iPlanet.  I've checked the docs for 
iPlanet, and tried to set the correct language setings, but that's not working.

Any ideas?

Thanks in advance,
Ken

-
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: bean:message format ssn

2004-03-11 Thread Shahak.Nagiel
There's a few options, off the top of my head:

-Do the string manipulation in the (preprocessing) action
-Use a combination of the Jakarta String taglib 
(http://jakarta.apache.org/taglibs/doc/string-doc/string-1.0.1/index.html) tags (such 
as left, right, and mid) to parse out the value (since SSN is always 9 digits) with 
dashes in between.
-Write your own custom tag

-Original Message-
From: Kumar M [mailto:[EMAIL PROTECTED]
Sent: Thursday, March 11, 2004 10:45 AM
To: Struts Users Mailing List
Subject: bean:message format ssn



Hi all,

I am wondering if there is an easy way to format the ssnn. What I have 
is a String '123456789' but the users would like to see '123-45-6789'. 
Is there an easy way of doing this using bean:write or bean:message or 
any other tag?

Thanks!!


-
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: bean:message and characters that are sensitive in HTML

2003-11-26 Thread James Mitchell
On Wed, 26 Nov 2003, Duma Rolando wrote:

> Hello everybody,
> I would like to know if there is something like the filter attribute present
> in the bean:write tag that I can use with the bean:message tag.
> The problem is that I want to use the same i18n key inside a jsp and also
> for a plain text e-mail message.
> Thanks for your help.

Is "plain text" part of the requirements?  I added a mailer component to a
recent project that sends users their newly generated passwords.  The
format is html, but the message renders fine in text-only browsers like
Pine and Outlook Express (set to text-only mode).


>
>
> -
> 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: bean:message MessageFormat and number formating

2003-11-19 Thread Paul McCulloch
The jstl eqivalent of bean:message allows you to pass arguments via the tag
body, so you can use another tag inside the body:







Paul

-Original Message-
From: Carl [mailto:[EMAIL PROTECTED]
Sent: 18 November 2003 23:44
To: [EMAIL PROTECTED]
Subject: bean:message MessageFormat and number formating


Hi,

I've recently switch to a resource.properties file to externalize all
text from jsp (in the perspective of translation of the site)

The site is a classic e-commerce web site, so I dsiplay a Cart and the
amount of the products in the custumer's cart.

In my old jsp I wrote :

in order to format the price in a sentence like "Total amount $ 150."

Now I'm writting
cart.amount=Total amount {0}.
in the resource.properties.

And in the JSP :


finally I loose the price formatting porvided by the 
tag.

Is there a way to use a MessageFormat and have the parameters formatted
like  do ?

Thanks for all suggestions,

Carl


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


**
Axios Email Confidentiality Footer
Privileged/Confidential Information may be contained in this message. If you are not 
the addressee indicated in this message (or responsible for delivery of the message to 
such person), you may not copy or deliver this message to anyone. In such case, you 
should destroy this message, and notify us immediately. If you or your employer does 
not consent to Internet email messages of this kind, please advise us immediately. 
Opinions, conclusions and other information expressed in this message are not given or 
endorsed by my Company or employer unless otherwise indicated by an authorised 
representative independent of this message.
WARNING:
While Axios Systems Ltd takes steps to prevent computer viruses from being transmitted 
via electronic mail attachments we cannot guarantee that attachments do not contain 
computer virus code.  You are therefore strongly advised to undertake anti virus 
checks prior to accessing the attachment to this electronic mail.  Axios Systems Ltd 
grants no warranties regarding performance use or quality of any attachment and 
undertakes no liability for loss or damage howsoever caused.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: bean:message not parse HTML tags?

2003-09-10 Thread David Graham
--- Michael Remijan <[EMAIL PROTECTED]> wrote:
> 
> Hello forum:
> 
> If I have a string defined in my resources file that looks like this:
> 
> some.key some value with html characters
> 
> is it possible for bean:message to NOT parse the <> characters so that
> when 
> it is written to the html page you see those words in bold?

It filters certain characters for security reasons.  In general, it's a
bad idea to store markup in properties files because that's a view layer
issue.  You could try using the JSTL's  tag.

David


> 
> Thanks,
> Mike
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 


__
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: bean:message in bean:define tag

2003-09-01 Thread Nagendra Kumar O V S








  okay,
  u got to upgrade to struts1.1 to make that working.
  struts1.0 does't any solution ur problem
   
  -- nagi
   
  ---Original Message---
   
  
  From: Struts Users Mailing 
  List
  Date: Monday, September 
  01, 2003 06:22:50 PM
  To: 'Struts Users Mailing 
  List'; 'Nagendra Kumar O V 
  S'
  Subject: RE: 
  bean:message in bean:define tag
   Hi Nagendra,If we use this then error occurs , 
  message is:javax.servlet.ServletException: Body is supposed to be 
  empty forbean:define-Original Message-From: 
  Nagendra Kumar O V S [mailto:[EMAIL PROTECTED]]Sent: 
  Monday, September 01, 2003 6:20 PMTo: [EMAIL PROTECTED]Subject: 
  Re: bean:message in bean:define tagHI,---Original 
  Message---From: Struts Users Mailing ListDate: Monday, 
  September 01, 2003 06:04:31 PMTo: [EMAIL PROTECTED]Subject: 
  bean:message in bean:define tagHi All,I am using the code 
  snippet given below to define a variable forwhich thevalue is 
  coming from property file by 
  key'home.mouseover.runbutton.caption'.But when i try to display 
  ths jsp containing this snippet , i getjavascript error as struts 
  doesn't compile 
  "key=home.mouseover.runbutton.caption/>" and assign 
  this stringliteral as itis to the defined variable.Please 
  let me know what can be done to assign the actual value 
  inpropertyfile to runcapt variable.jsp 
  pageproperty 
  file==home.mouseover.runbutton.caption = Run 
  Search=Thanks in advanceShailesh 
  Modi-To 
  unsubscribe, e-mail: [EMAIL PROTECTED]For 
  additional commands, e-mail: [EMAIL PROTECTED].IncrediMail 
  - Email has finally evolved - Click Here





	
	
	
	
	
	
	




  IncrediMail - 
Email has finally evolved - Click 
Here



RE: bean:message in bean:define tag

2003-09-01 Thread Shailesh Modi
Hi Nagendra,
  If we use this then error occurs , message is:
javax.servlet.ServletException:  Body is supposed to be empty for
bean:define

  -Original Message-
  From: Nagendra Kumar O V S [mailto:[EMAIL PROTECTED]
  Sent: Monday, September 01, 2003 6:20 PM
  To: [EMAIL PROTECTED]
  Subject: Re: bean:message in bean:define tag


HI,






---Original Message---

From: Struts Users Mailing List
Date: Monday, September 01, 2003 06:04:31 PM
To: [EMAIL PROTECTED]
Subject: bean:message in bean:define tag

Hi All,
I am using the code snippet given below to define a variable for
which the
value is coming from property file by key
'home.mouseover.runbutton.caption'.
But when i try to display ths jsp containing this snippet , i get
java
script error as struts doesn't compile "" and assign this string
literal as it
is to the defined variable.

Please let me know what can be done to assign the actual value in
property
file to runcapt variable.

jsp page
=

===

property file
==
home.mouseover.runbutton.caption = Run Search
=

Thanks in advance
Shailesh Modi



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


.


  
IncrediMail - Email has finally evolved - Click Here


Re: bean:message in bean:define tag

2003-09-01 Thread Nagendra Kumar O V S








  HI,
   
  
      
  
   
  ---Original Message---
   
  
  From: Struts Users Mailing 
  List
  Date: Monday, September 
  01, 2003 06:04:31 PM
  To: [EMAIL PROTECTED]
  Subject: bean:message 
  in bean:define tag
   Hi All,I am using the code snippet given below to 
  define a variable for which thevalue is coming from property file by 
  key'home.mouseover.runbutton.caption'.But when i try to display 
  ths jsp containing this snippet , i get javascript error as struts 
  doesn't compile 
  "key=home.mouseover.runbutton.caption/>" and assign 
  this string literal as itis to the defined variable.Please let 
  me know what can be done to assign the actual value in propertyfile to 
  runcapt variable.jsp pageproperty 
  file==home.mouseover.runbutton.caption = Run 
  Search=Thanks in advanceShailesh 
  Modi-To 
  unsubscribe, e-mail: [EMAIL PROTECTED]For 
  additional commands, e-mail: [EMAIL PROTECTED].





	
	
	
	
	
	
	




  IncrediMail - 
Email has finally evolved - Click 
Here



RE: bean:message to fmt:message

2003-08-24 Thread Erez Efrati
Hi Adam,

I found what was the problem but was a bit ashamed of telling :)
I was missing the locale settings in my web.xml. 

  
javax.servlet.jsp.jstl.fmt.locale
iw
  

Now it all works just fine,

Erez

-Original Message-
From: Adam Hardy [mailto:[EMAIL PROTECTED] 
Sent: Sunday, August 24, 2003 12:50 PM
To: Struts Users Mailing List
Subject: Re: bean:message to fmt:message

Hi Erez,

had similar problems myself. Specifying the application resources in 
web.xml didn't work for me for hours because I'd spelt it wrong - 
perhaps you should check you have it spelt correctly (is that really a 
small r for resources.application, and with a dot? could it be 
resourceApplication.properties?) I think tomcat looks for a class with 
the extension .properties

Plus the param-name looks a bit messed up, although that's probably just

a cut & paste slip-up.

Try seeing if the fmt:message tag can find it by placing the bundle 
attribute on the tag itself.



On 08/24/2003 01:28 PM Erez Efrati wrote:
> Oops, sorry I mixed up key with value, 
> 
> I still get ???MyForm.title??? on 
> 
> In my web.xml I put as documented in JSTL specs:
> 
>   
> javax.servlet.jsp.jstl.fmt.localizationContext
> a
> resources.application
>   
> 
> This all works with bean:message. 
> Any ideas why?
> 
> Erez
> 
> -Original Message-
> From: Erez Efrati [mailto:[EMAIL PROTECTED] 
> Sent: Sunday, August 24, 2003 1:20 PM
> To: 'Struts Users Mailing List'
> Subject: bean:message to fmt:message
> 
> 
> In my resource properties file I have key in the following format:
> 
> button.next="xxx"
> ..
> 
> I am trying to move from  which
works
> just fine, to 
> 
> And I get the following error:
> 
> "Attribute value invalid according to the specified TLD' "
> 
> Why? Can't fmt:message accept these kind of keys (with a dot char)?
> 
> Thanks,
> Erez
> 
> 
> 
> -
> 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]
> 
> 

-- 
struts 1.1 + tomcat 4.1.27 + java 1.4.2
Linux 2.4.20 RH9


-
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: bean:message to fmt:message

2003-08-24 Thread Adam Hardy
Hi Erez,

had similar problems myself. Specifying the application resources in 
web.xml didn't work for me for hours because I'd spelt it wrong - 
perhaps you should check you have it spelt correctly (is that really a 
small r for resources.application, and with a dot? could it be 
resourceApplication.properties?) I think tomcat looks for a class with 
the extension .properties

Plus the param-name looks a bit messed up, although that's probably just 
a cut & paste slip-up.

Try seeing if the fmt:message tag can find it by placing the bundle 
attribute on the tag itself.



On 08/24/2003 01:28 PM Erez Efrati wrote:
Oops, sorry I mixed up key with value, 

I still get ???MyForm.title??? on 

In my web.xml I put as documented in JSTL specs:

  
javax.servlet.jsp.jstl.fmt.localizationContext
a
resources.application
  
This all works with bean:message. 
Any ideas why?

Erez

-Original Message-
From: Erez Efrati [mailto:[EMAIL PROTECTED] 
Sent: Sunday, August 24, 2003 1:20 PM
To: 'Struts Users Mailing List'
Subject: bean:message to fmt:message

In my resource properties file I have key in the following format:

button.next="xxx"
..
I am trying to move from  which works
just fine, to 
And I get the following error:

"Attribute value invalid according to the specified TLD' "

Why? Can't fmt:message accept these kind of keys (with a dot char)?

Thanks,
Erez


-
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]

--
struts 1.1 + tomcat 4.1.27 + java 1.4.2
Linux 2.4.20 RH9
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


RE: bean:message to fmt:message

2003-08-24 Thread Erez Efrati
Oops, sorry I mixed up key with value, 

I still get ???MyForm.title??? on 

In my web.xml I put as documented in JSTL specs:

  
javax.servlet.jsp.jstl.fmt.localizationContext
a
resources.application
  

This all works with bean:message. 
Any ideas why?

Erez

-Original Message-
From: Erez Efrati [mailto:[EMAIL PROTECTED] 
Sent: Sunday, August 24, 2003 1:20 PM
To: 'Struts Users Mailing List'
Subject: bean:message to fmt:message


In my resource properties file I have key in the following format:

button.next="xxx"
..

I am trying to move from  which works
just fine, to 

And I get the following error:

"Attribute value invalid according to the specified TLD' "

Why? Can't fmt:message accept these kind of keys (with a dot char)?

Thanks,
Erez



-
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: bean:message , reads only once the message from MessageResource, is it caching messages for later use?

2003-08-19 Thread James Mitchell
> -Original Message-
> From: Seyhan BASMACI (Internet Yazilimlari Yetkilisi) 
> 
> 
> thanks James, 
> 
> is it cause a performance problem calling formats.clear() for 
> each message ,

I'm not sure how much of a performance hit you would take.  The 
bottleneck in most applications is typically the database call anyway.

Keep in mind that "getting the message" and "formatting the 
message (replacing {0} with some value)" are 2 separate actions.

The latter is handled in MessageResources so you pay the cost of
that replacement, plus the cost of clearing a HashMap (which should
be minimal).


> caching feature seems good, I must use this caching feature also , 

The DBMessageResources that I wrote
(http://sourceforge.net/projects/struts) uses the O/R tool OJB 
(http://db.apache.org/ojb/) for it's underlying data access.

OJB offers excellent, configurable, caching.


> it seems to me meaningful to call formats.clear() when the 
> my cache reloaded ,,
> my DAO code inside getMessage only reads messages from our cache,
> if it knows cache reloaded it may conditionally call formats.clear(),

If you don't clear the HashMap every time, it won't bother to call
your method the next time.

>  if calling formats.clear() for each message does not cause 
> performance problem 
> I can simply put formats.clear() code inside getMessage method,,
> which way I must choose,,any suggestion? 
> 
> 



--
James Mitchell
Software Engineer / Struts Evangelist
http://www.struts-atlanta.org
678.910.8017
AIM:jmitchtx





-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: bean:message , reads only once the message from MessageResource, is it caching messages for later use?

2003-08-18 Thread Seyhan BASMACI (Internet Yazilimlari Yetkilisi)
thanks James, 

is it cause a performance problem calling formats.clear() for each message ,
caching feature seems good, I must use this caching feature also , 
it seems to me meaningfull to call formats.clear() when the my cache reloaded ,,
my DAO code inside getMessage only reads messages from our cache,
if it knows cache reloaded it may conditionally call formats.clear(),
 if calling formats.clear() for each message does not cause performance problem 
I can simply put formats.clear() code inside getMessage method,,
which way I must choose,,any suggestion? 



-Original Message-
From: James Mitchell [mailto:[EMAIL PROTECTED]
Sent: Tuesday, August 19, 2003 4:31 AM
To: 'Struts Users Mailing List'
Subject: RE: bean:message , reads only once the message from
MessageResource, is it caching messages for later use? 


Yes, it is true that it is cached.  No, it is not configurable.  That's
just the way it was designed.

To get around it without actually changing the distribution, you'll need
to add something like this to your implementation's getMessage(Locale
locale, String key) method:


public String getMessage(Locale locale, String key) {
  formats.clear();   // <- this clears the HashMap from super
  // the rest of your data access code
}


I know, it's a hack, but hey, it works for me.


--
James Mitchell
Software Engineer / Struts Evangelist
http://www.struts-atlanta.org
678.910.8017
AIM:jmitchtx




> -Original Message-
> From: Seyhan BASMACI (Internet Yazilimlari Yetkilisi) 
> [mailto:[EMAIL PROTECTED] 
> Sent: Monday, August 18, 2003 10:06 AM
> To: Struts Users Mailing List
> Cc: Leyla TOLUN (Internet Yazilimlari Yonetmeni)
> Subject: bean:message , reads only once the message from 
> MessageResource, is it caching messages for later use? 
> 
> 
> 
>   We are using DB based Messages, 
> 
> 
>   to do this we extended  MessageResources class such as 
> 
>   /*public class MyMessageResources extends 
> MessageResources implements Serializable { 
> 
>public String getMessage(Locale locale, String key)   {
> DAO class that reads messages from DB only once 
>   }
>   */
> 
> 
>   im my page I am using bean:message to get page header message,
> 
>   /*
> */
> 
>   when the page accessed ,
>   for first time, it gets message calling  
> MyMessageResources.getMessage method,
> 
>   but for the following acceses , it doesn't get message 
> from MyMessageResources.getMessage , in debug mode , 
>   it enter only ONCE into MyMessageResources.getMessage 
> method , for the following acesses never enters into this method. 
>   I think it CACHES message for later use, is that true?
>   if so , how can cancel this  feature , because our DB 
> based message cache has reload feature , when the message 
> cache reloaded , all beans must show refreshed data ,,
> 
> -
> 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: bean:message , reads only once the message from MessageResource, is it caching messages for later use?

2003-08-18 Thread James Mitchell
Yes, it is true that it is cached.  No, it is not configurable.  That's
just the way it was designed.

To get around it without actually changing the distribution, you'll need
to add something like this to your implementation's getMessage(Locale
locale, String key) method:


public String getMessage(Locale locale, String key) {
  formats.clear();   // <- this clears the HashMap from super
  // the rest of your data access code
}


I know, it's a hack, but hey, it works for me.


--
James Mitchell
Software Engineer / Struts Evangelist
http://www.struts-atlanta.org
678.910.8017
AIM:jmitchtx




> -Original Message-
> From: Seyhan BASMACI (Internet Yazilimlari Yetkilisi) 
> [mailto:[EMAIL PROTECTED] 
> Sent: Monday, August 18, 2003 10:06 AM
> To: Struts Users Mailing List
> Cc: Leyla TOLUN (Internet Yazilimlari Yonetmeni)
> Subject: bean:message , reads only once the message from 
> MessageResource, is it caching messages for later use? 
> 
> 
> 
>   We are using DB based Messages, 
> 
> 
>   to do this we extended  MessageResources class such as 
> 
>   /*public class MyMessageResources extends 
> MessageResources implements Serializable { 
> 
>public String getMessage(Locale locale, String key)   {
> DAO class that reads messages from DB only once 
>   }
>   */
> 
> 
>   im my page I am using bean:message to get page header message,
> 
>   /*
> */
> 
>   when the page accessed ,
>   for first time, it gets message calling  
> MyMessageResources.getMessage method,
> 
>   but for the following acceses , it doesn't get message 
> from MyMessageResources.getMessage , in debug mode , 
>   it enter only ONCE into MyMessageResources.getMessage 
> method , for the following acesses never enters into this method. 
>   I think it CACHES message for later use, is that true?
>   if so , how can cancel this  feature , because our DB 
> based message cache has reload feature , when the message 
> cache reloaded , all beans must show refreshed data ,,
> 
> -
> 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: Bean:message to fmt:message

2003-08-17 Thread Erez Efrati
A big relief.. thanks, just to think about converting them all...

Erez

-Original Message-
From: Dan Tran [mailto:[EMAIL PROTECTED] 
Sent: Sunday, August 17, 2003 6:08 PM
To: Struts Users Mailing List
Subject: Re: Bean:message to fmt:message

Yes it does.

- Original Message - 
From: "Erez Efrati" <[EMAIL PROTECTED]>
Newsgroups: Struts
Sent: Sunday, August 17, 2003 9:57 AM
Subject: Bean:message to fmt:message


> I have a very small question: I have message keys that uses '.' like
for
> instance 'myform.hello'. I read something but I am not sure, does
>  support this kind of keys or do I have to remove those
'.'
> from my keys?
> 
> Thanks,
> Erez

-
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: Bean:message to fmt:message

2003-08-17 Thread Dan Tran
Yes it does.

- Original Message - 
From: "Erez Efrati" <[EMAIL PROTECTED]>
Newsgroups: Struts
Sent: Sunday, August 17, 2003 9:57 AM
Subject: Bean:message to fmt:message


> I have a very small question: I have message keys that uses '.' like for
> instance 'myform.hello'. I read something but I am not sure, does
>  support this kind of keys or do I have to remove those '.'
> from my keys?
> 
> Thanks,
> Erez

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: bean:message tag

2003-07-01 Thread Filip Polsakiewicz
Hi,

bean:message works only with PropertyResourceBundles. Those are specified by
name if you don't use the default ones. If you want to print the property of
your Form use  instead.
HTH
Filip

> -Original Message-
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, July 01, 2003 10:04 AM
> To: Struts Users Mailing List
> Subject: bean:message tag
>
>
>
> hi,
> I am trying to print the message as follows using bean tag lib.
>
> 
>
> Where logonform is  the name of the bean in request scope.
>
> Here is what  the javadoc says about the name attribute:
>
> name :Specifies the attribute name of the bean whose property is accessed
> to retrieve the value specified by property (if specified). If property is
> not specified, the value of this bean itself will be used as the message
> resource key
>
> But i get the error that "Property for message key must be a String"
>
> Am i missing something ?
>
> TIA
> Ashwani
>
>


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Bean:message & logic:present

2003-06-10 Thread James Mitchell
I'm not sure what the use case for this is.  The only thing I can come up
with is site customization where something is displayed only IF some key was
set in the bundle.

I would recommend you test for that in your action and set some flag on the
form bean.  Unless I'm wrong, there isn't really a clean way to do this in
the jsp without using a nasty little scriptlet.

--
James Mitchell
Software Developer/Struts Evangelist
http://www.struts-atlanta.org


- Original Message -
From: "Le Goff, Yoann" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, June 10, 2003 7:05 AM
Subject: Bean:message & logic:present


> I cannot use logic:present or logic:equal tags  to test bean:message
content
> ...
>
>
> Do you have any idea ?
>
>
>
> Y.
>
>
> --
--
> Ce message, ainsi que tous les fichiers joints est destine aux seules
> personnes dont le nom est mentionne comme destinataire. Il peut contenir
des
> informations sensibles ne devant pas etre divulguees et est protege contre
> toute violation par les dispositions penales de la loi relative au secret
> des correspondances. Si vous recevez ce message par erreur, nous vous
> remercions de le renvoyer a son expediteur, sans en conserver trace ou
> copie, et de ne pas utiliser, reproduire, reveler, modifier ou diffuser de
> maniere directe ou indirecte les informations qu'il contient
> --
--
>






> -
> 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: bean:message

2003-02-21 Thread James Mitchell
http://jakarta.apache.org/struts/userGuide/struts-bean.html#write



--
James Mitchell
Software Engineer/Struts Evangelist
http://www.open-tools.org/

"The man who does not read good books has no advantage over the man who
cannot read them."
- Mark Twain (1835-1910)



> -Original Message-
> From: Cohan, Sean [mailto:[EMAIL PROTECTED]] 
> Sent: Friday, February 21, 2003 7:54 AM
> To: 'Struts Users Mailing List'
> Subject: RE: bean:message
> 
> 
> Thanks guys.  I wasn't aware of the formatKey property.  And 
> I'm not aware
> of what docs to look at to find out more.  I looked in Taglib 
> Documentation
> and scanned the JavaDocs.  If there's an obvious place where 
> I should have
> found this, please enlighten me.  I'd like to know more. 
> 
> Thanks again.
> 
> -Original Message-
> From: Sri Sankaran [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, February 20, 2003 1:52 PM
> To: Struts Users Mailing List
> Subject: RE: bean:message
> 
> 
> Because I am competing for the Rube Goldberg award:)
> 
> Thanks for reminding me to read the docs.
> 
> Sri
> 
> > -Original Message-
> > From: James Mitchell [mailto:[EMAIL PROTECTED]] 
> > Sent: Thursday, February 20, 2003 1:50 PM
> > To: 'Struts Users Mailing List'
> > Subject: RE: bean:message
> > 
> > 
> > Why don't you just use formatKey?
> > 
> >  > property="placedOnHWATs" 
> >formatKey="date.digit.format"/>
> > 
> > 
> > 
> > --
> > James Mitchell
> > Software Engineer/Struts Evangelist
> > http://www.open-tools.org/
> > 
> > "The man who does not read good books has no advantage over 
> > the man who cannot read them."
> > - Mark Twain (1835-1910)
> > 
> > 
> > 
> > > -Original Message-
> > > From: Sri Sankaran [mailto:[EMAIL PROTECTED]]
> > > Sent: Thursday, February 20, 2003 1:38 PM
> > > To: Struts Users Mailing List
> > > Subject: RE: bean:message
> > > 
> > > 
> > > You can't nest as you have shown.  Here's an alternative:
> > > 
> > > 
> > >   
> > > 
> > > 
> > >  > >   name="hwa"
> > >   property="placedOnHWATs"
> > > format="<%=foo%>"/>
> > > 
> > > Sri
> > > 
> > > > -Original Message-
> > > > From: Cohan, Sean [mailto:[EMAIL PROTECTED]]
> > > > Sent: Thursday, February 20, 2003 1:39 PM
> > > > To: Struts (E-mail)
> > > > Subject: bean:message
> > > > 
> > > > 
> > > > Is it possible to nest a  tag within a
> > > >  tag?  I want to get the format property out of 
> > > > the application.resources file, but I get an  
> > > > jsp.error.unterminated.tag error.
> > > >  
> > > > Here's how I'm trying to do it:
> > > >  
> > > >  > > > key="date.digit.format"/> />
> > > >  
> > > > and in the resource file I have:
> > > >  
> > > > date.digit.format=format="MM/dd/"
> > > >  
> > > >  
> > > > Thanks.
> > > > 
> > > 
> > > 
> > 
> -
> > > 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]
> 


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




RE: bean:message

2003-02-21 Thread Sri Sankaran
http://jakarta.apache.org/struts/userGuide/struts-bean.html

-Original Message-
From: Cohan, Sean [mailto:[EMAIL PROTECTED]] 
Sent: Friday, February 21, 2003 7:54 AM
To: 'Struts Users Mailing List'
Subject: RE: bean:message


Thanks guys.  I wasn't aware of the formatKey property.  And I'm not aware of what 
docs to look at to find out more.  I looked in Taglib Documentation and scanned the 
JavaDocs.  If there's an obvious place where I should have found this, please 
enlighten me.  I'd like to know more. 

Thanks again.

-Original Message-
From: Sri Sankaran [mailto:[EMAIL PROTECTED]]
Sent: Thursday, February 20, 2003 1:52 PM
To: Struts Users Mailing List
Subject: RE: bean:message


Because I am competing for the Rube Goldberg award:)

Thanks for reminding me to read the docs.

Sri

> -Original Message-
> From: James Mitchell [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, February 20, 2003 1:50 PM
> To: 'Struts Users Mailing List'
> Subject: RE: bean:message
> 
> 
> Why don't you just use formatKey?
> 
>  property="placedOnHWATs" 
>formatKey="date.digit.format"/>
> 
> 
> 
> --
> James Mitchell
> Software Engineer/Struts Evangelist http://www.open-tools.org/
> 
> "The man who does not read good books has no advantage over
> the man who cannot read them."
>   - Mark Twain (1835-1910)
> 
> 
> 
> > -Original Message-
> > From: Sri Sankaran [mailto:[EMAIL PROTECTED]]
> > Sent: Thursday, February 20, 2003 1:38 PM
> > To: Struts Users Mailing List
> > Subject: RE: bean:message
> > 
> > 
> > You can't nest as you have shown.  Here's an alternative:
> > 
> > 
> >   
> > 
> > 
> >  >   name="hwa"
> >   property="placedOnHWATs"
> > format="<%=foo%>"/>
> > 
> > Sri
> > 
> > > -Original Message-
> > > From: Cohan, Sean [mailto:[EMAIL PROTECTED]]
> > > Sent: Thursday, February 20, 2003 1:39 PM
> > > To: Struts (E-mail)
> > > Subject: bean:message
> > > 
> > > 
> > > Is it possible to nest a  tag within a  
> > > tag?  I want to get the format property out of the 
> > > application.resources file, but I get an
> > > jsp.error.unterminated.tag error.
> > >  
> > > Here's how I'm trying to do it:
> > >  
> > >  > > key="date.digit.format"/> />
> > >  
> > > and in the resource file I have:
> > >  
> > > date.digit.format=format="MM/dd/"
> > >  
> > >  
> > > Thanks.
> > > 
> > 
> > 
> -
> > 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]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




RE: bean:message

2003-02-21 Thread Cohan, Sean
Thanks guys.  I wasn't aware of the formatKey property.  And I'm not aware
of what docs to look at to find out more.  I looked in Taglib Documentation
and scanned the JavaDocs.  If there's an obvious place where I should have
found this, please enlighten me.  I'd like to know more. 

Thanks again.

-Original Message-
From: Sri Sankaran [mailto:[EMAIL PROTECTED]]
Sent: Thursday, February 20, 2003 1:52 PM
To: Struts Users Mailing List
Subject: RE: bean:message


Because I am competing for the Rube Goldberg award:)

Thanks for reminding me to read the docs.

Sri

> -Original Message-
> From: James Mitchell [mailto:[EMAIL PROTECTED]] 
> Sent: Thursday, February 20, 2003 1:50 PM
> To: 'Struts Users Mailing List'
> Subject: RE: bean:message
> 
> 
> Why don't you just use formatKey?
> 
>  property="placedOnHWATs" 
>formatKey="date.digit.format"/>
> 
> 
> 
> --
> James Mitchell
> Software Engineer/Struts Evangelist
> http://www.open-tools.org/
> 
> "The man who does not read good books has no advantage over 
> the man who cannot read them."
>   - Mark Twain (1835-1910)
> 
> 
> 
> > -Original Message-----
> > From: Sri Sankaran [mailto:[EMAIL PROTECTED]]
> > Sent: Thursday, February 20, 2003 1:38 PM
> > To: Struts Users Mailing List
> > Subject: RE: bean:message
> > 
> > 
> > You can't nest as you have shown.  Here's an alternative:
> > 
> > 
> >   
> > 
> > 
> >  >   name="hwa"
> >   property="placedOnHWATs"
> > format="<%=foo%>"/>
> > 
> > Sri
> > 
> > > -Original Message-
> > > From: Cohan, Sean [mailto:[EMAIL PROTECTED]]
> > > Sent: Thursday, February 20, 2003 1:39 PM
> > > To: Struts (E-mail)
> > > Subject: bean:message
> > > 
> > > 
> > > Is it possible to nest a  tag within a
> > >  tag?  I want to get the format property out of 
> > > the application.resources file, but I get an  
> > > jsp.error.unterminated.tag error.
> > >  
> > > Here's how I'm trying to do it:
> > >  
> > >  > > key="date.digit.format"/> />
> > >  
> > > and in the resource file I have:
> > >  
> > > date.digit.format=format="MM/dd/"
> > >  
> > >  
> > > Thanks.
> > > 
> > 
> > 
> -
> > 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: bean:message

2003-02-20 Thread Sri Sankaran
Because I am competing for the Rube Goldberg award:)

Thanks for reminding me to read the docs.

Sri

> -Original Message-
> From: James Mitchell [mailto:[EMAIL PROTECTED]] 
> Sent: Thursday, February 20, 2003 1:50 PM
> To: 'Struts Users Mailing List'
> Subject: RE: bean:message
> 
> 
> Why don't you just use formatKey?
> 
>  property="placedOnHWATs" 
>formatKey="date.digit.format"/>
> 
> 
> 
> --
> James Mitchell
> Software Engineer/Struts Evangelist
> http://www.open-tools.org/
> 
> "The man who does not read good books has no advantage over 
> the man who cannot read them."
>   - Mark Twain (1835-1910)
> 
> 
> 
> > -Original Message-
> > From: Sri Sankaran [mailto:[EMAIL PROTECTED]]
> > Sent: Thursday, February 20, 2003 1:38 PM
> > To: Struts Users Mailing List
> > Subject: RE: bean:message
> > 
> > 
> > You can't nest as you have shown.  Here's an alternative:
> > 
> > 
> >   
> > 
> > 
> >  >   name="hwa"
> >   property="placedOnHWATs"
> > format="<%=foo%>"/>
> > 
> > Sri
> > 
> > > -Original Message-
> > > From: Cohan, Sean [mailto:[EMAIL PROTECTED]]
> > > Sent: Thursday, February 20, 2003 1:39 PM
> > > To: Struts (E-mail)
> > > Subject: bean:message
> > > 
> > > 
> > > Is it possible to nest a  tag within a
> > >  tag?  I want to get the format property out of 
> > > the application.resources file, but I get an  
> > > jsp.error.unterminated.tag error.
> > >  
> > > Here's how I'm trying to do it:
> > >  
> > >  > > key="date.digit.format"/> />
> > >  
> > > and in the resource file I have:
> > >  
> > > date.digit.format=format="MM/dd/"
> > >  
> > >  
> > > Thanks.
> > > 
> > 
> > 
> -
> > 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: bean:message

2003-02-20 Thread James Mitchell
Why don't you just use formatKey?





--
James Mitchell
Software Engineer/Struts Evangelist
http://www.open-tools.org/

"The man who does not read good books has no advantage over the man who
cannot read them."
- Mark Twain (1835-1910)



> -Original Message-
> From: Sri Sankaran [mailto:[EMAIL PROTECTED]] 
> Sent: Thursday, February 20, 2003 1:38 PM
> To: Struts Users Mailing List
> Subject: RE: bean:message
> 
> 
> You can't nest as you have shown.  Here's an alternative:
> 
> 
>   
> 
> 
>name="hwa"
>   property="placedOnHWATs"
> format="<%=foo%>"/>
> 
> Sri
> 
> > -Original Message-
> > From: Cohan, Sean [mailto:[EMAIL PROTECTED]] 
> > Sent: Thursday, February 20, 2003 1:39 PM
> > To: Struts (E-mail)
> > Subject: bean:message
> > 
> > 
> > Is it possible to nest a  tag within a 
> >  tag?  I want to get the format property out of 
> > the application.resources file, but I get an  
> > jsp.error.unterminated.tag error.
> >  
> > Here's how I'm trying to do it:
> >  
> >  > key="date.digit.format"/> />
> >  
> > and in the resource file I have:
> >  
> > date.digit.format=format="MM/dd/"
> >  
> >  
> > Thanks.
> > 
> 
> -
> 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: bean:message

2003-02-20 Thread Sri Sankaran
You can't nest as you have shown.  Here's an alternative:


  




Sri

> -Original Message-
> From: Cohan, Sean [mailto:[EMAIL PROTECTED]] 
> Sent: Thursday, February 20, 2003 1:39 PM
> To: Struts (E-mail)
> Subject: bean:message
> 
> 
> Is it possible to nest a  tag within a 
>  tag?  I want to get the format property out of 
> the application.resources file, but I get an  
> jsp.error.unterminated.tag error.
>  
> Here's how I'm trying to do it:
>  
>  key="date.digit.format"/> />
>  
> and in the resource file I have:
>  
> date.digit.format=format="MM/dd/"
>  
>  
> Thanks.
> 

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




RE: bean:message problems with i18n

2003-02-14 Thread Rademacher Tobias
Hi Bernhard,

This is what i logged with log4j within my action

LOGGER.debug("Request Locale " + request.getLocale() ); 
LOGGER.debug("Current locale: " + getLocale(request));

log file snipplet:

2003-02-14 13:26:16,089 DEBUG [de.grob.portal.action.LoginAction] Request
Locale de
2003-02-14 13:26:16,089 DEBUG [de.grob.portal.action.LoginAction] Current
locale: en

Interesting. Seems that the getLocale(HttpRequest request) method does not
work correclty.

Here ist the source of this method:

   /**
 * Return the user's currently selected Locale.
 *
 * @param request The request we are processing
 */
protected Locale getLocale(HttpServletRequest request) {

HttpSession session = request.getSession();
Locale locale = (Locale) session.getAttribute(Globals.LOCALE_KEY);
if (locale == null)
locale = defaultLocale;
return (locale);

}

I gues the session does not contain the Globals.LOCALE_KEY. Mhm. 
Since 

defaultLocale == Locale.getDefault() the OS Locale is choosen, which is
incorrect and overwrite the feature.
As far as I see the correct behavoir should be :


/**
 * Return the user's currently selected Locale.
 *
 * @param request The request we are processing
 */
protected Locale getLocale(HttpServletRequest request) {

HttpSession session = request.getSession();
Locale locale = (Locale) session.getAttribute(Globals.LOCALE_KEY);
if (locale == null)
locale = request.getLocale();
  // 
return (locale);

}

This ensures that the correct language is choosen. What do you think?

Bye
Toby

> -Original Message-
> From: Hirschmann, Bernhard [mailto:[EMAIL PROTECTED]]
> Sent: Friday, February 14, 2003 12:48 PM
> To: 'Struts Users Mailing List'; '[EMAIL PROTECTED]'
> Subject: AW: bean:message problems with i18n
> 
> 
> 
> Hi Toby,
> 
> I solved this problem doing something different: I instantiate now the
> Locale object only with the language parameter, and *without* 
> the country
> parameter. 
> new Locale("en","");
> 
> This locale object is then stored in the session using the method:
> org.apache.struts.action.Action.setLocale(javax.servlet.http.H
> ttpServletRequ
> est request, java.util.Locale locale);
> 
> This way it works - don't ask me why.
> 
> I guess it could be a bug in the  tag. 
> 
> Regards,
> Bernhard
> 
> 
> -Ursprüngliche Nachricht-
> Von: Rademacher Tobias [mailto:[EMAIL PROTECTED]]
> Gesendet: Freitag, 14. Februar 2003 12:08
> An: 'Struts Users Mailing List'
> Betreff: RE: bean:message problems with i18n
> 
> 
> Hi Bernhard,
> 
> I have the same problems as you.
> 
> Application.properties (fallback english)
> Application_de_DE.properties( German translation )
> 
> I'm using 1.1b2. If your OS language is German the German 
> property is used.
> If not the English one.
> My application does seem to use session saved Locales.
> 
> Do you save the locale in the session?
> 
> Maybe you try:
> 
>nochache="true"
>   locale="true"
> />
> 
> in your struts-config.xml.
> 
> I tried locale with 1.1b2 but not with nocache. Maybe that 
> work in 1.1b3 and
> with both set to true.
> If it works with 1.1.b3 could you inform me?
> 
> Bye
> Toby
> 
> > -Original Message-
> > From: Hirschmann, Bernhard 
> [mailto:[EMAIL PROTECTED]]
> > Sent: Thursday, February 13, 2003 7:15 PM
> > To: 'Struts Users Mailing List'
> > Subject: AW: bean:message problems with i18n
> > 
> > 
> > 
> > James, thanks for your help!
> > 
> > I tried it in different browser types and in different 
> > windows. So this
> > appears also in different HTTPSessions. I can reload as much 
> > as I want, and
> > I do not use any proxies for that. So I guess it is not a 
> > caching issue.
> > 
> > I checked the  tag. The lang attribute has always 
> > the correct
> > value, like set in the Action.setLocale() method. However, the wrong
> > messages are always in the language, in which the 
> >  tag has
> > requested the message the very first time. The fallback 
> mechanism just
> > doesn't work anymore.
> > 
> > Does the  tag use some kind of caching using 
> > the resources?
> > 
> > I also tried to switch back to struts 1.1b2, but with the 
> same result.
> > 
> > Bernhard
> > 
> > 
> > -Ursprüngliche Nachricht-
> > Von: James Childers [mailto:[EMAIL PROTECTED]]
> > Gesendet:

RE: bean:message problems with i18n

2003-02-14 Thread Rademacher Tobias
Hi Bernhard,

I have the same problems as you.

Application.properties (fallback english)
Application_de_DE.properties( German translation )

I'm using 1.1b2. If your OS language is German the German property is used.
If not the English one.
My application does seem to use session saved Locales.

Do you save the locale in the session?

Maybe you try:



in your struts-config.xml.

I tried locale with 1.1b2 but not with nocache. Maybe that work in 1.1b3 and
with both set to true.
If it works with 1.1.b3 could you inform me?

Bye
Toby

> -Original Message-
> From: Hirschmann, Bernhard [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, February 13, 2003 7:15 PM
> To: 'Struts Users Mailing List'
> Subject: AW: bean:message problems with i18n
> 
> 
> 
> James, thanks for your help!
> 
> I tried it in different browser types and in different 
> windows. So this
> appears also in different HTTPSessions. I can reload as much 
> as I want, and
> I do not use any proxies for that. So I guess it is not a 
> caching issue.
> 
> I checked the  tag. The lang attribute has always 
> the correct
> value, like set in the Action.setLocale() method. However, the wrong
> messages are always in the language, in which the 
>  tag has
> requested the message the very first time. The fallback mechanism just
> doesn't work anymore.
> 
> Does the  tag use some kind of caching using 
> the resources?
> 
> I also tried to switch back to struts 1.1b2, but with the same result.
> 
> Bernhard
> 
> 
> -Ursprüngliche Nachricht-
> Von: James Childers [mailto:[EMAIL PROTECTED]]
> Gesendet: Donnerstag, 13. Februar 2003 18:57
> An: Struts Users Mailing List
> Betreff: RE: bean:message problems with i18n
> 
> 
> Have you tried opening up a new browser and trying again? 
> Sounds like it may
> be a caching issue. Also, check that your  tag is 
> generating the
> correct "lang" attribute. Reload the page and view source, 
> then check the
> HTML tag.
> 
> -= J
> 
> > -Original Message-
> > From: Hirschmann, Bernhard 
> [mailto:[EMAIL PROTECTED]]
> > Sent: Thursday, February 13, 2003 11:41 AM
> > To: Struts User Mailing List (E-Mail)
> > Subject: bean:message problems with i18n
> > 
> > We have big problems with the use of the i18n messages, 
> used with the
> > bean:message tag. But the problems encounter only in a 
> > special scenario:
> > 
> > 1.) A German user loggs in -> a German locale is set using
> > Action.setLocale()
> > 
> > -> exploring some JSPs, all messages are in German, that's good.
> > 
> > 2.) The German user loggs out.
> > 
> > 3.) A English user loggs in -> a English locale is set using
> > Action.setLocale()
> > 
> > -> all messages already show in 1.) are still shown in 
> > German. But messages
> > from other JSPs not visited in 1.) are shown correctly in English.
> > 
> > 
> > We use two ApplicationResources:
> > ApplicationResources.properties (the fallback version, in 
> > English language)
> > ApplicationResources_de.properties (the German variant)
> > 
> > 
> > It seems to me, that the mechanism using the 
> > ApplicationResources is the
> > reason, but I'm not sure... I debuged through the sources but 
> > didn't find
> > the problem.
> > 
> > Another strange thing is, that this has worked earlier, but 
> > now something
> > must have happend while our further developing processes, so 
> > that this 'bug'
> > is appearing. So I tried some older versions of this product 
> > we delivered to
> > our customers, and suddenly in those versions is this bug 
> > also present.
> > Maybe something on our application server has happend (WS 
> > 4.0.4), but I have
> > no clue what this could be... In WSAD 4.0.2 it's the same 
> > like in WS 4.0.4.
> > 
> > Any hint is highly appretiated. (I'm working on this the 
> > whole day now...)
> 
> -
> 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: bean:message problems with i18n

2003-02-13 Thread Remke Rutgers
Hello Bernard,

I agreen with James, that it sounds very much like a caching issue. Could
you be behind a caching server without knowing it? (I don't know enough
about proxy setups to tell how you could verify this.)
Why I think it looks very much like a caching issue, is because you say
unvisited pages show up in English, and already visited pages show up in
German.

Anyway, I think an easy way to check if this is a caching issue or not, is
to include a current date (server code of course, not javascript) on your
pages. Just try it out on a couple of different pages.

By the way, you can avoid caching (both by servers and browsers) by
including the following lines first thing in your jsp(s):
<% 
response.setHeader("Pragma", "No-cache");
response.setHeader("Cache-Control", "no-cache");
response.setDateHeader("Expires", 1);
%>

In our application we are using tiles. I found that it did not work to
insert these lines in an inserted tile, they have to be in the top layout
file.
(Look in the javadocs for the setHeader functions to get a hint why. I don't
remember exactly why this was soand I am not even sure I fully understood
the reason at the moment I investigated it.)

Good luck,

Remke Rutgers

-Oorspronkelijk bericht-
Van: Hirschmann, Bernhard [mailto:[EMAIL PROTECTED]]
Verzonden: vrijdag 14 februari 2003 8:18
Aan: 'Struts Users Mailing List'
Onderwerp: AW: bean:message problems with i18n



Hello all!

this is still an open thread for me. It's horrifying... 

Any help highly appreciated!

Regards,
Bernhard



-Ursprüngliche Nachricht-
Von: Hirschmann, Bernhard 
Gesendet: Donnerstag, 13. Februar 2003 19:15
An: 'Struts Users Mailing List'
Betreff: AW: bean:message problems with i18n



James, thanks for your help!

I tried it in different browser types and in different windows. So this
appears also in different HTTPSessions. I can reload as much as I want, and
I do not use any proxies for that. So I guess it is not a caching issue.

I checked the  tag. The lang attribute has always the correct
value, like set in the Action.setLocale() method. However, the wrong
messages are always in the language, in which the  tag has
requested the message the very first time. The fallback mechanism just
doesn't work anymore.

Does the  tag use some kind of caching using the resources?

I also tried to switch back to struts 1.1b2, but with the same result.

Bernhard


-Ursprüngliche Nachricht-
Von: James Childers [mailto:[EMAIL PROTECTED]]
Gesendet: Donnerstag, 13. Februar 2003 18:57
An: Struts Users Mailing List
Betreff: RE: bean:message problems with i18n


Have you tried opening up a new browser and trying again? Sounds like it may
be a caching issue. Also, check that your  tag is generating the
correct "lang" attribute. Reload the page and view source, then check the
HTML tag.

-= J

> -Original Message-
> From: Hirschmann, Bernhard [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, February 13, 2003 11:41 AM
> To: Struts User Mailing List (E-Mail)
> Subject: bean:message problems with i18n
> 
> We have big problems with the use of the i18n messages, used with the
> bean:message tag. But the problems encounter only in a 
> special scenario:
> 
> 1.) A German user loggs in -> a German locale is set using
> Action.setLocale()
> 
> -> exploring some JSPs, all messages are in German, that's good.
> 
> 2.) The German user loggs out.
> 
> 3.) A English user loggs in -> a English locale is set using
> Action.setLocale()
> 
> -> all messages already show in 1.) are still shown in 
> German. But messages
> from other JSPs not visited in 1.) are shown correctly in English.
> 
> 
> We use two ApplicationResources:
> ApplicationResources.properties (the fallback version, in 
> English language)
> ApplicationResources_de.properties (the German variant)
> 
> 
> It seems to me, that the mechanism using the 
> ApplicationResources is the
> reason, but I'm not sure... I debuged through the sources but 
> didn't find
> the problem.
> 
> Another strange thing is, that this has worked earlier, but 
> now something
> must have happend while our further developing processes, so 
> that this 'bug'
> is appearing. So I tried some older versions of this product 
> we delivered to
> our customers, and suddenly in those versions is this bug 
> also present.
> Maybe something on our application server has happend (WS 
> 4.0.4), but I have
> no clue what this could be... In WSAD 4.0.2 it's the same 
> like in WS 4.0.4.
> 
> Any hint is highly appretiated. (I'm working on this the 
> whole day now...)

-
To unsubscribe, e-mai

RE: bean:message problems with i18n

2003-02-13 Thread James Childers
Have you tried opening up a new browser and trying again? Sounds like it may be a 
caching issue. Also, check that your  tag is generating the correct "lang" 
attribute. Reload the page and view source, then check the HTML tag.

-= J

> -Original Message-
> From: Hirschmann, Bernhard [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, February 13, 2003 11:41 AM
> To: Struts User Mailing List (E-Mail)
> Subject: bean:message problems with i18n
> 
> We have big problems with the use of the i18n messages, used with the
> bean:message tag. But the problems encounter only in a 
> special scenario:
> 
> 1.) A German user loggs in -> a German locale is set using
> Action.setLocale()
> 
> -> exploring some JSPs, all messages are in German, that's good.
> 
> 2.) The German user loggs out.
> 
> 3.) A English user loggs in -> a English locale is set using
> Action.setLocale()
> 
> -> all messages already show in 1.) are still shown in 
> German. But messages
> from other JSPs not visited in 1.) are shown correctly in English.
> 
> 
> We use two ApplicationResources:
> ApplicationResources.properties (the fallback version, in 
> English language)
> ApplicationResources_de.properties (the German variant)
> 
> 
> It seems to me, that the mechanism using the 
> ApplicationResources is the
> reason, but I'm not sure... I debuged through the sources but 
> didn't find
> the problem.
> 
> Another strange thing is, that this has worked earlier, but 
> now something
> must have happend while our further developing processes, so 
> that this 'bug'
> is appearing. So I tried some older versions of this product 
> we delivered to
> our customers, and suddenly in those versions is this bug 
> also present.
> Maybe something on our application server has happend (WS 
> 4.0.4), but I have
> no clue what this could be... In WSAD 4.0.2 it's the same 
> like in WS 4.0.4.
> 
> Any hint is highly appretiated. (I'm working on this the 
> whole day now...)

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Re: bean:message without session

2003-02-06 Thread Michael C. Lee Jr.
Where are you setting this session="true"? In the action mapping its
scope="session". This shouldn't matter anyway. You don't even have to define
it for the tag parameters because, as Mark said, it is in the scope of your
web application. In your web.xml you define your .properties file that has
all your messages. You shouldn't have to do anything other than reference
the key usually.
Your probably getting an error because your syntax for denoting session is
incorrect,...
or it could be because your being an ass to someone who is trying to help
you and the container senses it;
Statement in question: "Well, you ARE wrong about the application scope
thing..."

I helped you specifically so I could say that.

BTW: Saying I want help because I get an error is not a good way to find a
solution. What was the error?

Michael Lee

- Original Message -
From: "Tarek M. Nabil" <[EMAIL PROTECTED]>
To: "Mark Galbreath" <[EMAIL PROTECTED]>; "Struts Users Mailing List"
<[EMAIL PROTECTED]>
Sent: Thursday, February 06, 2003 9:40 AM
Subject: RE: bean:message without session


Well, you ARE wrong about the application scope thing, cause it's being put
in session scope. And the problem is, when I write session="false" in the
page directive, I get an error when using the tag.


-Original Message-
From: Mark Galbreath [mailto:[EMAIL PROTECTED]]
Sent: Thursday, February 06, 2003 7:25 PM
To: 'Struts Users Mailing List'
Subject: RE: bean:message without session


Why not?   extracts the text associated with the declared key
via MessageResources, which accesses the properties file as an object in
application scope and returns the String in the Response object.  The scope
of your JSP should have nothing to do with getting the property.

Of course, I could be wrong(with apologies to Dennis Miller)

Mark

-Original Message-
From: Tarek M. Nabil [mailto:[EMAIL PROTECTED]]
Sent: Thursday, February 06, 2003 12:09 PM
To: Struts (E-mail)
Subject: bean:message without session


Hi,

I'm using Struts 1.0.2.

Is there a way I can use the  tags without enabling the
session?

Thanks,

Tarek M. Nabil
Software Engineer
ITWorx
[EMAIL PROTECTED]
Free Zone, Area 7 (B),
Block (J), Nasr City,
Cairo, Egypt
TEL.: 20-2-2766226
http://www.itworx.com


-
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: bean:message without session

2003-02-06 Thread Tarek M. Nabil
Well, you ARE wrong about the application scope thing, cause it's being put in session 
scope. And the problem is, when I write session="false" in the page directive, I get 
an error when using the tag.


-Original Message-
From: Mark Galbreath [mailto:[EMAIL PROTECTED]]
Sent: Thursday, February 06, 2003 7:25 PM
To: 'Struts Users Mailing List'
Subject: RE: bean:message without session


Why not?   extracts the text associated with the declared key
via MessageResources, which accesses the properties file as an object in
application scope and returns the String in the Response object.  The scope
of your JSP should have nothing to do with getting the property.

Of course, I could be wrong(with apologies to Dennis Miller)

Mark

-Original Message-
From: Tarek M. Nabil [mailto:[EMAIL PROTECTED]] 
Sent: Thursday, February 06, 2003 12:09 PM
To: Struts (E-mail)
Subject: bean:message without session


Hi,

I'm using Struts 1.0.2.

Is there a way I can use the  tags without enabling the
session?

Thanks,

Tarek M. Nabil
Software Engineer
ITWorx
[EMAIL PROTECTED]
Free Zone, Area 7 (B),
Block (J), Nasr City,
Cairo, Egypt
TEL.: 20-2-2766226
http://www.itworx.com
 

-
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: bean:message without session

2003-02-06 Thread Mark Galbreath
Why not?   extracts the text associated with the declared key
via MessageResources, which accesses the properties file as an object in
application scope and returns the String in the Response object.  The scope
of your JSP should have nothing to do with getting the property.

Of course, I could be wrong(with apologies to Dennis Miller)

Mark

-Original Message-
From: Tarek M. Nabil [mailto:[EMAIL PROTECTED]] 
Sent: Thursday, February 06, 2003 12:09 PM
To: Struts (E-mail)
Subject: bean:message without session


Hi,

I'm using Struts 1.0.2.

Is there a way I can use the  tags without enabling the
session?

Thanks,

Tarek M. Nabil
Software Engineer
ITWorx
[EMAIL PROTECTED]
Free Zone, Area 7 (B),
Block (J), Nasr City,
Cairo, Egypt
TEL.: 20-2-2766226
http://www.itworx.com
 

-
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: Bean:message question

2002-12-19 Thread Sri Sankaran
Only in Struts 1.1

Sri

-Original Message-
From: Dan Tran [mailto:[EMAIL PROTECTED]] 
Sent: Thursday, December 19, 2002 2:03 AM
To: Struts Users Mailing List
Subject: Re: Bean:message question







just a guess

-D

- Original Message -
From: "Joao Araujo" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, December 18, 2002 10:33 PM
Subject: Bean:message question


> Hi,
>
> Is there a way to pass a  as an argument 
> to another bean message?
>
> something like 
>
>
> Obvious the above does not work. But I wish something like this.
>
>
> Joao,
>
>
> --
> To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>
>

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>


--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>




Re: Bean:message question

2002-12-18 Thread Dan Tran





just a guess

-D

- Original Message -
From: "Joao Araujo" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, December 18, 2002 10:33 PM
Subject: Bean:message question


> Hi,
>
> Is there a way to pass a  as an argument to
> another bean message?
>
> something like 
>
>
> Obvious the above does not work. But I wish something like this.
>
>
> Joao,
>
>
> --
> To unsubscribe, e-mail:

> For additional commands, e-mail:

>

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: bean:message

2002-11-22 Thread David Graham
Use the altKey attribute.

David







From: Joao Araujo <[EMAIL PROTECTED]>
Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED]
Subject: bean:message
Date: Fri, 22 Nov 2002 12:26:45 -0500

Hi,

	I would like to change the hint message of a image to something like this.

	

	Unfortunately, I cant just put the bean:message tag inside the tag 
html:img ...
	what I have to do to change the alt message to a bundled message like 
above.



Joao



--
To unsubscribe, e-mail:   

For additional commands, e-mail: 



_
Protect your PC - get McAfee.com VirusScan Online 
http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 



Re: bean:message as content of template:put tag

2002-02-28 Thread Cedric Dumoulin


  It is not a problem with Struts, but with JSP : you can't nest a tag inside a
tag.
  The correct way to do this, with template, is :
  

  Solution provided by Chris is also a possibility, but you need to use Tiles
instead of Templates ;-)

 Cedric

Chris Means wrote:

> Phil,
>
> I ran into the same problem.
>
> I don't know if my solution was the best approach...but it worked:
>
> replace 4. with:
>
> 
>
> then in your template use:
>
>  />
> 
>
> HTH.
>
> -Chris
>
> > -Original Message-
> > From: Phil Miller [mailto:[EMAIL PROTECTED]]
> > Sent: Tuesday, February 26, 2002 4:07 PM
> > To: [EMAIL PROTECTED]
> > Subject: bean:message as content of template:put tag
> >
> >
> > Hi, I am developing an internationalized program using struts,
> > and am using
> >  tags to display copy in different languages.
> >
> > On my site index page, I'd like to use the  tag on line 4
> > below to insert my locale specific page title. It seems that
> > struts does not
> > support this. Is there a workaround to this problem?
> >
> >
> > index.jsp.
> > 1. <%@ taglib uri='/WEB-INF/struts-template.tld' prefix='template' %>
> > 2. <%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>
> > 3. 
> > 4.   
> > 5.   
> > 6.   
> > 7.   
> > 8. 
> >
> > Any help would be greatly appreciated,
> > Phil,
> > Chamonix, France
> >
> >
> > --
> > To unsubscribe, e-mail:
> 
> For additional commands, e-mail:
> 
>
> --
> To unsubscribe, e-mail:   
> For additional commands, e-mail: 


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: bean:message as content of template:put tag

2002-02-27 Thread Chris Means

Phil,

I ran into the same problem.

I don't know if my solution was the best approach...but it worked:

replace 4. with:



then in your template use:




HTH.

-Chris

> -Original Message-
> From: Phil Miller [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, February 26, 2002 4:07 PM
> To: [EMAIL PROTECTED]
> Subject: bean:message as content of template:put tag
>
>
> Hi, I am developing an internationalized program using struts,
> and am using
>  tags to display copy in different languages.
>
> On my site index page, I'd like to use the  tag on line 4
> below to insert my locale specific page title. It seems that
> struts does not
> support this. Is there a workaround to this problem?
>
>
> index.jsp.
> 1. <%@ taglib uri='/WEB-INF/struts-template.tld' prefix='template' %>
> 2. <%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>
> 3. 
> 4.   
> 5.   
> 6.   
> 7.   
> 8. 
>
> Any help would be greatly appreciated,
> Phil,
> Chamonix, France
>
>
> --
> To unsubscribe, e-mail:

For additional commands, e-mail:






--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: bean:message and performance

2001-11-20 Thread moritz petersen


What about templates or tiles?

-Moritz.

> -Original Message-
> From: Francois-Xavier Bonnet [mailto:[EMAIL PROTECTED]]
> Sent: Monday, November 19, 2001 2:18 PM
> To: [EMAIL PROTECTED]
> Subject: bean:message and performance
>
>
> Hello all,
>
> I am using bean:message tag for internationalizing my pages. My problem
> is that some pages have too many tags (sometimes up to 50 just for bean:
> message) :
>
> 1) for some jsp, the generated .class file may exceed the 64 K limit
> allowed for a java method
>
> 2) even if pages do not reach this limit, performance are poor
>
> I have been thinking about 2 solutions to this problem :
>
> 1) writing some servlet that would replace bean:message tags by their
> value before compilation and cache the result jsp file in one folder for
>  each language.
>
> 2) using some other tool for i18n of my application (maybe cocoon ?)
>
>
> Any idea or advice would be greatly appreciated.
>
>
> Francois-Xavier
> [EMAIL PROTECTED]
>
> --
> To unsubscribe, e-mail:

For additional commands, e-mail:




--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: bean:message and performance

2001-11-19 Thread Cedric Dumoulin


  Hi,

  I don't know if your poor performances come from bean:message tags, but there
is an alternative to it.
  Another approach to i18n is having one page for each Locale. Each page contains
appropriate translation. Pages can be grouped in localized directories.
  Tiles framework can help you for this (and for the 64k limit !). You can have
different version of the same Tile (a jsp page), one for each Locale. When you
insert your Tile, framework choose the appropriate one, according to Locale.
Mapping between Tiles name to insert and real jsp page is done in
tilesDefinition.xml file. You have one config file per Locale. Config file naming
follow the Java properties file convention (extension with Locale's
abbreviation).
  Tiles allow mixing of localized Tiles and use of bean:message. Use Tiles for
big pages, tags for small part, menus, ...

  Hope this help,

Cedric


Francois-Xavier Bonnet wrote:

> Hello all,
>
> I am using bean:message tag for internationalizing my pages. My problem
> is that some pages have too many tags (sometimes up to 50 just for bean:
> message) :
>
> 1) for some jsp, the generated .class file may exceed the 64 K limit
> allowed for a java method
>
> 2) even if pages do not reach this limit, performance are poor
>
> I have been thinking about 2 solutions to this problem :
>
> 1) writing some servlet that would replace bean:message tags by their
> value before compilation and cache the result jsp file in one folder for
>  each language.
>
> 2) using some other tool for i18n of my application (maybe cocoon ?)
>
> Any idea or advice would be greatly appreciated.
>
> Francois-Xavier
> [EMAIL PROTECTED]
>
> --
> To unsubscribe, e-mail:   
> For additional commands, e-mail: 


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: bean:message and performance

2001-11-19 Thread Rey Francois

- Are you absolutely sure the i18n is the reason of the poor performance or
is it an assumption? Using some profiling tool could help pinpoint the
problem.

- Another solution to the size issue: decompose your pages into included
subcomponents that are of smaller size.

Fr.

-Original Message-
From: Francois-Xavier Bonnet [mailto:[EMAIL PROTECTED]]
Sent: 19 November 2001 14:18
To: [EMAIL PROTECTED]
Subject: bean:message and performance


Hello all,

I am using bean:message tag for internationalizing my pages. My problem 
is that some pages have too many tags (sometimes up to 50 just for bean:
message) :

1) for some jsp, the generated .class file may exceed the 64 K limit 
allowed for a java method

2) even if pages do not reach this limit, performance are poor

I have been thinking about 2 solutions to this problem :

1) writing some servlet that would replace bean:message tags by their 
value before compilation and cache the result jsp file in one folder for
 each language.

2) using some other tool for i18n of my application (maybe cocoon ?)


Any idea or advice would be greatly appreciated.


Francois-Xavier
[EMAIL PROTECTED]

--
To unsubscribe, e-mail:

For additional commands, e-mail:


The information in this email is confidential and is intended solely
for the addressee(s).
Access to this email by anyone else is unauthorised. If you are not
an intended recipient, please notify the sender of this email 
immediately. You should not copy, use or disseminate the 
information contained in the email.
Any views expressed in this message are those of the individual
sender, except where the sender specifically states them to be
the views of Capco.

http://www.capco.com
***


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: bean:message inside html:link javascript function?

2001-10-21 Thread Vincent Aumont



Mike Bridge wrote:

> Is it possible to embed a bean:message inside an html:link tag?

No. Check http://www.mail-archive.com/struts-user@jakarta.apache.org/msg12720.html

--Vincent.




RE: bean:message with bean

2001-10-19 Thread Fabien Modoux

It works fine, thanks. I just had to specify the type attribute
for the logic:iterate tag, because my collection was a Vector.


  


-Fabien

-
Fabien Modoux,
Voicemate - http://www.voicemate.com

-Original Message-
From: David Winterfeldt [mailto:[EMAIL PROTECTED]]
Sent: Thursday, October 18, 2001 9:19 PM
To: [EMAIL PROTECTED]
Subject: RE: bean:message with bean


I made a mistake in what I sent. It should be.


  


David

--- Fabien Modoux <[EMAIL PROTECTED]> wrote:
> David,
>
> Thanks for your help.
> I misinterpreted the docs and thought I could use
> either key or name to get resources from file. I'll
> try something else...
>
> -Fabien
>
> -
> Fabien Modoux,
> Voicemate - http://www.voicemate.com
>
> -Original Message-
> From: David Winterfeldt
> [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, October 18, 2001 6:45 PM
> To: [EMAIL PROTECTED]
> Subject: Re: bean:message with bean
>
>
> If they are message keys from the resource file,
> like
> msg.hello=Hello, then it should be key not name.
>
> 
>   
> 
>
>
> The tag bean:write uses the name attribute (as do
> most
> other tags in one way or another).
> 
>
> David
>
> --- Fabien Modoux <[EMAIL PROTECTED]> wrote:
> > Hello,
> >
> > I am using the bean:message and the logic:iterate
> > tags
> > to print a collection of messages (Vector of
> > String):
> >
> > 
> >   
> > 
> >
> > I get an exception at
> >
> >
>
org.apache.jasper.compiler.TagBeginGenerator.validate(TagBeginGenerator.java
> > :149)
> >
> > saying,
> >
> > "According to the TLD attribute key is mandatory
> for
> > tag message"
> >
> > In the tld file, it is indeed mandatory, but
> > according to the
> > Javadoc I thought I would be able to do that. Is
> it
> > the right
> > way to do it?
> >
> > Thanks,
> >
> > -Fabien
> >
> > -
> > Fabien Modoux,
> > Voicemate - http://www.voicemate.com
> >
>
>
> __
> Do You Yahoo!?
> Make a great connection at Yahoo! Personals.
> http://personals.yahoo.com
>


__
Do You Yahoo!?
Make a great connection at Yahoo! Personals.
http://personals.yahoo.com




RE: bean:message with bean

2001-10-18 Thread David Winterfeldt

I made a mistake in what I sent. It should be.


  


David

--- Fabien Modoux <[EMAIL PROTECTED]> wrote:
> David,
> 
> Thanks for your help.
> I misinterpreted the docs and thought I could use
> either key or name to get resources from file. I'll
> try something else...
> 
> -Fabien
> 
> -
> Fabien Modoux,
> Voicemate - http://www.voicemate.com
> 
> -Original Message-
> From: David Winterfeldt
> [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, October 18, 2001 6:45 PM
> To: [EMAIL PROTECTED]
> Subject: Re: bean:message with bean
> 
> 
> If they are message keys from the resource file,
> like
> msg.hello=Hello, then it should be key not name.
> 
> 
>   
> 
> 
> 
> The tag bean:write uses the name attribute (as do
> most
> other tags in one way or another).
> 
> 
> David
> 
> --- Fabien Modoux <[EMAIL PROTECTED]> wrote:
> > Hello,
> >
> > I am using the bean:message and the logic:iterate
> > tags
> > to print a collection of messages (Vector of
> > String):
> >
> > 
> >   
> > 
> >
> > I get an exception at
> >
> >
>
org.apache.jasper.compiler.TagBeginGenerator.validate(TagBeginGenerator.java
> > :149)
> >
> > saying,
> >
> > "According to the TLD attribute key is mandatory
> for
> > tag message"
> >
> > In the tld file, it is indeed mandatory, but
> > according to the
> > Javadoc I thought I would be able to do that. Is
> it
> > the right
> > way to do it?
> >
> > Thanks,
> >
> > -Fabien
> >
> > -
> > Fabien Modoux,
> > Voicemate - http://www.voicemate.com
> >
> 
> 
> __
> Do You Yahoo!?
> Make a great connection at Yahoo! Personals.
> http://personals.yahoo.com
> 


__
Do You Yahoo!?
Make a great connection at Yahoo! Personals.
http://personals.yahoo.com



RE: bean:message with bean

2001-10-18 Thread Fabien Modoux

David,

Thanks for your help.
I misinterpreted the docs and thought I could use
either key or name to get resources from file. I'll
try something else...

-Fabien

-
Fabien Modoux,
Voicemate - http://www.voicemate.com

-Original Message-
From: David Winterfeldt [mailto:[EMAIL PROTECTED]]
Sent: Thursday, October 18, 2001 6:45 PM
To: [EMAIL PROTECTED]
Subject: Re: bean:message with bean


If they are message keys from the resource file, like
msg.hello=Hello, then it should be key not name.


  



The tag bean:write uses the name attribute (as do most
other tags in one way or another).


David

--- Fabien Modoux <[EMAIL PROTECTED]> wrote:
> Hello,
>
> I am using the bean:message and the logic:iterate
> tags
> to print a collection of messages (Vector of
> String):
>
> 
>   
> 
>
> I get an exception at
>
>
org.apache.jasper.compiler.TagBeginGenerator.validate(TagBeginGenerator.java
> :149)
>
> saying,
>
> "According to the TLD attribute key is mandatory for
> tag message"
>
> In the tld file, it is indeed mandatory, but
> according to the
> Javadoc I thought I would be able to do that. Is it
> the right
> way to do it?
>
> Thanks,
>
> -Fabien
>
> -
> Fabien Modoux,
> Voicemate - http://www.voicemate.com
>


__
Do You Yahoo!?
Make a great connection at Yahoo! Personals.
http://personals.yahoo.com




Re: bean:message with bean

2001-10-18 Thread David Winterfeldt

If they are message keys from the resource file, like
msg.hello=Hello, then it should be key not name.


  



The tag bean:write uses the name attribute (as do most
other tags in one way or another).


David

--- Fabien Modoux <[EMAIL PROTECTED]> wrote:
> Hello,
> 
> I am using the bean:message and the logic:iterate
> tags
> to print a collection of messages (Vector of
> String):
> 
> 
>   
> 
> 
> I get an exception at
> 
>
org.apache.jasper.compiler.TagBeginGenerator.validate(TagBeginGenerator.java
> :149)
> 
> saying,
> 
> "According to the TLD attribute key is mandatory for
> tag message"
> 
> In the tld file, it is indeed mandatory, but
> according to the
> Javadoc I thought I would be able to do that. Is it
> the right
> way to do it?
> 
> Thanks,
> 
> -Fabien
> 
> -
> Fabien Modoux,
> Voicemate - http://www.voicemate.com
> 


__
Do You Yahoo!?
Make a great connection at Yahoo! Personals.
http://personals.yahoo.com



Re: bean:message tag

2001-08-20 Thread Matt Raible

The problem is that my image changes depending on the error message - so I need
a way of determining which image to display.

Oh well, I do everything from the design to the Action servlets, and stop
before the EJBs - so I guess it's only really a concern if someone else was
doing the design.

Matt

--- Thomas Quas <[EMAIL PROTECTED]> wrote:
> 
> Matt,
> 
> what I'm currently doing is something like this: In, say, x.jsp I write
> 
> ...
>  class="feedback">
>   
>   
>   
> 
> 
> 
> whereas in AppRes.properties I have
> 
> login.error.1=...
> login.error.2=...
> 
> 
> Yeah, it is rather uncomfortable--and only necessary if you really need
> to have support for i18n--but I can be sure that after a designer
> changed the page design there are no disturbing effects coming from my
> language definitions. The designer can concentrate on the .jsp file and
> does not need to care about language--in the ideal case ;-)
> 
> The same concept should work for your table header definitions.
> 
> 
> tom
> 
> 
> Matt Raible wrote:
> > 
> > Tom - it seems that you are correct, my html does show up correctly.
> > 
> > The reason I have html in my properties file is because I want to display
> > certain images with my messages.
> > 
> > Let's take the following key for example:
> > 
> > error.password.mismatch= height="20">   > src="/dc/common/images/iconWarning.gif" width="12" height="12"
> > align="absmiddle" alt="Warning">  Invalid username and/or
> password,
> > please try again.
> > 
> > I can probably move ... into my jsp page, but I'm already
> > using error.header and error.footer with html, so this seemed natural:
> > 
> > errors.header= width="100%">
> > errors.footer=
> > 
> > I could probably also parameterize my  so that this could be a
> > different key in my properties file, but then I'd have to add a little more
> > code to my action classes (or validation.xml file).
> > 
> > This brings up another point - I wish I could dynamically set the path to
> my
> > image, using a scriptlet or  tag, meaning replace "/dc/common"
> with
> > "<%=pathToImages%>" - but doesn't seem to work.
> > 
> > We get all our static files through the webserver (vs. appserver) - that's
> why
> > I can't get it from the war.
> > 
> > Matt
> > 
> > --- Thomas Quas <[EMAIL PROTECTED]> wrote:
> > >
> > > Matt,
> > >
> > > I'm not sure whether I understood the problem correctly, but I did the
> > > same thing for a while, and it worked for me without "flush" or other
> > > tricks. I simply included the message via , not
> > > matter whether there was HTML in it or not.
> > >
> > > Note, however, that it can be problematic to mix layout and content
> > > information. This was the big disadvantage of HTML, and people tried to
> > > address it with XML and stylesheets, making the two independent of each
> > > other. I'd recommend putting layout information, such as , , 
> > > etc. in the .jsp, whereas the .properties file should only contain
> > > content. This way your translators don't need to know HTML. Of course,
> > > we might open up another can of worms here if we don't have the same
> > > page layout for all languages.
> > >
> > >
> > > Just my $0.02, tom
> > >
> > >
> > > Matt Raible wrote:
> > > >
> > > > I am using  and I want to have HTML in
> my
> > > > key.name string, such as:
> > > >
> > > > key.name=Hello World
> > > >
> > > > So ideally, I could make my tag resemble  > > > flush="true" />, but there is no filter attribute on this tag?
> > > >
> > > > How can I do this, do I have to use , and if so, how do I
> get
> > > the
> > > > messages bean?
> > > >
> > > > Can it be done using:
> > > >
> > > > 
> > > >
> > > > Thanks,
> > > >
> > > > Matt
> > > >
> > > > __
> > > > Do You Yahoo!?
> > > > Make international calls for as low as $.04/minute with Yahoo!
> Messenger
> > > > http://phonecard.yahoo.com/
> > >
> > > --
> > > thomas quas| "Art lies in the consciousness of doing the thing,
> > > [EMAIL PROTECTED]  |  in the attention of the happening[...]"
> > >|-- Allen Ginsberg --
> > 
> > __
> > Do You Yahoo!?
> > Make international calls for as low as $.04/minute with Yahoo! Messenger
> > http://phonecard.yahoo.com/
> 
> -- 
> thomas quas| "Art lies in the consciousness of doing the thing,
> [EMAIL PROTECTED]  |  in the attention of the happening[...]"
>|-- Allen Ginsberg --


__
Do You Yahoo!?
Make international calls for as low as $.04/minute with Yahoo! Messenger
http://phonecard.yahoo.com/



Re: bean:message tag

2001-08-20 Thread Thomas Quas


Matt,

what I'm currently doing is something like this: In, say, x.jsp I write

...
 class="feedback">






whereas in AppRes.properties I have

login.error.1=...
login.error.2=...


Yeah, it is rather uncomfortable--and only necessary if you really need
to have support for i18n--but I can be sure that after a designer
changed the page design there are no disturbing effects coming from my
language definitions. The designer can concentrate on the .jsp file and
does not need to care about language--in the ideal case ;-)

The same concept should work for your table header definitions.


tom


Matt Raible wrote:
> 
> Tom - it seems that you are correct, my html does show up correctly.
> 
> The reason I have html in my properties file is because I want to display
> certain images with my messages.
> 
> Let's take the following key for example:
> 
> error.password.mismatch=   src="/dc/common/images/iconWarning.gif" width="12" height="12"
> align="absmiddle" alt="Warning">  Invalid username and/or password,
> please try again.
> 
> I can probably move ... into my jsp page, but I'm already
> using error.header and error.footer with html, so this seemed natural:
> 
> errors.header=
> errors.footer=
> 
> I could probably also parameterize my  so that this could be a
> different key in my properties file, but then I'd have to add a little more
> code to my action classes (or validation.xml file).
> 
> This brings up another point - I wish I could dynamically set the path to my
> image, using a scriptlet or  tag, meaning replace "/dc/common" with
> "<%=pathToImages%>" - but doesn't seem to work.
> 
> We get all our static files through the webserver (vs. appserver) - that's why
> I can't get it from the war.
> 
> Matt
> 
> --- Thomas Quas <[EMAIL PROTECTED]> wrote:
> >
> > Matt,
> >
> > I'm not sure whether I understood the problem correctly, but I did the
> > same thing for a while, and it worked for me without "flush" or other
> > tricks. I simply included the message via , not
> > matter whether there was HTML in it or not.
> >
> > Note, however, that it can be problematic to mix layout and content
> > information. This was the big disadvantage of HTML, and people tried to
> > address it with XML and stylesheets, making the two independent of each
> > other. I'd recommend putting layout information, such as , , 
> > etc. in the .jsp, whereas the .properties file should only contain
> > content. This way your translators don't need to know HTML. Of course,
> > we might open up another can of worms here if we don't have the same
> > page layout for all languages.
> >
> >
> > Just my $0.02, tom
> >
> >
> > Matt Raible wrote:
> > >
> > > I am using  and I want to have HTML in my
> > > key.name string, such as:
> > >
> > > key.name=Hello World
> > >
> > > So ideally, I could make my tag resemble  > > flush="true" />, but there is no filter attribute on this tag?
> > >
> > > How can I do this, do I have to use , and if so, how do I get
> > the
> > > messages bean?
> > >
> > > Can it be done using:
> > >
> > > 
> > >
> > > Thanks,
> > >
> > > Matt
> > >
> > > __
> > > Do You Yahoo!?
> > > Make international calls for as low as $.04/minute with Yahoo! Messenger
> > > http://phonecard.yahoo.com/
> >
> > --
> > thomas quas| "Art lies in the consciousness of doing the thing,
> > [EMAIL PROTECTED]  |  in the attention of the happening[...]"
> >|-- Allen Ginsberg --
> 
> __
> Do You Yahoo!?
> Make international calls for as low as $.04/minute with Yahoo! Messenger
> http://phonecard.yahoo.com/

-- 
thomas quas| "Art lies in the consciousness of doing the thing,
[EMAIL PROTECTED]  |  in the attention of the happening[...]"
   |-- Allen Ginsberg --



Re: bean:message tag

2001-08-20 Thread Matt Raible

Tom - it seems that you are correct, my html does show up correctly.

The reason I have html in my properties file is because I want to display
certain images with my messages.

Let's take the following key for example:

error.password.mismatch=Invalid username and/or password,
please try again.

I can probably move ... into my jsp page, but I'm already
using error.header and error.footer with html, so this seemed natural:

errors.header=
errors.footer=

I could probably also parameterize my  so that this could be a
different key in my properties file, but then I'd have to add a little more
code to my action classes (or validation.xml file).

This brings up another point - I wish I could dynamically set the path to my
image, using a scriptlet or  tag, meaning replace "/dc/common" with
"<%=pathToImages%>" - but doesn't seem to work.

We get all our static files through the webserver (vs. appserver) - that's why
I can't get it from the war.

Matt

--- Thomas Quas <[EMAIL PROTECTED]> wrote:
> 
> Matt,
> 
> I'm not sure whether I understood the problem correctly, but I did the
> same thing for a while, and it worked for me without "flush" or other
> tricks. I simply included the message via , not
> matter whether there was HTML in it or not.
> 
> Note, however, that it can be problematic to mix layout and content
> information. This was the big disadvantage of HTML, and people tried to
> address it with XML and stylesheets, making the two independent of each
> other. I'd recommend putting layout information, such as , , 
> etc. in the .jsp, whereas the .properties file should only contain
> content. This way your translators don't need to know HTML. Of course,
> we might open up another can of worms here if we don't have the same
> page layout for all languages.
> 
> 
> Just my $0.02, tom
> 
> 
> Matt Raible wrote:
> > 
> > I am using  and I want to have HTML in my
> > key.name string, such as:
> > 
> > key.name=Hello World
> > 
> > So ideally, I could make my tag resemble  > flush="true" />, but there is no filter attribute on this tag?
> > 
> > How can I do this, do I have to use , and if so, how do I get
> the
> > messages bean?
> > 
> > Can it be done using:
> > 
> > 
> > 
> > Thanks,
> > 
> > Matt
> > 
> > __
> > Do You Yahoo!?
> > Make international calls for as low as $.04/minute with Yahoo! Messenger
> > http://phonecard.yahoo.com/
> 
> -- 
> thomas quas| "Art lies in the consciousness of doing the thing,
> [EMAIL PROTECTED]  |  in the attention of the happening[...]"
>|-- Allen Ginsberg --


__
Do You Yahoo!?
Make international calls for as low as $.04/minute with Yahoo! Messenger
http://phonecard.yahoo.com/



Re: bean:message tag

2001-08-19 Thread Thomas Quas


Matt,

I'm not sure whether I understood the problem correctly, but I did the
same thing for a while, and it worked for me without "flush" or other
tricks. I simply included the message via , not
matter whether there was HTML in it or not.

Note, however, that it can be problematic to mix layout and content
information. This was the big disadvantage of HTML, and people tried to
address it with XML and stylesheets, making the two independent of each
other. I'd recommend putting layout information, such as , , 
etc. in the .jsp, whereas the .properties file should only contain
content. This way your translators don't need to know HTML. Of course,
we might open up another can of worms here if we don't have the same
page layout for all languages.


Just my $0.02, tom


Matt Raible wrote:
> 
> I am using  and I want to have HTML in my
> key.name string, such as:
> 
> key.name=Hello World
> 
> So ideally, I could make my tag resemble  flush="true" />, but there is no filter attribute on this tag?
> 
> How can I do this, do I have to use , and if so, how do I get the
> messages bean?
> 
> Can it be done using:
> 
> 
> 
> Thanks,
> 
> Matt
> 
> __
> Do You Yahoo!?
> Make international calls for as low as $.04/minute with Yahoo! Messenger
> http://phonecard.yahoo.com/

-- 
thomas quas| "Art lies in the consciousness of doing the thing,
[EMAIL PROTECTED]  |  in the attention of the happening[...]"
   |-- Allen Ginsberg --



Re: Bean:message with args

2001-05-08 Thread Stephen Schaub

I'm rather new to JSP/tags, so I don't know how difficult it
would be to implement your solution. I tend to prefer my
solution because it doesn't require as much typing.

Stephen

- Original Message -
From: "Chris Butler" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>;
<[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Tuesday, May 08, 2001 9:02 AM
Subject: RE: Bean:message with args


> just curious...  what about a minor enhancement to do it
like this:
>
> 
>
>
> 
>
> the listed internal body tags would be handled as
> arg0, arg1, arg2, etc.
>
> not that this is how yours works, but i kinda think
> the above would be desirable because you could set
> anything into the arguments...  just a thought tho.
>
> thoughts?
>
> Chris
>
> At 10:34 AM 5/8/2001 +0100, Jon.Ridgway wrote:
> >Hi Stephen,
> >
> >Your solution sounds like its just what I'm after. I
would greatly
> >appreciate a look at the code.
> >
> >Jon.
> >
> >-Original Message-
> >From: Stephen Schaub [mailto:[EMAIL PROTECTED]]
> >Sent: 04 May 2001 23:34
> >To: [EMAIL PROTECTED]
> >Subject: Re: Bean:message with args
> >
> >
> > > Is there a way to acheive the following :
> > > "/>
> > > without resorting to scriplets
> >
> >I was looking for a way to do this a while back;
currently
> >you have to resort to a scriptlet. I proposed and created
an
> >implementation that allows you to do this:
> >
> >
> >
> >The { } in argX parameters tell my modified bean:message
tag
> >to use the bean introspection to insert the value of the
> >bean. If you're interested in the code, I'll be glad to
> >share it.
> >
> >Stephen
> >
> >- Original Message -
> >From: "Jon.Ridgway" <[EMAIL PROTECTED]>
> >To: <[EMAIL PROTECTED]>
> >Sent: Friday, May 04, 2001 10:36 AM
> >Subject: Bean:message with args
> >
> >
> >Hi all,
> >
> >Is there a way to acheive the following :
> >
> >"/>
> >
> >without resorting to scriplets, ie :
> >
> >
> >
> >
> >would work but just doesn't sit right with me.
> >
> >Any ideas.
> >
> >Jon.
>
>




RE: Bean:message with args

2001-05-08 Thread Chris Butler

just curious...  what about a minor enhancement to do it like this:


   
   


the listed internal body tags would be handled as
arg0, arg1, arg2, etc.

not that this is how yours works, but i kinda think
the above would be desirable because you could set
anything into the arguments...  just a thought tho.

thoughts?

Chris

At 10:34 AM 5/8/2001 +0100, Jon.Ridgway wrote:
>Hi Stephen,
>
>Your solution sounds like its just what I'm after. I would greatly
>appreciate a look at the code.
>
>Jon.
>
>-Original Message-
>From: Stephen Schaub [mailto:[EMAIL PROTECTED]]
>Sent: 04 May 2001 23:34
>To: [EMAIL PROTECTED]
>Subject: Re: Bean:message with args
>
>
> > Is there a way to acheive the following :
> > "/>
> > without resorting to scriplets
>
>I was looking for a way to do this a while back; currently
>you have to resort to a scriptlet. I proposed and created an
>implementation that allows you to do this:
>
>
>
>The { } in argX parameters tell my modified bean:message tag
>to use the bean introspection to insert the value of the
>bean. If you're interested in the code, I'll be glad to
>share it.
>
>Stephen
>
>- Original Message -
>From: "Jon.Ridgway" <[EMAIL PROTECTED]>
>To: <[EMAIL PROTECTED]>
>Sent: Friday, May 04, 2001 10:36 AM
>Subject: Bean:message with args
>
>
>Hi all,
>
>Is there a way to acheive the following :
>
>"/>
>
>without resorting to scriplets, ie :
>
>
>
>
>would work but just doesn't sit right with me.
>
>Any ideas.
>
>Jon.




RE: Bean:message with args

2001-05-08 Thread Jon.Ridgway

Hi Stephen,

Your solution sounds like its just what I'm after. I would greatly
appreciate a look at the code.

Jon.

-Original Message-
From: Stephen Schaub [mailto:[EMAIL PROTECTED]]
Sent: 04 May 2001 23:34
To: [EMAIL PROTECTED]
Subject: Re: Bean:message with args


> Is there a way to acheive the following :
> "/>
> without resorting to scriplets

I was looking for a way to do this a while back; currently
you have to resort to a scriptlet. I proposed and created an
implementation that allows you to do this:



The { } in argX parameters tell my modified bean:message tag
to use the bean introspection to insert the value of the
bean. If you're interested in the code, I'll be glad to
share it.

Stephen

- Original Message -
From: "Jon.Ridgway" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, May 04, 2001 10:36 AM
Subject: Bean:message with args


Hi all,

Is there a way to acheive the following :

"/>

without resorting to scriplets, ie :




would work but just doesn't sit right with me.

Any ideas.

Jon.




Re: Bean:message with args

2001-05-04 Thread Stephen Schaub

> Is there a way to acheive the following :
> "/>
> without resorting to scriplets

I was looking for a way to do this a while back; currently
you have to resort to a scriptlet. I proposed and created an
implementation that allows you to do this:



The { } in argX parameters tell my modified bean:message tag
to use the bean introspection to insert the value of the
bean. If you're interested in the code, I'll be glad to
share it.

Stephen

- Original Message -
From: "Jon.Ridgway" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, May 04, 2001 10:36 AM
Subject: Bean:message with args


Hi all,

Is there a way to acheive the following :

"/>

without resorting to scriplets, ie :




would work but just doesn't sit right with me.

Any ideas.

Jon.





RE: Bean:message with args

2001-05-04 Thread Nanduri, Amarnath


Hello everybody,
 
 I am trying to test the iterate tag and i am getting the following error..
Can somebody point out as to what i am doing wrong ? Thanks a lot. I am
including the jsp code also. I am using Tomcat 3.2 and struts 1.0

cheers,
Amar..

ERROR
-
javax.servlet.ServletException: Cannot create iterator for this collection
at
org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImp
l.java:459)
at
_0002fpagerTest_0002ejsppagerTest_jsp_0._jspService(_0002fpagerTest_0002ejsp
pagerTest_jsp_0.java, Compiled Code)
at
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:119)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at
org.apache.jasper.servlet.JspServlet$JspCountedServlet.service(JspServlet.ja
va:130)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at
org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.ja
va:282)
at
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:429)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java,
Compiled Code)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)



BEAN


public class StatesBean
{

  // stores an array list of states
  private  ArrayList  states  = new ArrayList() ;

  public StatesBean()
  {
states.add("ALABAMA");
states.add("ALASKA");
states.add("ARIZONA");
states.add("ARKANSAS" ) ;
states.add("CALIFORNIA") ;
states.add("COLORADO") ;
states.add("CONNECTICUT") ; 
  }


  public  Iterator  getStates()
  {
 return  states.iterator() ;
  }
}


JSP:


<%@ page language="java" %>
<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>
<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %>

<%@ page import =
"com.agilquest.onboard.presentation.actionforms.StatesBean" %>

<%
  {
com.agilquest.onboard.presentation.actionforms.StatesBean  statesBean =
new com.agilquest.onboard.presentation.actionforms.StatesBean() ;

pageContext.setAttribute("statesBean", statesBean,
PageContext.PAGE_SCOPE);
  }
%>