wood burning stoves*
The moose likes Servlets and the fly likes ServletContext.getRealPath didn't work on JRun 3.0 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "ServletContext.getRealPath didn Watch "ServletContext.getRealPath didn New topic
Author

ServletContext.getRealPath didn't work on JRun 3.0

Jhonson Garcia
Greenhorn

Joined: Aug 27, 2002
Posts: 3
Hi all,
I got a problem with ServletContext.getRealPath method that applied on JRun 3.0 application server.
The code is writed as below:
public String getPath(ServletConfig config){
ServletContext ctx = config.getServletContext();
return ctx.getRealPath("/");
}
The result string of the method above is "C:/", it didn't return the root directory application server. I also tested it on JRun 3.1, this time it return the root directory of the application server, exp: "C:/Jrun3.1/servers/myserver/myapp".
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: ServletContext.getRealPath didn't work on JRun 3.0
 
Similar Threads
JRun vs Tomcat, about the custom action
Different results for ServletContext.getRealPath
Different results for ServletContext.getRealPath
access properties file from servlet
Apache commons file upload does not work for me.