Results 1 to 3 of 3
- 04-27-2012, 11:43 PM #1
Member
- Join Date
- Apr 2012
- Posts
- 5
- Rep Power
- 0
specify relative path to file in web.xml
I'm having problem with setting the path to a file (using relative path)
my tomact structure is
in the web.xmlJava Code:tomcat-7 - config - filterConfigs - webapps - exampleWebApp - META-INF - WEB-INF - web.xml - classes
however, the filter cannot locate this file.Java Code:<filter> <filter-name>MY Filter</filter-name> <filter-class>com.filter.MyFilter</filter-class> <init-param> <param-name>keyStore</param-name> <param-value>../../config/filterConfigs/keystore.jks</param-value> </init-param> </filter>
If I specified the absolute path, it will be pick it up.
so, how do i specify the relative path?
- 04-28-2012, 01:10 AM #2
Moderator
- Join Date
- Jul 2010
- Location
- California
- Posts
- 1,609
- Rep Power
- 5
Re: specify relative path to file in web.xml
I'm not extremely familiar with Tomcat, but have seen something similar with other web containers in that the path cannot be found unless relative to the currently running JRE - so I'd say find where this is within Tomcat and place the file path relative to that directory.
- 04-28-2012, 01:23 AM #3
Member
- Join Date
- Apr 2012
- Posts
- 5
- Rep Power
- 0
Re: specify relative path to file in web.xml
wish i could do that. the folder contains Fedlet SSO configuration, keystore, etc.. and other stuff that multiple webappp uses.
I saw somewhere where someone use something like <param-value>home/tomcat/mydirectory</param-value>.
this is the ideal solution, but i'm not sure how to go about it.
Similar Threads
-
Help needed to load relative path of file
By friendz_forever in forum New To JavaReplies: 8Last Post: 08-15-2011, 10:03 AM -
FileInputStream with relative path in a JAR
By Bertieboy7 in forum New To JavaReplies: 3Last Post: 03-31-2011, 04:10 AM -
How to use a relative path for a file?
By kipade in forum SWT / JFaceReplies: 0Last Post: 02-28-2011, 06:37 AM -
how to set relative path in jsp?
By makpandian in forum JavaServer Pages (JSP) and JSTLReplies: 0Last Post: 01-02-2009, 08:20 AM -
Obtaining relative path outside of executable JAR
By tjsaker in forum Advanced JavaReplies: 1Last Post: 11-14-2008, 06:48 AM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks