Ok guys I need some help.
Our company just purchased a credit card verification software, its a Java application. I need to have an RPG/ILE program call this JSP passing and returning parms.
I know very very little about Java, was wondering if anyone had examples of how to code this.
Thanks
John
Software/Hardware used:
ASKED:
June 16, 2005 1:28 PM
UPDATED:
October 26, 2009 6:26 AM
Jason Hickmott also sent us these comments:
“The short answer is that a RPG program cannot call a JSP. You can construct a URL with parameters and parse the resulting HTML. I have done this recently in Java. In my case, the external application was designed to work this way. Usually this kind of solution is bad because it is similar to screen scraping. When the UI is changed, your application will break. My RPG is a little bit rusty so I?m not sure if there is an API for constructing URLs. Perhaps the IBM XML parser could be used to parse the HTML?
“Instead of a brittle HTML parsing solution and if your company can provide a Java resource, then perhaps you may wish to consider the following. A Java application can have different types of clients. The UI with its JSPs is one of them; your RPG application is another. An RPG program cannot directly invoke a Java class in a J2EE application. Instead you must go RPG -> Java ?> J2EE. The plain Java bit in the middle is deployed onto an AS/400. An example of this is the Business Delegate pattern (http://java.sun.com/blueprints/corej2eepatterns/Patterns/BusinessDelegate.html). All you need to do in your RPG application is call the Java methods as subprocedures.”
– Michelle Davidson, editor, Search400.com
There does need to be some clarification. The question title is about “calling Java”. The question text asks how to “call this JSP”. Which is it?
Tom