• 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

How to read .cgi file

 
Ranch Hand
Posts: 34
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,

I want to read a .cgi file using java, please let me know if any body know about it.
Let me explain what i want,
In libraries, librarians search book from http://www.loc.gov, and download that books information in .cgi format. now i want to read that file using my java/jsp application and insert that books information (e.g title,ISBN number,Author name etc) in database(oracle 10g)



Thank you
 
Rancher
Posts: 43011
76
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
CGI is not really a file format as far as I know. It's a file extension used for indicating dynamic web resources that should be handled using the CGI protocol. What is the actual data format that you're trying to process?
 
Usman Saeed
Ranch Hand
Posts: 34
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
when i open .cgi file, it has following kind of data
 
Author and all-around good cowpoke
Posts: 13078
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You should be able to find some information on that format at the Library of Congress.

That looks like a format that has been around a looooong time, possibly dating back to puch cards and teletypes.

I suspect you will end up reading the response into multiple Strings, then disecting the strings according to positions within the lines.

Bill
 
Ulf Dittmer
Rancher
Posts: 43011
76
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The fixedformat4j library may help with dissecting that data.
 
Usman Saeed
Ranch Hand
Posts: 34
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you Ulf Dittmer and William Brogden for your replies. i am considering both of yours suggestion and if succeded i'll tell you
 
All of life is a contant education - Eleanor Roosevelt. Tiny ad:
Sauce Labs - World's Largest Continuous Testing Cloud for Websites and Mobile Apps
https://coderanch.com/t/722574/Sauce-Labs-World-Largest-Continuous
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!