Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

On apache tomcat

C:\Program Files\Apache Software Foundation\Tomcat 6.0\conf\Catalina\localhost\

we can change folders for another by specify it in XML like: THE_FOLDER.xml and in that xml we can change that THE_FOLDER path

<Context path="/MF_PHRASES" reloadable="true" docBase="C:\Projects\Customers\test\phrases" workDir="C:\Projects\Customers\test\phrases" />

but it doesn't work for folder located on other server:

<Context path="/MF_PHRASES" reloadable="true" docBase="\\192.168.0.100\c$\Projects\Customers\test\phrases" 
workDir="\\192.168.0.100\c$\Projects\Customers\test\phrases" />

not working

Tried 2 methods:

1) mapping through network drive, got the error:

SEVERE: Error starting static Resources java.lang.IllegalArgumentException: Document base Z:\Projects\Customers\test\phrases does not exist or is not a readable directory at org.apache.naming.resources.FileDirContext.setDocBase(FileDirContext.java:142) at org.apache.catalina.core.StandardContext.resourcesStart(StandardContext.java:431‌​9) at org.apache.catalina.core.StandardContext.start(StandardContext.java:4488) at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:799)

2) file://192.168.0.100/c$/Projects/Customers/test/phrases

SEVERE: Error deploying configuration descriptor MF_PHRASES_NEW.xml java.io.IOException: The filename, directory name, or volume label syntax is incorrect at java.io.WinNTFileSystem.canonicalize0(Native Method) at java.io.Win32FileSystem.canonicalize(Unknown Source) at java.io.File.getCanonicalPath(Unknown Source) at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:658) at org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.java:601)

is there any way to make it work?

share|improve this question
1  
Is tomcat running as a user that has access to that share? –  mahnsc May 19 '12 at 15:56
add comment

1 Answer 1

In the first case, like mahnsc said, looks like its a permission thing. The user that owns Tomcat cannot read/write in that directory. In the second case, it's more possible that the docBase attribute does not understand paths containing IP addresses.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.