Respected Group Members, I have written a function in C language and now I want to call it from my Servlet application,is it possible to call functions written in other languages from Servlets,do we have to use JNI for this purpose and can JNI be used with Servlets,how can we use JNI with servlets and what API will I need to start working on JNI.
You have to use JNI, unless you can warp your function in a webservice, CORBA IDL, or some other remote invokation approach. There is no problem calling native function from servlet. I'd recomend to put dll in bin directory inside war, then use getRealPath() of servlet context to specify path to dll in load function. You may want to check security settings, because some servlet container could not allow you to load dlls.