您的位置 电脑知识爱好者 >> 编程知识 >> struts和spring发送mail的问题

struts和spring发送mail的问题

电脑知识爱好者互联网2007-6-21 19:35:29
知识重点:我使用struts和springjavamail发送邮件时为什么applicationcontext对象找不到发送邮件的xml文件的路径了?调用的action:public ActionForward send(ActionMapping mapping, ActionForm form, H..

我使用struts和springjavamail发送邮件时为什么applicationcontext对象找不到发送邮件的xml文件的路径了?
调用的action:
public ActionForward send(ActionMapping mapping, ActionForm form,
HttpServletRequest request, HttpServletResponse response)
{
try
{
ComplexMessageSender.mailDo();
}

发送的类:
public static void mailDo() throws Exception {
// TODO Auto-generated method stub
ApplicationContext ctx = new FileSystemXmlApplicationContext(new String[]{"/WebRoot/WEB-INF/ComplexMailSender.xml"});
ComplexMessageSender sender = (ComplexMessageSender)ctx.getBean("messageSender");
发送mail的xml文件的存放位置是:http://lh6.google.com/image/aning21/Rmy2sZbsWGI/AAAAAAAAAF8/TplOPDcVRhg/jmailxml.jpg

请问要如何解决?

回答列表

参与评论
相关内容
关于我们 | 隐私政策 | 站点地图 | 站长博客|京ICP备07025396号
添加到百度搜藏 添加到百度搜藏 电脑知识爱好者Copyright ?2006-2008版权所有 我要啦免费统计