A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Win a copy of
EJB 3 in Action
this week in the
EJB and other Java EE Technologies
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.
With a little knowledge, a
cast iron skillet
is non-stick and lasts a lifetime.
subject: getRealPath() issue
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)
error while invoking jndi list in jmx - console
How to deploy in external directory in jboss5
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2014