File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Win a copy of
Java SE 8 for the Really Impatient
this week in the
Joined: Sep 15, 2009
Jan 21, 2011 01:51:04
String filePath = getServlet().getServletContext().getRealPath("/")+"upload";
The above line returns the filepath as
It should ideally be
Why is that extra dot coming in the path
Joined: Mar 18, 2010
Jan 21, 2011 09:04:31
. 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
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 agree. Here's the link:
subject: getRealPath() issue
Help with creating basic Session Beans (Struts + JBoss 3.2.3)
How to deploy in external directory in jboss5
Can the properties file be maintained as part of the EAR or WAR, instead of in \conf (ie. seprately)
error while invoking jndi list in jmx - console
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2014