P
pmz
Dear Friends,
As most of recent viewers know I'm playing around the EJB and I have
found two big problems.
First problem is quoting output of beans inside JSP, an example:
I load data in servlet:
getServletContext().setAttribute("cupUser",
cupUserFacade.find(userId));
<input type="text" name="userFullName" value="$
{cupUser.userFullName}" />
returns into:
<input type="text" name="userFullName" value="My Stupid "Very" Stupid
Value" />
That's a problem, where I'm not sure whether changing " into ' in
<input/> is a good solution.
How do I fix it?
Second problem is encoding. Each page is attached with UTF-8 encoding
tags, database encoding is utf8_default, JSP pages/servlets printout
data perfectly, but when I update data in database (via EJB):
Log says:
FINE: UPDATE cup_user SET User_Contact = ?, User_FullName = ? WHERE
(ID = ?)
bind => [????????Ä???Ä?????Ä?????????Ä?, Bartek , 5]
FINER: TX afterCompletion callback, status=COMMITTED
(I don't think that the perfect way to store data
And output obviously is damaged with shitchars.
Where shall I look for encoding configuration? web.xml?
persistance.xml? Resource configuration?
100% sure that database (client & server) are configured ok (with
UTF-8).
Thank you for helping me.
All the best,
Przemek M. Zawada
As most of recent viewers know I'm playing around the EJB and I have
found two big problems.
First problem is quoting output of beans inside JSP, an example:
I load data in servlet:
getServletContext().setAttribute("cupUser",
cupUserFacade.find(userId));
<input type="text" name="userFullName" value="$
{cupUser.userFullName}" />
returns into:
<input type="text" name="userFullName" value="My Stupid "Very" Stupid
Value" />
That's a problem, where I'm not sure whether changing " into ' in
<input/> is a good solution.
How do I fix it?
Second problem is encoding. Each page is attached with UTF-8 encoding
tags, database encoding is utf8_default, JSP pages/servlets printout
data perfectly, but when I update data in database (via EJB):
Log says:
FINE: UPDATE cup_user SET User_Contact = ?, User_FullName = ? WHERE
(ID = ?)
bind => [????????Ä???Ä?????Ä?????????Ä?, Bartek , 5]
FINER: TX afterCompletion callback, status=COMMITTED
(I don't think that the perfect way to store data
And output obviously is damaged with shitchars.
Where shall I look for encoding configuration? web.xml?
persistance.xml? Resource configuration?
100% sure that database (client & server) are configured ok (with
UTF-8).
Thank you for helping me.
All the best,
Przemek M. Zawada