I have a struts application that makes use of an email service layer. The email service provides a merge facility (via Velocity) and a delivery facility (via JavaMail).

Typically, the application invokes the mail service within a struts action, where it has access to the request to get the relevant URL into a merge context. Here I make use of RequestUtils.serverURL(request), request.getContextPath(), et al. to cook up a URL string.

I now have a new use case where a service thread running inside the container will be invoking the email service. Since this thread does not have access to a request, I'm struggling to find a way to get dynamically create URLs for a merge context without declaring anything statically inside a config.

Any suggestions?


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



Reply via email to