• 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

Datasource

 
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello,
Is is possible to use a datasource (in JSP) for something besides the database connection? I want to specify an upload directory for my images but I don't want to have to change it in the code itself later. So can I somehow do it in the context file using a DataSource?
Thanks in Advance
H
 
Bartender
Posts: 10336
Hibernate Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
If this is for a JSP application, whats wrong with using the application context?
 
Hanna Bech
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks, that's probably what I wanted in the first place, I just got somewhat confused, as I'm new to this. Anyway, I worked it out using the "getRealPath()" method instead. However, I am getting an AccessControlException: access denied whenever I try to test it out. I'm pretty sure I have the right path now, or at least I'm moderately sure.
Any ideas?
 
reply
    Bookmark Topic Watch Topic
  • New Topic