• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Converting data to Uppercase before passing it

 
Veni Velkoor
Ranch Hand
Posts: 65
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I am not sure where exactly to post this but here goes--
We are using JSP pages on the frontend to collect data and pass to backend CICS systems via servlets and command classes in VA JAVA. After finishing about 15 screens, we realised that all data going back to the CICS system needs to be in UPPERCASE. At this time, it is too tedious to go back to the JSP page and include Javascript tags(toUppercase()) on each of the fields in order to convert the data. Is there an easier way to make this change globally on the servlet side where it chnages all the data to uppercase before passing it on to CICS??? Looking for a global change solution. Any help would be appreciated.
Thanks in Advance!
Veni.
 
Kyle Brown
author
Ranch Hand
Posts: 3892
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Have you tried String.toUpperCase()?
Kyle
------------------
Kyle Brown,
Author of Enterprise Java (tm) Programming with IBM Websphere
See my homepage at http://members.aol.com/kgb1001001 for other WebSphere information.
 
Gerry Giese
Ranch Hand
Posts: 247
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I've never used CICS or even heard of VA JAVA, but if you have 'command' classes that are your interface to CICS, why not just write a wrapper class around those? It would have the same exact API, but in each method you would toUpperCase() the String data before calling the 'real' command class. If you have a lot of command classes, it might not save any more time than fixing the JSPs.
If you always post from JSPs to Servlets, it shouldn't be hard to write a generic function you call at the start of doPost() that loops through the parameters and uppercases them and stores them into a params Hashtable. Then change all your calls to getParameter() to (String)params.get() on the hashtable. Ex:

No guarantees the code will run, but this is the general idea. Hope this is of some help. Your only other hope is that VA JAVA has a function you haven't read about that will take care of the upper-casing.
 
Mike Curwen
Ranch Hand
Posts: 3695
IntelliJ IDE Java Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
VA JAVA = Visual Age for Java, I'm thinking
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic