aspose file tools*
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 EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "ServletContext.getRealPath didn Watch "ServletContext.getRealPath didn New topic

ServletContext.getRealPath didn't work on JRun 3.0

Jhonson Garcia

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".
wood burning stoves
subject: ServletContext.getRealPath didn't work on JRun 3.0
Similar Threads
Different results for ServletContext.getRealPath
Different results for ServletContext.getRealPath
Apache commons file upload does not work for me.
access properties file from servlet
JRun vs Tomcat, about the custom action