[prev in list] [next in list] [prev in thread] [next in thread]
List: struts-user
Subject: Re: Antwort: Re: Problems with type conversion and special characters
From: Alessio Matteo <amatteo () transtecservices ! com>
Date: 2013-10-15 9:34:39
Message-ID: 525D0C2F.4070805 () transtecservices ! com
[Download RAW message or body]
Really I was using a custom type converter (with annotations on getters
& setters) but I had the problem that when typeconversionexception was
thrown the dynamic contents on my web page (objects retrieved from db or
from actions) didn't display.
Really I don't know what the problem was, i suspect something with
interceptors, maybe paramters interceptor wasn't able to retrieve passed
parameters, but it's just a theory.
*Alessio Matteo*
/Software developer & It assistant/
Descrizione: cid:image003.jpg@01CD3503.27DB9B50
Via Angelo di Pietro, 6
I-00165 Rome, Italy
Phone/Fax +39 06 6390339
E-mail amatteo@transtecservices.com <mailto:amatteo@transtecservices.com>
www.transtecservices.com <http://www.transtecservices.com/>
Facebook - TransTec Services
<https://www.facebook.com/pages/TransTec-Services/118665211664912?hc_location=stream>Twitter \
_TTServices <https://twitter.com/_TTServices>Linkedin
<http://www.linkedin.com/company/2319579?goback=.fcs_GLHD_transtec_false_*2_*2_*2_*2_*2_*2_*2_*2_*2_*2_*2_*2&trk=ncsrch_hits>*
****Please consider the environment before printing this email*
Il 15/10/2013 10:40, Christoph Nenning ha scritto:
> > Thank you so much, I solved the special characters problems by setting
> > the struts i18n constant to ISO-8859-1!
> > About the conversion error, I know it was a dev mode warning, but when
> > the exception was thrown every dynamic content in my page disappeard...
> > Anyway I solved the issue by declaring every action attribute as a
> > string and using specific regex xml validators to deny invalid inputs.
> > Then, in the action, I use parser and other utility methods to convert
> > the attributes to their correct formats.
> >
> > Regards
> >
> >
>
> Instead of using strings as action members I would suggest to use custom
> TypeConverters:
>
>
> https://struts.apache.org/release/2.0.x/docs/type-conversion.html
>
>
> Note there is a TypeConversion annotation, too. That can be used to
> annotate action getters/setters.
>
>
>
>
> Regards,
> Christoph
>
> This Email was scanned by Sophos Anti Virus
>
[Attachment #3 (multipart/related)]
[Attachment #5 (text/html)]
<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<div class="moz-cite-prefix">Really I was using a custom type
converter (with annotations on getters & setters) but I had
the problem that when typeconversionexception was thrown the
dynamic contents on my web page (objects retrieved from db or from
actions) didn't display.<br>
Really I don't know what the problem was, i suspect something with
interceptors, maybe paramters interceptor wasn't able to retrieve
passed parameters, but it's just a theory.<br>
<div class="moz-signature">
<meta http-equiv="content-type" content="text/html;
charset=ISO-8859-1">
<title></title>
<p class="MsoNormal"><b><span
style="font-size:10.0pt;font-family:"Verdana","sans-serif";color:navy">Alessio
Matteo</span></b><br>
<i><span
style="font-size:9.0pt;font-family:"Verdana","sans-serif";color:navy">Software
developer & It assistant</span></i><br>
<span
style="font-size:9.0pt;font-family:"Verdana","sans-serif";color:navy"><img
id="Immagine_x0020_1"
src="cid:part1.09040206.00060700@transtecservices.com"
alt="Descrizione: cid:image003.jpg@01CD3503.27DB9B50"
width="150" height="47"><br>
Via Angelo di Pietro, 6<br>
I-00165 Rome, Italy<br>
Phone/Fax +39 06 6390339<br>
E-mail <a \
href="mailto:amatteo@transtecservices.com">amatteo@transtecservices.com</a><br> <a \
href="http://www.transtecservices.com/"><span
lang="EN-US">www.transtecservices.com</span></a></span><span
style="font-size:9.0pt;font-family:"Verdana","sans-serif";color:navy"
lang="EN-US"><o:p> <br>
</o:p></span></p>
<p class="MsoNormal"><a
href="https://www.facebook.com/pages/TransTec-Services/118665211664912?hc_location=stream"
target="_blank"><span
style="font-size:11.0pt;font-family:"Calibri","sans-serif";text-decoration:none"><img
id="Immagine_x0020_2"
src="cid:part4.03050005.01070008@transtecservices.com"
alt="Facebook - TransTec Services" width="34" border="0"
height="63"></span></a><a
href="https://twitter.com/_TTServices" target="_blank"><span
style="font-size:11.0pt;font-family:"Calibri","sans-serif";text-decoration:none"><img
id="Immagine_x0020_3"
src="cid:part6.01050901.06000506@transtecservices.com"
alt="Twitter _TTServices" width="34" border="0"
height="63"></span></a><a
href="http://www.linkedin.com/company/2319579?goback=.fcs_GLHD_transtec_false_*2_*2_*2_*2_*2_*2_*2_*2_*2_*2_*2_*2&trk=ncsrch_hits"
target="_blank"><span
style="font-size:11.0pt;font-family:"Calibri","sans-serif";text-decoration:none"><img
id="Immagine_x0020_4"
src="cid:part8.07020005.00000004@transtecservices.com"
alt="Linkedin" width="34" border="0" height="63"></span></a><span
style="font-size:9.0pt;font-family:"Verdana","sans-serif";color:navy"
lang="EN-US"><o:p></o:p></span><b><span
style="font-size:10.0pt;font-family:Webdings;color:#009900"
lang="EN-GB"><br>
</span></b><b><span
style="font-size:10.0pt;font-family:"Arial","sans-serif";color:#009900"
lang="EN-GB"> </span></b><b><span
style="font-size:9.0pt;font-family:"Verdana","sans-serif";color:#009900"
lang="EN-GB">Please consider the environment before
printing this email</span></b></p>
</div>
Il 15/10/2013 10:40, Christoph Nenning ha scritto:<br>
</div>
<blockquote
cite="mid:OF49D8D085.42453DBD-ONC1257C05.002F273F-C1257C05.002FB44E@lex-com.net"
type="cite">
<blockquote type="cite">
<pre wrap="">
Thank you so much, I solved the special characters problems by setting
the struts i18n constant to ISO-8859-1!
About the conversion error, I know it was a dev mode warning, but when
the exception was thrown every dynamic content in my page disappeard...
Anyway I solved the issue by declaring every action attribute as a
string and using specific regex xml validators to deny invalid inputs.
Then, in the action, I use parser and other utility methods to convert
the attributes to their correct formats.
Regards
</pre>
</blockquote>
<pre wrap="">
Instead of using strings as action members I would suggest to use custom
TypeConverters:
<a class="moz-txt-link-freetext" \
href="https://struts.apache.org/release/2.0.x/docs/type-conversion.html">https://struts.apache.org/release/2.0.x/docs/type-conversion.html</a>
Note there is a TypeConversion annotation, too. That can be used to
annotate action getters/setters.
Regards,
Christoph
This Email was scanned by Sophos Anti Virus
</pre>
</blockquote>
<br>
</body>
</html>
[Attachment #6 (image/jpeg)]
[Attachment #7 (image/png)]
[Attachment #8 (image/png)]
[Attachment #9 (image/png)]
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic