Re: Problem with S2 form parameters encode

2010-09-28 Thread Josep García
I suggest you fix the Java encoding, -encoding, with JAVA_OPTS
Josep

2010/9/27 Oscar oscar.kalde...@gmail.com

 I gonna try that. Also, right now i tried using a different charset:

 %@ page contentType=text/html; charset=ISO-8859-1 %

 and it works!

 2010/9/27 Maurizio Cucchiara maurizio.cucchi...@gmail.com

  You can also try to add pageEncoding inside page directive:
  %@ page pageEncoding=UTF-8 contentType=text/html; *charset*=UTF-8 %
 
  2010/9/27 Maurizio Cucchiara maurizio.cucchi...@gmail.com
 
   Which struts version are you using? Which application server? is it
  running
   on linux or windows?
   Did you try to insert meta tag inside head section?
  
meta http-equiv=Content-Type content=text/html; charset=UTF-8 /
  
   Maurizio Cucchiara
  
 



 --
 Oscar Calderón
 SCJP 6  http://javahowto.net



Problem with S2 form parameters encode

2010-09-27 Thread Oscar
Hi to all, i have a doubt about Struts 2 encoding mechanism. I have a form
with a textbox and i write special characters inside it, like this:

hoá ñ

When i submit and i print this value using a s:property i get this value:

hoá ñ

Why this happens? It has something to do with Struts 2 encoding mechanism?
Exist a way to tell struts 2 how to encode those characters?

Regards.


-- 
Oscar Calderón
SCJP 6  http://javahowto.net


Re: Problem with S2 form parameters encode

2010-09-27 Thread Maurizio Cucchiara
Hi Oscar,


2010/9/27 Oscar oscar.kalde...@gmail.com

 Exist a way to tell struts 2 how to encode those characters?

 There is a simple way:
put this line on top of you jsp file:
%@ page contentType=text/html; charset=UTF-8 %

Hope this help

Maurizio Cucchiara


Re: Problem with S2 form parameters encode

2010-09-27 Thread Oscar
Thanks Maurizio, but that's not the problem, because i have already this
header that is the same as yours:

%...@page contentType=text/html pageEncoding=UTF-8%

But i tried using your header and i get the same result.

Regards.

2010/9/27 Maurizio Cucchiara maurizio.cucchi...@gmail.com

 Hi Oscar,


 2010/9/27 Oscar oscar.kalde...@gmail.com

  Exist a way to tell struts 2 how to encode those characters?
 
  There is a simple way:
 put this line on top of you jsp file:
 %@ page contentType=text/html; charset=UTF-8 %

 Hope this help

 Maurizio Cucchiara




-- 
Oscar Calderón
SCJP 6  http://javahowto.net


Re: Problem with S2 form parameters encode

2010-09-27 Thread Maurizio Cucchiara
Struts 2 version?
Which encoding do you see if you press CTRL+i on firefox?

2010/9/27 Oscar oscar.kalde...@gmail.com

 Thanks Maurizio, but that's not the problem, because i have already this
 header that is the same as yours:

 %...@page contentType=text/html pageEncoding=UTF-8%

 But i tried using your header and i get the same result.

 Regards.

 2010/9/27 Maurizio Cucchiara maurizio.cucchi...@gmail.com

  Hi Oscar,
 
 
  2010/9/27 Oscar oscar.kalde...@gmail.com
 
   Exist a way to tell struts 2 how to encode those characters?
  
   There is a simple way:
  put this line on top of you jsp file:
  %@ page contentType=text/html; charset=UTF-8 %
 
  Hope this help
 
  Maurizio Cucchiara
 



 --
 Oscar Calderón
 SCJP 6  http://javahowto.net



Re: Problem with S2 form parameters encode

2010-09-27 Thread Oscar
Unicode (UTF-8)

Regards.

2010/9/27 Maurizio Cucchiara maurizio.cucchi...@gmail.com

 Struts 2 version?
 Which encoding do you see if you press CTRL+i on firefox?

 2010/9/27 Oscar oscar.kalde...@gmail.com

  Thanks Maurizio, but that's not the problem, because i have already this
  header that is the same as yours:
 
  %...@page contentType=text/html pageEncoding=UTF-8%
 
  But i tried using your header and i get the same result.
 
  Regards.
 
  2010/9/27 Maurizio Cucchiara maurizio.cucchi...@gmail.com
 
   Hi Oscar,
  
  
   2010/9/27 Oscar oscar.kalde...@gmail.com
  
Exist a way to tell struts 2 how to encode those characters?
   
There is a simple way:
   put this line on top of you jsp file:
   %@ page contentType=text/html; charset=UTF-8 %
  
   Hope this help
  
   Maurizio Cucchiara
  
 
 
 
  --
  Oscar Calderón
  SCJP 6  http://javahowto.net
 




-- 
Oscar Calderón
SCJP 6  http://javahowto.net


Re: Problem with S2 form parameters encode

2010-09-27 Thread Maurizio Cucchiara
Which struts version are you using? Which application server? is it running
on linux or windows?
Did you try to insert meta tag inside head section?

 meta http-equiv=Content-Type content=text/html; charset=UTF-8 /

Maurizio Cucchiara


Re: Problem with S2 form parameters encode

2010-09-27 Thread Oscar
I'm using Struts 2.1.8 under Glassfish v3 on Windows 7. I tried the metatag
but stills the same.

Regards.

2010/9/27 Maurizio Cucchiara maurizio.cucchi...@gmail.com

 Which struts version are you using? Which application server? is it running
 on linux or windows?
 Did you try to insert meta tag inside head section?

  meta http-equiv=Content-Type content=text/html; charset=UTF-8 /

 Maurizio Cucchiara




-- 
Oscar Calderón
SCJP 6  http://javahowto.net


Re: Problem with S2 form parameters encode

2010-09-27 Thread Maurizio Cucchiara
You can also try to add pageEncoding inside page directive:
%@ page pageEncoding=UTF-8 contentType=text/html; *charset*=UTF-8 %

2010/9/27 Maurizio Cucchiara maurizio.cucchi...@gmail.com

 Which struts version are you using? Which application server? is it running
 on linux or windows?
 Did you try to insert meta tag inside head section?

  meta http-equiv=Content-Type content=text/html; charset=UTF-8 /

 Maurizio Cucchiara



Re: Problem with S2 form parameters encode

2010-09-27 Thread Oscar
I gonna try that. Also, right now i tried using a different charset:

%@ page contentType=text/html; charset=ISO-8859-1 %

and it works!

2010/9/27 Maurizio Cucchiara maurizio.cucchi...@gmail.com

 You can also try to add pageEncoding inside page directive:
 %@ page pageEncoding=UTF-8 contentType=text/html; *charset*=UTF-8 %

 2010/9/27 Maurizio Cucchiara maurizio.cucchi...@gmail.com

  Which struts version are you using? Which application server? is it
 running
  on linux or windows?
  Did you try to insert meta tag inside head section?
 
   meta http-equiv=Content-Type content=text/html; charset=UTF-8 /
 
  Maurizio Cucchiara
 




-- 
Oscar Calderón
SCJP 6  http://javahowto.net