• 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
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
Bartenders:
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

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: 43016
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: 43016
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
 
Being a smart alec beats the alternative. This tiny ad knows what I'm talking about:
the value of filler advertising in 2020
https://coderanch.com/t/730886/filler-advertising
    Bookmark Topic Watch Topic
  • New Topic