【问题标题】:How to get the redirected status message from the url to the jsp page?如何获取从 url 到 jsp 页面的重定向状态消息?
【发布时间】:2015-07-21 06:18:28
【问题描述】:

这是上传失败功能的 catch 块。

catch(Exception e){
            e.printStackTrace();
            model.addAttribute("uploadFailureStatus", ServerMessageKeys.UPLOAD_FAILURE.getCode());
        }

如果上传失败,我会在 url 中得到类似

http://127.0.0.1:8080/....../masterInfo?uploadFailureStatus=upload.failure.status

我必须在 jsp 页面中显示该状态消息。 请帮帮我。

【问题讨论】:

    标签: spring jsp url


    【解决方案1】:

    可以通过jsp请求对象获取参数值。

    request.getParameter('uploadFailureStatus');

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2015-07-24
      • 2016-05-15
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2012-01-24
      • 2013-05-27
      • 1970-01-01
      相关资源
      最近更新 更多