Henry Chen gmail.com> writes:
Try:
ServletContext context =
cycle.getRequestContext().getServlet().getServletContext();
String somefile = "/abc.zip";
//String outFileName = context.getResource(somfile).getFile();
String outFileName = context.getRealPath(somfile);
As you're trying to write to
This doesn't work. Even getResource(contextPath) doesn't work.
-Original Message-
From: Ivano [mailto:[EMAIL PROTECTED]
Sent: Thursday, May 05, 2005 10:33 AM
To: Tapestry users
Subject: Re: Problem with ServletContext.getResource()
Could it be:
String somefile = c
Could it be:
String somefile = contextPath + File.separator + "abc.zip";
or about the same:
String somefile = contextPath +"/abc.zip";
Henry Chen wrote:
Hi,
I want to write to a file. I use the following method:
String contextPath =
cycle.getRequestContext().getRequest().getContextPath();
Servlet
Hi,
I want to write to a file. I use the following method:
String contextPath =
cycle.getRequestContext().getRequest().getContextPath();
ServletContext context =
cycle.getRequestContext().getServlet().getServletContext();
String somefile = contextPath +"abc.zip";
String outFileName = con