Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>It is not good Idea to store in tomcat dir,during deploy may delete that I recommended Redis to do it <a href="http://www.springsource.org/spring-data/redis" rel="nofollow">http://www.springsource.org/spring-data/redis</a> ,Or if you want store in embedded DB create a directory file inside home of user that is using both windows and unix by </p> <pre><code>System.getProperty("user.home"); </code></pre> <p>Or you may get tomcat home directory If CATALINA_HOME set in environment variable by </p> <pre><code>System.getProperty("catalina.base"); </code></pre> <p>Or you can use absolute path with using spring Message bundle ,so you can add dir.properties file and add in spring config:</p> <pre><code> &lt;bean id="messageSource" class="org.springframework.context.support.ReloadableResourceBundleMessageSource"&gt; &lt;property name="basename" value="/WEB-INF/dir" /&gt; &lt;property name="defaultEncoding" value="UTF-8" /&gt; </code></pre> <p></p> <p>and inside file dir.properties ,add path:</p> <pre><code> storage:/var/lib/tomcat6/ </code></pre> <p>Or ,if you are intrested to find Os dynamically, you can use this code to get specific dir:</p> <pre><code> public class FindOS { private static final boolean osIsMacOsX; private static final boolean osIsWindows; private static final boolean osIsWindowsXP; private static final boolean osIsWindows2003; private static final boolean osIsWindowsVista; private static final boolean osIsLinux; static { String os = System.getProperty("os.name"); if (os != null) os = os.toLowerCase(); osIsMacOsX = "mac os x".equals(os); osIsWindows = os != null &amp;&amp; os.indexOf("windows") != -1; osIsWindowsXP = "windows xp".equals(os); osIsWindows2003 = "windows 2003".equals(os); osIsWindowsVista = "windows vista".equals(os); osIsLinux = os != null &amp;&amp; os.indexOf("linux") != -1; } public static boolean isMacOSX() { return osIsMacOsX; } public static boolean isWindows() { return osIsWindows; } public static boolean isWindowsXP() { return osIsWindowsXP; } public static boolean isWindows2003() { return osIsWindows2003; } public static boolean isWindowsVista() { return osIsWindowsVista; } public static boolean isLinux() { return osIsLinux; } //TODO String getHelperDirectory(){ if(isLinux())return "~/"; if(isWindows()) return "c:/"; if(osIsWindowsVista) return "c:/"; return null; } </code></pre>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload