Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How Java Appl comunicate with CGI/Perl script

 
shreyas patel
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Frequent Flyer Subsystem is written in CGI/Perl. And FBN do not want to re-write it.
I understand that Web client can directly send request to CGI/Perl script.
But The question is how Java Application Client talk to CGI/Perl script?
 
calvin zhu
Ranch Hand
Posts: 54
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
java.net.HttpURLConnection
 
shreyas patel
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can you please explain in detail.

Also I wanted to know whether to call CGI/Perl script from Java Application Client is a good practice?
If not what is the alternative?
 
calvin zhu
Ranch Hand
Posts: 54
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Just do a google search u will find out how to use this class.
 
Ramon Gill
Ranch Hand
Posts: 344
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Why not use connector's?

Ray
 
Parag Doshi
Ranch Hand
Posts: 317
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Ramon Gill:
Why not use connector's?

Ray


Ray,
Can you elaborate on it? How can we use connectors if we are not able to change any part of the CGI system? Am I missing something?

Parag
 
Annie Zhang
Ranch Hand
Posts: 31
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Even though we may have the source code of FFM, I am wondering if using screen scraper is also a good alternative. I assume the interface of FFM is quite stable.
 
H. Hafer
Ranch Hand
Posts: 108
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi folks,

just for the records: why should i know the API for interfacing FFM? It should be enough to know the principle, and that's clear readible in the requirements. I don't believe, we're supposed to provide a detailed interaction with the FFM - that would be a job for the designer. Am I wrong here?

thanks,
Harbo
 
Annie Zhang
Ranch Hand
Posts: 31
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am sorry the "interface of FFM" is misunderstood to be the API. I meant GUI. That is why makes it a good candidate of screen scraper. I don't care about its API either.
 
calvin zhu
Ranch Hand
Posts: 54
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Parag Doshi:


Ray,
Can you elaborate on it? How can we use connectors if we are not able to change any part of the CGI system? Am I missing something?

Parag


Screen scraper, just like Annie said. Passing 1st exam, I'm sure you know the way, right?
 
Parag Doshi
Ranch Hand
Posts: 317
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by calvin zhu:


Screen scraper, just like Annie said. Passing 1st exam, I'm sure you know the way, right?


I thought Ray was talking abt JCA (connector adapters) rather than screen scrapers. Screen scrapers don't sound like a good idea for the CGI app..its already web enabled, why would I need to circumvent it and go for the mainframe screens? HTTPConnection sounds like a simpler alternative.

Parag
 
calvin zhu
Ranch Hand
Posts: 54
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Parag, I would think using here HTTPConnection is screen scrapers -- without changing any code on destination and form a http string to emulate the GUI's result. Right?
 
James Wang
Ranch Hand
Posts: 102
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
calvin,

I think you are right, I adopt this method too. if I am wrong, pls help me.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic