solution for strutscx + websphere
matt ma <[email protected]>
| Newsgroups | gmane.comp.java.strutscx.user |
|---|---|
| Message-ID | <[email protected]> |
Here is a solution for strutscx users using websphere, websphere test environment, or websphere studio. Since the ibm jvm is still on 1.3, the Locale class located in the java.util package does not have a constructor Local(String locale). Instead, the constructor requires Local(String locale, String ISOCOUNTRYCODE). For US, it's is iso country code = "US".
Also, for some reason the struts ActionMessages class won't properly inherit isEmpty() method from its superclass but for some reason will inherit the .empty() class. I'm assuming these 2 methods are equivalent, but please correct me if I am wrong as I am no struts guru.
As far as I know, websphere studio's run time version of websphere must run with ibm's jvm. The option to use a different jvm in the ide does not affect the jvm the runtime server uses.
So I've made the following changes to the code and it seems to run ok
StrutsCXBaseActionHelper(l:604) Locale locale_ = new Locale(locale, "US");
StrutsCXDocumentBuilder(l:438) if (!errors.empty()) {
Making these changes and recompiling will make the sample app work in websphere studio. Although I'm pretty confident about the Locale change, I'm not very confident about the integrity of the ActionErrors.empty() change. If you're too lazy to make the changes and trust my coding just email me and I'll be glad to send you the modified jar file for strutscx-0.92.
Matthew Ma
---------------------------------
Do you Yahoo!?
Yahoo! Platinum - Watch CBS' NCAA March Madness, live on your desktop!