That worked great.  thanks. good idea.

-----Original Message-----
From: Barnett, Brian W. [mailto:[EMAIL PROTECTED]
Sent: Friday, June 24, 2005 11:17 AM
To: 'Struts Users Mailing List'
Subject: RE: [OT] find out web app path / Quartz Scheduler?


Pass it into the job using the JobDetail object.

JobDetail jobDetail = sched.getJobDetail("FooJob", "FooGroup");

String fooPath = servlet.getServletContext().getRealPath("foo");
jobDetail.getJobDataMap().put("fooPath", fooPath);


-----Original Message-----
From: Brian McGovern [mailto:[EMAIL PROTECTED] 
Sent: Friday, June 24, 2005 9:29 AM
To: Struts Users Mailing List
Subject: [OT] find out web app path / Quartz Scheduler?


Hi

I've got a struts web app but am running Quartz also.  In some places in my
app I need the servlet to figure out the path under which its running.  I do
that like this.

getServlet().getServletContext().getRealPath("foo");

This returns me my web app path up to the foo directory.


But in my Quartz schedule class that doesnt extent any Action class this
obviously doesnt work.  So how can I get non servlet extended classes to
figure out current directory?

Thanks


**************************************************************************** 
This email may contain confidential material. 
If you were not an intended recipient, 
Please notify the sender and delete all copies. 
We may monitor email to and from our network. 
****************************************************************************

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to