struts.xml中<param>标签不知为什么无法给action中的属性动态设置属性

struts.xml中标签不知为什么无法给action中的属性动态设置属性 action内有set方法,是版本的问题吗
代码:

   <param name="savePath">/uploadFiles</param>

action中代码:

 private String savePath;

    public void setSavePath(String savePath) {
        this.savePath = savePath;
    }

    // 获取上传文件的保存位置
    private String getSavePath() {
        String txt = null;
        try {
            txt = ServletActionContext.getServletContext()
                    .getRealPath(savePath);
        } catch (Exception e) {
            e.printStackTrace();
        }
        return txt;
    }

因为无法设置导致了空指针,怎么解决啊!!!!在线等啊

http://blog.csdn.net/suyu_yuan/article/details/52620463