File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Servlets and the fly likes How to call a local class from a servlet? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "How to call a local class from a servlet?" Watch "How to call a local class from a servlet?" New topic
Author

How to call a local class from a servlet?

Raj S Kumar
Ranch Hand

Joined: Aug 06, 2006
Posts: 48
Hi,
I have a Jar file(an application) which works with some other third party applications(exe files) in the machine.
Now, I have to call the Jar file from a web application, which in turn should work with the Third party applications.

How this could be solved?

Please Help me on this.

Thanks in Advance


Raj S Kumar
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60781
    
  65

Include the jar as part of the web app by placing it in WEB-INF/lib.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Mayuresh H. Trivedi
Greenhorn

Joined: Jan 16, 2008
Posts: 5
Hi,

you might required to put your jar and exe file (if it requires ) in lib folder.

then you may reference it in your application.

hope it works.

let me know if you want any thing else.


Thanks & Regards,
MAYURESH
vijin das
Ranch Hand

Joined: Jun 07, 2010
Posts: 129

Explain like whether you would like to run this jar as a separate process which will be running on the local machine ??....


VIJINDAS
arriesh chellu
Greenhorn

Joined: Jan 18, 2010
Posts: 7
C as said by the professionals above just place the jar file in the "lib" folder of your application and then restart the server and then run your application
the jar file which you have placed will automatically be referenced by the application...

and regarding the exe files where ever you are using the exe just give the path of that exe and mind it you placce the exe in the same path as given in the code of your library class....
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to call a local class from a servlet?
 
Similar Threads
Hibernate and Jdbc
How to include third party jar files with in manifest file.
MathML support in Java Swing application.
Any solutions to support MathML within JEditorPane
Jar in the build path of web and EJB application