• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Cgi with Java

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Is it Possible to Connect Java Application to the DataBase using Cgi(instead of JDBC)?
If this is Possible could any body Post me an Example on How this could be Done(Querying, Inserting, Updating & Deleting Records) using Cgi with Java)
It is very Urgent.........
 
author
Posts: 621
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
"anjana",
The Java Ranch has thousands of visitors every week, many with surprisingly similar names. To avoid confusion we have a naming convention, described at http://www.javaranch.com/name.jsp . We require names to have at least two words, separated by a space, and strongly recommend that you use your full real name. Please log in with a new name which meets the requirements.
Thanks.
Sean
 
Sean MacLean
author
Posts: 621
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I assume that you mean have a java web application call existing(?) perl dbi database modules? The answer depends on the interface that the cgi provides. If it is data access subroutines then you might be able to call them using runtime.exec("perl mycgi", new String[1]{"param1"}) perhaps. Or if the cgi has an http interface you might be able to have the servlet/jsp forward (like any other page forward) to the cgi so that it could parse the query data. However, if at all possible, I highly recommend an 'all java' solution using jdbc.
Sean
 
Ranch Hand
Posts: 178
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
First. CGI has nothing to do with database access. CGI- common gateway interface is roughly equivalent to Java Servlet API not JDBC.
You can use CGI to access database (by writing a perl script that used db access routines).CGI
I have not yet seen a reason to write a Java CGI application.
You might find some CGI classes on the net but I think you'd be better off writing JSP/Servlet with JDBC solution or a Perl/C/C++ CGI solution. I would not mix java and CGI.
Could you please elaborate on why would you want to write CGI in Java
 
Morning came much too soon and it brought along a friend named Margarita Hangover, and a tiny ad.
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic