Diego Camargo Prates

Greenhorn
+ Follow
since Nov 09, 2005
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Diego Camargo Prates

Yes, the Java String inside the action form holds the value as HTML entity. I mean, the value inside the property is "&", not "&" as desired.
[ November 11, 2005: Message edited by: Diego Camargo Prates ]
18 years ago
Hi all

I'm having some trouble in getting this to work, so any help including pointers to documentation would be really appreciated.

When I submit specific characters (like ampersand, quote)from my JSP page to the server, I get them translated to HTML entities automatically. I suppose this is being done automatically by Struts, between the JSP form submission and the form population.

This is what I get:

Submit "&", the ActionForm property shows "&".
Submit ">", the ActionForm property shows ">gt;".

This is a problem considering we have fixed-length database columns. Thus, client-side string sized 1 is translated to a server-side string sized 4, 5 or 6, bringing obvious storage problems.

Is there any way to tell Struts to put the strings exacly the way they were typed in the page form? Otherwise, I'd need to manually convert back those HTML entities to ASCII characters. There is a similar feature in the <bean:write> tag, the attribute "filter", but this is only for output.

Again, any help on this would be very appreciated.

Thanks and regards,
Diego.

[ November 09, 2005: Message edited by: Diego Camargo Prates ]
[ November 09, 2005: Message edited by: Diego Camargo Prates ]
18 years ago