GeeCON Prague 2014*
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


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".
 
GeeCON Prague 2014
 
subject: ServletContext.getRealPath didn't work on JRun 3.0