jsp-->servert时,只要是表单里有的属性,就算你没写任何东西,默认的会提交一个空(" ");而你在地址栏里没有写属性名和值时,它就是为null;这是因为servletApi(or
null if the parameter does not exist.)!
本文探讨了JSP页面向Servlet传递参数时的行为差异:对于表单提交,即使未填写某些字段,也会发送空字符串;而对于URL中未指定的参数,则返回null。这是由于Servlet API的规范所决定。
null if the parameter does not exist.)!

被折叠的 条评论
为什么被折叠?