Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 207
  • Last Modified:

Using a servlet from C code

Hi experts,

I wonder if it is possible to write a piece of C code (not C++) to access an already working Java servlet. This servlet is able to get some information (strings) from a back end.

Can I perform a serlvet invocation? Can I read the http answer in any way?

Any example or clue?

Thanks.
0
elrichal
Asked:
elrichal
2 Solutions
 
makerpCommented:
of course - you simply need to do some socket programming to call the HTTP servlet and then read the response. there are already c libraries for HTTP so you could reuse one of those.

0
 
sunnycoderCommented:
What platform?

As makerp said, it is possible ... google for libcurl
0
 
ppk_cbeCommented:
Take a look at http://experts-exchange.com/Programming/Programming_Languages/C/Q_21350967.html. This is a similar question with some more information you will find helpful.
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now