struts 字符串数组顺序
我在 jsp 文件中使用字符串数组。 strut 是否保证我输入数据的顺序与检索数据时相同?
字符串名称[];
在jsp中有多个属性“名称”。当我检索操作类中的值时,顺序是否相同? 请帮我。虽然我没有遇到任何错误,但我仍然对此表示怀疑。 谢谢
I am using a string array in a jsp file. Does strut gurantee that the order in which i am enetring the data will be same when i am retriving the data?
String name[];
in jsp there are multiple nos of propert 'name'. When i am retriving the value in action class, does the order remian same?
Please help me. Though i have not got any error, still i have doubt on this.
Thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
一旦表单提交到服务器,Struts 将确保维持浏览器提交的顺序。浏览器提交这些数组值的顺序取决于浏览器,而不是 struts,但好消息是标准表明数组值应该按照它们在页面中出现的顺序提交,并且我使用过的每个浏览器曾经使用过,可以正确执行此操作。
Struts will ensure the order submitted by the browser is maintained once the form is submitted to the server. The order that those array values are submitted by the browser is up to the browser, not struts, but the good news is the standard indicates the array values should be submitted in the same order they appear in the page, and every browser I've ever used does this correctly.