File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to set a global string variable!

 
Richard Elsberry
Ranch Hand
Posts: 40
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am trying to figure out how to set a string variable that will represent the location on the local file system. This location will be different between development and production so I would like to be able to set this for each location. I've been successful at using jndi to set the datasource for each location so I tried something like this:

<Resource name="jdbc/localPath" auth="Container" type="java.lang.String" value="C:\\work\\swstir\\images\\" />

but I get a "Cannot create resource instance" error message. It seems like either the <TOMCAT-HOME>/conf/web.xml or server.xml is where this should be set but I can't figure out how it's done. Any thoughts?

Thanks,
Richard
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic