Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

ServletContext.getRealPath didn't work on JRun 3.0

 
Jhonson Garcia
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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".
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic