localisation of Dates

2005-06-20 Thread Arno Schatz

Hi,

How do I present a Date in the users locale in a JSP?

I tried
bean:write name=mybean property=somedate /
but the format is not ok. When I use the format attribute it won't show up in the locale 
preferred way.

I would like to format it like:

 DateFormat df = DateFormat.getDateTimeInstance(DateFormat.MEDIUM,
 DateFormat.MEDIUM, getLocale());

But how to do that in a JSP?

thanks,
  Arno


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



localisation question

2005-06-15 Thread Arno Schatz

Hi,

I want to retrieve a translation given the messaeKey for the current user in the servlet 
(not from within the JSP). How to do that. I found TagUtils.message(..) but it takes a 
pageContext as parameter, which I don't know where to get. Is that the right method? Any 
easier method to get a translation?


thanks,
  Arno


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



Where to put base code for each request

2005-03-18 Thread Arno Schatz
Hi,
I would like to write code before and after each request is being processed, for example 
 some looging of each request and close any started tranaction which is still open.

Frist I was thinking of subclassing Action and put the code in the overriden execute 
method, but that would restrict the code to the stuff inside actions. But I would like to 
 include JSP would also. Do I have to write a RequestProcessor or better go for servlet 
filters?

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


Re: Where to put base code for each request

2005-03-18 Thread Arno Schatz
Anybody having an example how to do that?
thanks,
  Arno
Rodolfo García Esteban/CYII wrote:
Servlet filters it's the best solution, if you are using a compatible 
container with Servlet 2.4.


Rodolfo García Esteban
Canal Isabel II
División de Aplicaciones Técnicas
C/ Santa Engracia, 125
Edificio 8
Tel. 91 545 10 00 - Ext. 2128
Fax. 91 545 14 41
___

Arno Schatz [EMAIL PROTECTED]
18/03/2005 11:41
Por favor, responda a Struts Users Mailing List
 
Para:   Struts Users Mailing List user@struts.apache.org
cc: (cco: Rodolfo García Esteban/CYII)
Asunto: Where to put base code for each request

Hi,
I would like to write code before and after each request is being 
processed, for example 
  some looging of each request and close any started tranaction which is 
still open.

Frist I was thinking of subclassing Action and put the code in the 
overriden execute 
method, but that would restrict the code to the stuff inside actions. But 
I would like to 
  include JSP would also. Do I have to write a RequestProcessor or better 
go for servlet 
filters?

thanks,
   Arno
-
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]