• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Problem in JavaBean

 
Ranch Hand
Posts: 90
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi
I'm developing an webapp
well
root/src/java/classes/XB1.class (XB1 is not a servlet, just a java file)
and
root/xml/xmlns.xml

OK and tomcat 6 for web server
Ok and problem
I want to access to xmlns.xml from XB1.class
Note:the directory of project is dynamic, i mean is on a Flash disk
please help
:confused:
 
Bartender
Posts: 4179
22
IntelliJ IDE Python Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The XML file should be in the application's classpath so you can find it using this.getClass().getResource() to locate it. It is not clear to me what your classpath is since root/src/ doesn't seem to be a normal WebApp classpath (it is usuall like root/WEB-INF/classes/).

See: The Class#getResource() method API.
 
reply
    Bookmark Topic Watch Topic
  • New Topic