• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Devaka Cooray
  • Tim Cooke
Sheriffs:
  • Rob Spoor
  • Liutauras Vilda
  • paul wheaton
Saloon Keepers:
  • Tim Holloway
  • Tim Moores
  • Mikalai Zaikin
  • Carey Brown
  • Piet Souris
Bartenders:
  • Stephan van Hulst

Running a java Application through web application

 
Ranch Hand
Posts: 45
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Friends,

I working on a web application which uses websphere as a web server.
I am also using Apache Axis to fetch the data from the webservices.
I am facing problem while executing the code related to the web services, due to websphere class loading issue.(Program works fine as a stand-alone application but gives problem when called though the servlet in websphere server)
Better not to debate on this issue..
I found an alternative to call this standalone application (or a kind of a schedular) which will run dynamically as per the user inputs,through my servlet. So that my program runs fine irrespective of the classloaders of webspheres.

How can I call a java application through servlet?

Thanks & Regards,
ketan
 
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Maybe the program has a published API you can use just by instantiating some of its objects and calling its various methods?

If not, you can use Runtime.exec to start external processes like a command-lina Java app.
[ July 12, 2006: Message edited by: Ulf Dittmer ]
 
Ketan Mohite
Ranch Hand
Posts: 45
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks for the reply....
But I this is fine as far as Stand alone Java Application is concerned.
It has no effect if I include the same code in servlets.

I managed run an external application,creating new class loaders.But still to run the application, websphere class loaders are used.
I want to avoid webserver's classloaders.

Thanks & Regards,
Ketan
 
Ulf Dittmer
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

It has no effect if I include the same code in servlets.


What does this mean? What happens exactly? Are there any error messages?

I don't understand what the comments about classloaders mean, or what Runtime.exec has to do with classloaders. It will create a new process with its own JVM, but that is independent from the web server.
 
Well behaved women rarely make history - Eleanor Roosevelt. tiny ad:
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
reply
    Bookmark Topic Watch Topic
  • New Topic