Click to See Complete Forum and Search --> : Servlet returning C data structure
arunbangari
January 16th, 2003, 10:58 PM
Hi All,
Iam having a c application which communicates to the servlet for getting required data from the database. I want my servlet return C data structure as output. Is it possible? If yes how to do that. Any sample code or help would be greatly appreciated.
Thanks in advance.
Regrds
Arun Bangari
Goodz13
January 17th, 2003, 11:15 AM
are you talking about (it's been a wile since I worked in c or c++, so forgive me if theirs errors)
struct MyStruct {
int intValue;
char chrValue[6];
};
I don't beleve it is. Of course I'm often rong:D
saddysans
January 20th, 2003, 05:42 AM
I am not sure whether u need help in making ur servlet communicate with C program or u need help in returning a perticular datatype.
For the first case u can do that by JNI(Java Native Interface). Here is a link which will help u
http://java.sun.com/docs/books/tutorial/native1.1/concepts/index.html
tell me if u are already using JNI and u need help particularly in returning C datastructure.
saddysan
saddysans
January 20th, 2003, 05:59 AM
Herer are some codes samples for that as well
http://developer.java.sun.com/developer/codesamples/jni.html
saddysan
codeguru.com
Copyright Internet.com Inc., All Rights Reserved.