tushar bhasme

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

Recent posts by tushar bhasme

Hi,

I am new to struts. I am working on an application and facing a few difficulties, any help would be highly appreciated.
- I have a ValueObject in my action which I am using on my jsp. The VO has some text fields and a String Map. Through OGNL expressions, the text field values get set to the VO, but the Map is not getting updated. Currently, I am setting the Map in session on the jsp, and then setting it back to the VO in the action, which I don't want to do. I am wondering if I am not specifying the Map field in my acceptableParameterName. I have specified the map as <VO>.<mapName>. Is it correct?
- Is it possible to pass the whole updated VO back to the Action (instead of setting the value of each field) just like it gets set from Action to the jsp (when its defined as a parameter)?

Thanks.
12 years ago
Hi,

We had some character encoding issues in our application due to which the special characters (Language characters from Greek, italic, Spanish etc. and special characters like bullet, long hyphen etc from MS Word) were getting replaced with some unreadable characters. Hence we had set the encoding in WebSphere Generic JVM arguments as "-Dclient.encoding.override=UTF-8". Now this works fine when the database is Oracle or SQL but is not working for DB2. For DB2, the characters from MS Word (•‘””’— ) are still getting replaced with the junk characters. I am not sure how or why or is even related to the database type. Please let me know of any workaround.

Thanks,
Tushar
12 years ago
though its been long, just would like to add that other currency signs like '£' are also valid identifiers...though you cannot type it directly from keyboard...
As per my understanding, the difference is in the method signature.

In first method, the arguments are: (Set<T> s, T t)
In second method, the arguments are: (Set<T> s)

When you call the first method passing a wildcard, the second argument is the actual cause of error since its not sure between the Types passed in the 2 arguments.

addToSet(unknownSet, “abc”);


First argument Set<?> is of some unknown type, but the second argument is of Type String.

When you call the second method, you only have to deal with Set<T>, which can handle the wildcard ? Type easily.
12 years ago
After some more debugging, we got to find out that the issue was that the javascript was throwing an exception while assigning the XMLHTTPResponse.responseText value:
"Could not complete the operation due to error c00ce56e". This error came right from the YUI library while reading the XMLHTTPResponse.responseText value.

If we try any encoding other than CP1252, the special characters get malformed on both IE and Firefox. Please let me know if there is any way to get the YUI work with CP1252 encoding.

Thanks.
12 years ago
Hi,

We had an issue where the special characters were being malformed during page generation due to incorrect encoding type set on the header. To resolve the issue, we had to set the content type as: "text/html; charset=" + System.getProperty("file.encoding");

System.getProperty("file.encoding") returns CP1252 for windows which works great on firefox, but breaks on IE.

Any way to get around this?


Thanks,
Tushar
12 years ago
Agreed. But then the decision lies in the hands of the managers how they want to deal with it- ask the third party to give prolog and correct the application to not malform any data OR replace the data with the plain text during import.

Thanks a lot for the help.
I am not really sure if i understand what is mentioned in the link:

Because each XML entity not accompanied by external encoding information and not in UTF-8 or UTF-16 encoding must begin with an XML encoding declaration, in which the first characters must be '<?xml', any conforming processor can detect, after two to four octets of input, which of the following cases apply. In reading this list, it may help to know that in UCS-4, '<' is " #x0000003C " and '?' is " #x0000003F ", and the Byte Order Mark required of UTF-16 data streams is " #xFEFF ". The notation ## is used to denote any byte value except that two consecutive ##s cannot be both 00.



As per my understanding, its saying it must be accompanied with the prolog (<?xml) which is exactly what is missing in the client xml.

Thanks.
the xml file comes from a third party and has no prolog which is completely valid.. sorry i did not see the link earlier...

It does solve my problem, thanks a lot.

And yes, you are right, the application should be corrected too for handling the way its currently doing that's resulting in the malformation of the characters. We are looking into that too.

Thanks.
yes, that option is also in consideration... most probably the app issue is that at some point, the encoding used to read the data once it comes into application is UTF-8 which results in malforming of the special characters. Now, we won't really know which encoding we should use while reading that data hence we are more inclined towards converting them to plain text. Please let me know if you anyone has a good approach towards this problem.

Thanks.
Hi,

We have an xml from client that has some latin characters. We can read the data but these characters later on produce issues in the application. So i wanted to know if there is already an API that can replace any special character to its plain-text counterpart.

Thanks.
Is it feasible to add an index to a table through java code temporarily, and then remove it? We want to add the index temporarily only as the table already has a lot many indices, and we dont want any more permanent index. After the results are fetched, we want to delete the index.
It's a member initiative. I was just going through the websphere site, and they are saying that we CAN control the websphere administration through our own java code. If IBM already has such a product, am not sure thats gonna be free. I am also sure its not gonna take 'months' to do that.
13 years ago