It's not a secret anymore!
The moose likes Servlets and the fly likes getRealPath() issue Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

JavaRanch » Java Forums » Java » Servlets
Bookmark "getRealPath() issue" Watch "getRealPath() issue" New topic

getRealPath() issue

Naveen puttu
Ranch Hand

Joined: Sep 15, 2009
Posts: 88

The above line returns the filepath as

It should ideally be

Why is that extra dot coming in the path

Kumar Raja
Ranch Hand

Joined: Mar 18, 2010
Posts: 547


Please read this.. As per this, the real path returns you the absolute path and it depends on the computer and also the container.

The issue which you have is due to the way JBoss is handling the deployment. You may need to refer JBoss documentation or move this to JBoss forum, for better answer.

I tried the example on both JBoss and GlassFish and I see the problem in JBoss but not on Glassfish.


I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link:
subject: getRealPath() issue
It's not a secret anymore!