Win a copy of Machine Learning for Business: Using Amazon SageMaker and JupyterE this week in the Jython/Python forum
or Object Design Style Guide in the Object-Oriented programming forum!
  • 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Paul Clapham
  • Jeanne Boyarsky
  • Knute Snortum
Sheriffs:
  • Liutauras Vilda
  • Tim Cooke
  • Junilu Lacar
Saloon Keepers:
  • Ron McLeod
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Joe Ess
  • salvin francis
  • fred rosenberger

Converting data to Uppercase before passing it

 
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.
 
author
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.
 
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.
 
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
 
There's a hole in the bucket, dear Liza, dear Liza, a hole in the bucket, dear liza, a tiny ad:
Java file APIs (DOC, XLS, PDF, and many more)
https://products.aspose.com/total/java
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!