1为抛出异常原因,2为异常解决方法。

 原因:   进入spring:bind标签源码你可以看到

Object target = requestContext.getModelObject(beanName);
   if (target == null) {
    throw new IllegalStateException("Neither BindingResult nor plain target object for bean name '" +
      beanName + "' available as request attribute");
   }

beanName=  <spring:bind path="command.spjg">的绿色部分

如果你是直接对某个页面进行请求,那么request中还没command这个对象

 

2.

在页面上加上

<jsp:useBean ></jsp:useBean>

红色部分填上你的绑定类

相关文章:

  • 2022-12-23
  • 2022-01-22
  • 2022-12-23
  • 2022-01-08
  • 2022-02-03
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-05-13
  • 2022-12-23
  • 2022-12-23
  • 2021-12-28
  • 2022-12-23
相关资源
相似解决方案