CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 4 of 4
  1. #1
    Join Date
    Jul 2001
    Location
    nowhere :)
    Posts
    2

    Servlet returning C data structure

    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
    Arun Shankar Bangari
    Senior Software Engineer
    eMbience Inc.

  2. #2
    Join Date
    Jan 2002
    Location
    Halifax, NS, Canada
    Posts
    985
    are you talking about (it's been a wile since I worked in c or c++, so forgive me if theirs errors)

    Code:
    struct MyStruct  {
       int intValue;
       char chrValue[6];  
    };
    I don't beleve it is. Of course I'm often rong

  3. #3
    Join Date
    Mar 2002
    Posts
    132
    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/tutor...pts/index.html

    tell me if u are already using JNI and u need help particularly in returning C datastructure.


    saddysan

  4. #4
    Join Date
    Mar 2002
    Posts
    132
    Herer are some codes samples for that as well

    http://developer.java.sun.com/develo...mples/jni.html

    saddysan

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured