• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Devaka Cooray
  • Tim Cooke
Sheriffs:
  • Rob Spoor
  • Liutauras Vilda
  • paul wheaton
Saloon Keepers:
  • Tim Holloway
  • Tim Moores
  • Mikalai Zaikin
  • Carey Brown
  • Piet Souris
Bartenders:
  • Stephan van Hulst

Converting data to Uppercase before passing it

 
Ranch Hand
Posts: 65
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
author
Posts: 3892
5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Ranch Hand
Posts: 247
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Ranch Hand
Posts: 3695
IntelliJ IDE Java Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
VA JAVA = Visual Age for Java, I'm thinking
 
Honk if you love justice! And honk twice for tiny ads!
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
reply
    Bookmark Topic Watch Topic
  • New Topic