Created
July 31, 2013 09:06
-
-
Save Baztoune/6120559 to your computer and use it in GitHub Desktop.
Handle file path pattern in JNDI
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<jndi:binding name="my/filePathPattern"> | |
<jndi:value type="java.lang.String">C:/PATH/TO/%s/SUB/%s</jndi:value> | |
</jndi:binding> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
String filePathPattern = (String) InitialContext.doLookup("my/filePathPattern"); | |
StringBuilder filePath = new StringBuilder(); | |
Formatter frmt = new Formatter(filePath); | |
frmt.format(filePathPattern,"firstStringParam","secondStringParam"); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment