You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Derek Mahar <D....@penson.ca> on 2003/10/08 17:00:35 UTC

Tomcat 5.0.12, Windows, and file pathnames

Is it the responsibility of Tomcat, the application running on Tomcat,
or Java to translate or resolve Windows file paths?  
If it is Tomcat, does Tomcat 5.0.12 translate or resolve these pathnames
correctly?  VQWiki (http://www.croninsolutions.com/veryquickwiki/), a
JSP Wiki engine, when run on Tomcat 5.0.9 on Linux, works as expected.
However, on Tomcat 5.0.12 on Windows XP, VQWiki is unable to find and
save its property file, even though this file exists and is both
readable and writable.  VQWiki generates the following report page:

The error had the following
message:C:\Program%20Files\Apache%20Software%20Foundation\Tomcat%205.0\w
ebapps\vqwiki\WEB-INF\classes\vqwiki.properties (The system cannot find
the path specified)

Tomcat's localhost_log reports the following exception:

2003-10-08 10:46:43 Admin: Error in class
vqwiki.servlets.AdministrationServlet
vqwiki.servlets.WikiServletException:
C:\Program%20Files\Apache%20Software%20Foundation\Tomcat%205.0\webapps\v
qwiki\WEB-INF\classes\vqwiki.properties (The system cannot find the path
specified)
Type: -1,
C:\Program%20Files\Apache%20Software%20Foundation\Tomcat%205.0\webapps\v
qwiki\WEB-INF\classes\vqwiki.properties (The system cannot find the path
specified)
	at
vqwiki.servlets.AdministrationServlet.doPost(AdministrationServlet.java:
222)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:763)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
	at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applica
tionFilterChain.java:284)
	at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilt
erChain.java:204)
	at
org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatc
her.java:742)
	at
org.apache.catalina.core.ApplicationDispatcher.processRequest(Applicatio
nDispatcher.java:506)
	at
org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDisp
atcher.java:443)
	at
org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispat
cher.java:359)
	at vqwiki.servlets.VQWikiServlet.dispatch(VQWikiServlet.java:39)
	at vqwiki.servlets.WikiServlet.doPost(WikiServlet.java:375)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:763)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
	at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applica
tionFilterChain.java:284)
	at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilt
erChain.java:204)
	at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValv
e.java:256)
	at
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveCo
ntext.java:151)
	at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:5
63)
	at
org.apache.catalina.core.StandardContextValve.invokeInternal(StandardCon
textValve.java:245)
	at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValv
e.java:199)
	at
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveCo
ntext.java:151)
	at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:5
63)
	at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java
:195)
	at
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveCo
ntext.java:151)
	at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java
:164)
	at
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveCo
ntext.java:149)
	at
org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:578
)
	at
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveCo
ntext.java:149)
	at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:5
63)
	at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.
java:156)
	at
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveCo
ntext.java:151)
	at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:5
63)
	at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:972)
	at
org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:209)
	at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:67
0)
	at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processC
onnection(Http11Protocol.java:517)
	at
org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:57
5)
	at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool
.java:666)
	at java.lang.Thread.run(Unknown Source)

Does Tomcat not like Windows pathnames?  Is it choking on the spaces?

Derek

---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Re: Tomcat 5.0.12, Windows, and file pathnames

Posted by Remy Maucherat <re...@jboss.org>.
Derek Mahar wrote:

> Is it the responsibility of Tomcat, the application running on Tomcat,
> or Java to translate or resolve Windows file paths?  
> If it is Tomcat, does Tomcat 5.0.12 translate or resolve these pathnames
> correctly?  VQWiki (http://www.croninsolutions.com/veryquickwiki/), a
> JSP Wiki engine, when run on Tomcat 5.0.9 on Linux, works as expected.
> However, on Tomcat 5.0.12 on Windows XP, VQWiki is unable to find and
> save its property file, even though this file exists and is both
> readable and writable.  VQWiki generates the following report page:
> 
> The error had the following
> message:C:\Program%20Files\Apache%20Software%20Foundation\Tomcat%205.0\w
> ebapps\vqwiki\WEB-INF\classes\vqwiki.properties (The system cannot find
> the path specified)

The only way you can get a properly URL encoded URL is when you call 
getResource on the classloader. If you do a diff, you'll see there's no 
relevant changes that have been made to the classloader between 5.0.9 
and 5.0.12.
The most likely cause is that you don't have spaces in your Tomcat path 
on Linux, but you do on Windows.

Note: The URL encoding of those paths is a "feature" which could be 
removed (it is supposed to fix problems with RMI).

-- 
xxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Rémy Maucherat
Senior Developer & Consultant
JBoss Group (Europe) SàRL
xxxxxxxxxxxxxxxxxxxxxxxxxxxxx


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org