A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Win a copy of
OCA Java SE 8 Programmer I Study Guide
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
error while invoking jndi list in jmx - console
How to deploy in external directory in jboss5
Help with creating basic Session Beans (Struts + JBoss 3.2.3)
Can the properties file be maintained as part of the EAR or WAR, instead of in \conf (ie. seprately)
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2015