Re: getRealPath() returns real path plus context path

2005-09-06 Thread Franz-Josef Herpers

Hi,

Edmund Urbani wrote:

the getRealPath method simply returns a path inside the webapp's 
directory. eg. you can do getRealPath("images/someimg.jpg") and get the 
actual filesystem path for that file, so you can access it using 
java.io.File and do something with it. getRealPath("/") should give you 
the webapp directory itself.
note that you probably should not use this method, if you ever want to 
be able to run your webapp directly from a .war file.


I know about the problem with the war file. That's the reason why I 
until today never used this method and apparently never read the 
Javadocs


Thanks for the helpful answer.

Regards
Franz


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



getRealPath() returns real path plus context path

2005-09-05 Thread Franz-Josef Herpers

Hi,

I've a problem when using ServletContext#getRealPath() with Tomcat 5.5.9.

My web application resides under the name "tool" in the webapps 
directory. When I call 
servletContext.getRealPath(request.getContextPath() I get the real path 
but always with the context path added at the end. That means a path 
like C:\path\to\tomcat\webapps\tool\tool.


Is there any explanation for this behaviour? Or am I doing something wrong?

Thanks for any hints in advance

Regards
Franz

--
Franz-Josef Herpers
Puschkinallee 9A
12435 Berlin
030/53 21 33 02
0173/54 23 666
[EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



deploy-task with directory-structure

2003-12-12 Thread Franz-Josef Herpers
Hi,

i used to work with the ant install task during development. Now i 
migrated to Tomcat 5.0.16 and from the docs and this mailing list I 
know, that the install task is deprecated in favour of the deploy task.

So i changed my install target:





  
But know I get the error message:
[deploy] BUILD FAILED: file:E:/CVS_PROJEKTE/iuclid-x/build.xml:242: 
java.net.UnknownHostException: E

The target is run from the same server that Tomcat is running on.

Any suggestions what I'm doing wrong?
Is it possible to deploy from a directory structure (not a war-file) 
like with the install task?

Regards
Franz


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]