File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

posting data not using a form

 
dibs dibley
Greenhorn
Posts: 13
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I want to post data to a cgi file, but instead of using a form my servlet will retrieve the information from a database!
Anybody have any ideas on how this can be done?

Thanks in advance.
 
Faisal Khan
Ranch Hand
Posts: 285
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Dibs,
If I understood you correctly, then at loading a page, you want to pull some data from the database and then submit the form to some place.
This is nothing to do with servlets as far as I can see but here is how you can do this...
1. Pull out the data from database and place it into hidden form fields
2. At the end of the page have a javascript submit() command to submit the form to where ever.
HTH
 
dibs dibley
Greenhorn
Posts: 13
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
The servlet will send some particular data from the database to the cgi program depending on what checkbox is clicked on a jsp page.
I'd like to do this without using javascript, is there any way?
Cheers.
 
raj lakshmi
Greenhorn
Posts: 7
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi What I could understand from ur message is u wnat to pass some values to a cgi frm a servlet right.........
If so
after retrieving values from database those variables can be put into session i mean Servlet Session i dont know exactly the syntax but when u can programmitically put into session variable and then retrieve in the cgi file be it a servlet using servlet context.......
Hope my answer is relative........
cheers,
rajalakshmi.
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic