Hi!
I want to save images to a specified uploadfolder, but I don't want to
define the Folder object with an absolute path. Is there a possiblity to
define a Folder relative to the context root?
--
View this message in context:
If memory serves, then you can get access to the servlet request, and pull
out the context path from your page via:
getWebRequestCycle().getWebRequest().getHttpServletRequest()
regards,
Guðmundur
On Thu, Apr 24, 2008 at 11:20 AM, unka_hahrry [EMAIL PROTECTED]
wrote:
Hi!
I want to save
You can also use one of the many methods in the servletcontext. you
can get it from the application.
Maurice
On Thu, Apr 24, 2008 at 11:20 AM, unka_hahrry [EMAIL PROTECTED] wrote:
Hi!
I want to save images to a specified uploadfolder, but I don't want to
define the Folder object with an
Not quite sure but you can get the folder that is the root of your
application context
File file = new File( getServletContext().getRealPath( / ) );
--
View this message in context:
http://www.nabble.com/How-to-set-the-path-for-a-uploadfolder--tp16848200p16850438.html
Sent from the Wicket -
Hi,
Beware of using getRealPath if your app is deployed on a Tomcat server where
it's set _not_ to unpack the wars (for instance 99% of the plesk domain
hostings).
It will always return null.
My 2 cents.
Cristi Manole
On Thu, Apr 24, 2008 at 4:23 PM, Mathias P.W Nilsson [EMAIL PROTECTED]
Thanks, works fine.
Mathias P.W Nilsson wrote:
Not quite sure but you can get the folder that is the root of your
application context
File file = new File( getServletContext().getRealPath( / ) );
--
View this message in context: