This week's book giveaway is in the Agile and other Processes forum.
We're giving away four copies of The Mikado Method and have Ola Ellnestam and Daniel Brolund on-line!
See this thread for details.
The moose likes Servlets and the fly likes How to make the servet to invoke the independent java class which is not residing in the web app. Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Java » Servlets
Reply Bookmark "How to make the servet to invoke the independent java class which is not residing in the web app." Watch "How to make the servet to invoke the independent java class which is not residing in the web app." New topic
Author

How to make the servet to invoke the independent java class which is not residing in the web app.

avitra kumar nimmadala
Greenhorn

Joined: Feb 06, 2013
Posts: 1
Hi ,
I have a web application of which the servet has to invoke the independent java class which is not residing in the web application.
Please suggest me if there is any solution to iplement the above requirement.

thanks in advance.

Regards,
Avitra.
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 35252
    
    7
Classes used in the web app have to be in a place where one of the involved classloaders can get at them. Usually that's WEB-INF/lib or WEB-INF/classes in the wbe app itself, or maybe in a shared directory of the servlet container, or -as a last resort- via the extension mechanism of the JVM. If none of these work, then it's either really tricky (think custom classloaders) or impossible.


Android appsImageJ pluginsJava web charts
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 56204
    
  13

Why can you just not include the class on the web app like normal?


[Smart Questions] [JSP FAQ] [Books by Bear] [Bear's FrontMan] [About Bear]
shivam singhal
Ranch Hand

Joined: Jul 15, 2012
Posts: 157

classes that you can invoke in your Servlet must be placed in the specified directory of your webapp that is WEB-INF/classes
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 56204
    
  13

shivam singhal wrote:classes that you can invoke in your Servlet must be placed in the specified directory of your webapp that is WEB-INF/classes

Not correct. That's just one of the places it can go. Ulf has already pointed out the appropriate locations.
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: How to make the servet to invoke the independent java class which is not residing in the web app.
 
Similar Threads
need career guidance
Servlet Mapping vs Static resource
invoking desktop .net app from Java
webservices swings
Is Oracle Client required?????