• Post Reply Bookmark Topic Watch Topic
  • New Topic

How to read .cgi file  RSS feed

 
Usman Saeed
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
 
Ulf Dittmer
Rancher
Posts: 42972
73
  • 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
 
William Brogden
Author and all-around good cowpoke
Rancher
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: 42972
73
  • 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
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!