This week's book giveaway is in the JavaScript forum.
We're giving away four copies of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js and have Paul Jensen on-line!
See this thread for details.
Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Implementing JNI with Servlets  RSS feed

 
Swaroop Reddy
Ranch Hand
Posts: 34
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello All,
I had implemented JNI with normal java program that runs through command prompt.Now I have an requirement to Implement JNI with servlets,the data should come from Jsp page and the data should be passed from servlet to VC++ methods and execute and return the result.But now the problem is how to implement this using servlets.what configurations do i need to do,where i need to place the dll file in order to make the servlet access the dll.Please provide me the required information,
If Any examples or links exist please give me the link


Thanking you

 
Deepak Bala
Bartender
Posts: 6663
5
Firefox Browser Linux MyEclipse IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
As long as the DLL is in the classpath the servlet should be able to load the library. A simple web.xml and a servlet that contains your code should suffice.
 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13078
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Let me suggest that you implement your JNI interface in a class which can be tested OUTSIDE the servlet environment. It doesnt take much effort to set up a "main" entry point and let it read test cases from a local file.

I like to use the request getParameterMap() call to create input as a Map since it is easy to create Map test cases.

If that works you can be confident as you work on integrating the functions into the servlet.

Bill

 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!