• 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
  • Tim Cooke
  • Devaka Cooray
  • Ron McLeod
  • Jeanne Boyarsky
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Piet Souris
  • Carey Brown
  • Tim Holloway
Bartenders:
  • Martijn Verburg
  • Frits Walraven
  • Himai Minh

Setting Classpaths

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I`m develloping a servlets that uses the jini
service. When i run the servlet (connecting from a remote browser to the
Apache HTTP server where my servlet is running) the jini service doesn`t
work. I suppose it happens because I`m not able to set classpath for
servlets; In fact if I use the same jini service from command line
(using java -cp .... filename.class )
it works well.
How can I set classpath for servlets using Apache HTTp server?
 
Sheriff
Posts: 3341
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Apache itself can not run servlets. You need an external servlet runner such as Tomcat, Resin, JRun etc. and configure a connector between Apache and the servlet runner. This is different for each servlet runner and connector, as is setting the classpath for it. Consult the documentation for your servlet runner to determine how to do these tasks.
 
Sheriff
Posts: 7000
6
Eclipse IDE Python C++ Debian Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I'm also a bit worried by the use of Jini in this question. Is the code in your jar file really a Jini "service", or some client code which looks up and uses a Jini service on a network.
If your jar is the actual service, then I'm not sure calling it directly from a servlet makes much sense. If your jar is some Jini client code, you may have other network issues besides the classpath to worry about. Is the server machine normally part of the Jini network?
 
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello,
Everything in use by a servlet must either be in the WEB-INF\lib or WEB-INF\classes folder. These are the default classpath in case of any servlet container and we cant configure it to use classes outside these folders
Rajesh Kumar
(SCJP2 - 90%, SCWCD 93%, UML 79% , J2EE 89%)
reply
    Bookmark Topic Watch Topic
  • New Topic